Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
eb312aa8
Commit
eb312aa8
authored
Apr 13, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error with border options
parent
3953762c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
cell/native/native.js
cell/native/native.js
+9
-8
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+10
-9
No files found.
cell/native/native.js
View file @
eb312aa8
...
@@ -6668,6 +6668,7 @@ function offline_calculate_complete_range(x, y, w, h) {
...
@@ -6668,6 +6668,7 @@ function offline_calculate_complete_range(x, y, w, h) {
function
offline_set_translate
(
translate
)
{
_s
.
translate
=
translate
;}
function
offline_set_translate
(
translate
)
{
_s
.
translate
=
translate
;}
function
offline_apply_event
(
type
,
params
)
{
function
offline_apply_event
(
type
,
params
)
{
var
_borderOptions
=
Asc
.
c_oAscBorderOptions
;
var
_stream
=
null
;
var
_stream
=
null
;
var
_return
=
undefined
;
var
_return
=
undefined
;
var
_current
=
{
pos
:
0
};
var
_current
=
{
pos
:
0
};
...
@@ -7110,7 +7111,7 @@ function offline_apply_event(type,params) {
...
@@ -7110,7 +7111,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
)
{
if
(
border
)
{
borders
[
c_oAscB
orderOptions
.
Left
]
=
border
;
borders
[
_b
orderOptions
.
Left
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7120,7 +7121,7 @@ function offline_apply_event(type,params) {
...
@@ -7120,7 +7121,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
Top
]
=
border
;
borders
[
_b
orderOptions
.
Top
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7130,7 +7131,7 @@ function offline_apply_event(type,params) {
...
@@ -7130,7 +7131,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
Right
]
=
border
;
borders
[
_b
orderOptions
.
Right
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7140,7 +7141,7 @@ function offline_apply_event(type,params) {
...
@@ -7140,7 +7141,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
Bottom
]
=
border
;
borders
[
_b
orderOptions
.
Bottom
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7150,7 +7151,7 @@ function offline_apply_event(type,params) {
...
@@ -7150,7 +7151,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
DiagD
]
=
border
;
borders
[
_b
orderOptions
.
DiagD
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7160,7 +7161,7 @@ function offline_apply_event(type,params) {
...
@@ -7160,7 +7161,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
DiagU
]
=
border
;
borders
[
_b
orderOptions
.
DiagU
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7170,7 +7171,7 @@ function offline_apply_event(type,params) {
...
@@ -7170,7 +7171,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
InnerV
]
=
border
;
borders
[
_b
orderOptions
.
InnerV
]
=
border
;
}
}
break
;
break
;
}
}
...
@@ -7180,7 +7181,7 @@ function offline_apply_event(type,params) {
...
@@ -7180,7 +7181,7 @@ function offline_apply_event(type,params) {
if
(
!
borders
)
borders
=
[];
if
(
!
borders
)
borders
=
[];
border
=
asc_ReadCBorder
(
params
,
_current
);
border
=
asc_ReadCBorder
(
params
,
_current
);
if
(
border
&&
borders
)
{
if
(
border
&&
borders
)
{
borders
[
c_oAscB
orderOptions
.
InnerH
]
=
border
;
borders
[
_b
orderOptions
.
InnerH
]
=
border
;
}
}
break
;
break
;
}
}
...
...
cell/view/WorksheetView.js
View file @
eb312aa8
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
* -----------------------------------------------------------------------------
* -----------------------------------------------------------------------------
*/
*/
var
asc
=
window
[
"
Asc
"
];
var
asc
=
window
[
"
Asc
"
];
var
borderOptions
=
asc
.
c_oAscBorderOptions
;
var
asc_applyFunction
=
asc
.
applyFunction
;
var
asc_applyFunction
=
asc
.
applyFunction
;
var
asc_calcnpt
=
asc
.
calcNearestPt
;
var
asc_calcnpt
=
asc
.
calcNearestPt
;
var
asc_getcvt
=
asc
.
getCvtRatio
;
var
asc_getcvt
=
asc
.
getCvtRatio
;
...
@@ -8947,17 +8948,17 @@
...
@@ -8947,17 +8948,17 @@
}
}
res
=
new
Border
();
res
=
new
Border
();
// Diagonal
// Diagonal
res
.
d
=
makeBorder
(
val
[
c_oAscBorderOptions
.
DiagD
]
||
val
[
c_oAscB
orderOptions
.
DiagU
]
);
res
.
d
=
makeBorder
(
val
[
borderOptions
.
DiagD
]
||
val
[
b
orderOptions
.
DiagU
]
);
res
.
dd
=
val
[
c_oAscB
orderOptions
.
DiagD
]
?
true
:
false
;
res
.
dd
=
val
[
b
orderOptions
.
DiagD
]
?
true
:
false
;
res
.
du
=
val
[
c_oAscB
orderOptions
.
DiagU
]
?
true
:
false
;
res
.
du
=
val
[
b
orderOptions
.
DiagU
]
?
true
:
false
;
// Vertical
// Vertical
res
.
l
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
Left
]
);
res
.
l
=
makeBorder
(
val
[
b
orderOptions
.
Left
]
);
res
.
iv
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
InnerV
]
);
res
.
iv
=
makeBorder
(
val
[
b
orderOptions
.
InnerV
]
);
res
.
r
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
Right
]
);
res
.
r
=
makeBorder
(
val
[
b
orderOptions
.
Right
]
);
// Horizontal
// Horizontal
res
.
t
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
Top
]
);
res
.
t
=
makeBorder
(
val
[
b
orderOptions
.
Top
]
);
res
.
ih
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
InnerH
]
);
res
.
ih
=
makeBorder
(
val
[
b
orderOptions
.
InnerH
]
);
res
.
b
=
makeBorder
(
val
[
c_oAscB
orderOptions
.
Bottom
]
);
res
.
b
=
makeBorder
(
val
[
b
orderOptions
.
Bottom
]
);
// Change border
// Change border
range
.
setBorder
(
res
);
range
.
setBorder
(
res
);
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment