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
5a6667db
Commit
5a6667db
authored
Mar 31, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 32138
parent
9d8022ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
21 deletions
+30
-21
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+4
-4
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+26
-17
No files found.
cell/view/CellEditorView.js
View file @
5a6667db
...
...
@@ -499,8 +499,8 @@
this
.
sides
=
this
.
options
.
getSides
();
this
.
left
=
this
.
sides
.
cellX
;
this
.
top
=
this
.
sides
.
cellY
;
this
.
right
=
this
.
sides
.
r
[
0
];
this
.
bottom
=
this
.
sides
.
b
[
0
];
this
.
right
=
this
.
sides
.
r
[
this
.
sides
.
ri
];
this
.
bottom
=
this
.
sides
.
b
[
this
.
sides
.
bi
];
// ToDo вынести в отдельную функцию
var
canExpW
=
true
,
canExpH
=
true
,
tm
,
expW
,
expH
,
fragments
=
this
.
_getRenderFragments
();
if
(
0
<
fragments
.
length
)
{
...
...
@@ -760,8 +760,8 @@
this
.
left
=
this
.
sides
.
cellX
;
this
.
top
=
this
.
sides
.
cellY
;
this
.
right
=
this
.
sides
.
r
[
0
];
this
.
bottom
=
this
.
sides
.
b
[
0
];
this
.
right
=
this
.
sides
.
r
[
this
.
sides
.
ri
];
this
.
bottom
=
this
.
sides
.
b
[
this
.
sides
.
bi
];
this
.
cursorPos
=
opt
.
cursorPos
!==
undefined
?
opt
.
cursorPos
:
0
;
this
.
topLineIndex
=
0
;
...
...
cell/view/WorksheetView.js
View file @
5a6667db
...
...
@@ -11621,52 +11621,61 @@
/*lockDraw*/
false
);
},
getSides
:
function
()
{
var
_col
=
!
isMerged
?
col
:
mc
.
c1
;
var
_row
=
!
isMerged
?
row
:
mc
.
r2
;
var
_c1
,
_r1
,
_c2
,
_r2
,
ri
=
0
,
bi
=
0
;
if
(
isMerged
)
{
_c1
=
mc
.
c1
;
_c2
=
mc
.
c2
;
_r1
=
mc
.
r1
;
_r2
=
mc
.
r2
;
}
else
{
_c1
=
_c2
=
col
;
_r1
=
_r2
=
row
;
}
var
vro
=
getVisibleRangeObject
();
var
i
,
w
,
h
,
arrLeftS
=
[],
arrRightS
=
[],
arrBottomS
=
[];
var
offsX
=
tc
[
vro
.
vr
.
c1
].
left
-
tc
[
0
].
left
-
vro
.
offsetX
;
var
offsY
=
tr
[
vro
.
vr
.
r1
].
top
-
tr
[
0
].
top
-
vro
.
offsetY
;
var
cellX
=
tc
[
_c
ol
].
left
-
offsX
,
cellY
=
tr
[
!
isMerged
?
row
:
mc
.
r1
].
top
-
offsY
;
for
(
i
=
_c
ol
;
i
>=
vro
.
vr
.
c1
;
--
i
)
{
var
cellX
=
tc
[
_c
1
].
left
-
offsX
,
cellY
=
tr
[
_
r1
].
top
-
offsY
;
for
(
i
=
_c
1
;
i
>=
vro
.
vr
.
c1
;
--
i
)
{
if
(
t
.
width_1px
<
tc
[
i
].
width
)
{
arrLeftS
.
push
(
tc
[
i
].
left
-
offsX
);
}
}
arrLeftS
.
sort
(
AscCommon
.
fSortDescending
);
// Для замерженных ячеек, можем уйти за границу
if
(
isMerged
&&
_col
>
vro
.
vr
.
c2
)
{
_col
=
vro
.
vr
.
c2
;
}
for
(
i
=
_col
;
i
<=
vro
.
vr
.
c2
;
++
i
)
{
if
(
_c2
>
vro
.
vr
.
c2
)
{
_c2
=
vro
.
vr
.
c2
;
}
for
(
i
=
_c1
;
i
<=
vro
.
vr
.
c2
;
++
i
)
{
w
=
tc
[
i
].
width
;
if
(
t
.
width_1px
<
w
)
{
arrRightS
.
push
(
tc
[
i
].
left
+
w
-
offsX
);
}
if
(
_c2
===
i
)
{
ri
=
arrRightS
.
length
-
1
;
}
}
w
=
t
.
drawingCtx
.
getWidth
();
if
(
arrRightS
[
arrRightS
.
length
-
1
]
>
w
)
{
arrRightS
[
arrRightS
.
length
-
1
]
=
w
;
}
arrRightS
.
sort
(
fSortAscending
);
// Для замерженных ячеек, можем уйти за границу
if
(
isMerged
&&
_row
>
vro
.
vr
.
r2
)
{
_row
=
vro
.
vr
.
r2
;
if
(
_r2
>
vro
.
vr
.
r2
)
{
_r2
=
vro
.
vr
.
r2
;
}
for
(
i
=
_r
ow
;
i
<=
vro
.
vr
.
r2
;
++
i
)
{
for
(
i
=
_r
1
;
i
<=
vro
.
vr
.
r2
;
++
i
)
{
h
=
tr
[
i
].
height
;
if
(
t
.
height_1px
<
h
)
{
arrBottomS
.
push
(
tr
[
i
].
top
+
h
-
offsY
);
}
if
(
_r2
===
i
)
{
bi
=
arrBottomS
.
length
-
1
;
}
}
h
=
t
.
drawingCtx
.
getHeight
();
if
(
arrBottomS
[
arrBottomS
.
length
-
1
]
>
h
)
{
arrBottomS
[
arrBottomS
.
length
-
1
]
=
h
;
}
arrBottomS
.
sort
(
fSortAscending
);
return
{
l
:
arrLeftS
,
r
:
arrRightS
,
b
:
arrBottomS
,
cellX
:
cellX
,
cellY
:
cellY
};
return
{
l
:
arrLeftS
,
r
:
arrRightS
,
b
:
arrBottomS
,
cellX
:
cellX
,
cellY
:
cellY
,
ri
:
ri
,
bi
:
bi
};
}
});
return
true
;
...
...
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