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
dc1f60de
Commit
dc1f60de
authored
Sep 09, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cursor on formula selection in frozen range
parent
292c1d31
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+27
-10
No files found.
cell/view/WorksheetView.js
View file @
dc1f60de
...
@@ -3561,7 +3561,7 @@
...
@@ -3561,7 +3561,7 @@
var
ppiX
=
this
.
_getPPIX
(),
ppiY
=
this
.
_getPPIY
();
var
ppiX
=
this
.
_getPPIX
(),
ppiY
=
this
.
_getPPIY
();
if
(
!
oIntersection
)
{
if
(
!
oIntersection
)
{
return
;
return
true
;
}
}
var
width_1px
=
asc_calcnpt
(
0
,
ppiX
,
1
/*px*/
),
width_2px
=
asc_calcnpt
(
0
,
ppiX
,
2
var
width_1px
=
asc_calcnpt
(
0
,
ppiX
,
1
/*px*/
),
width_2px
=
asc_calcnpt
(
0
,
ppiX
,
2
...
@@ -3682,12 +3682,13 @@
...
@@ -3682,12 +3682,13 @@
ctx
.
fillRect
(
x2
-
width_3px
,
y2
-
height_3px
,
width_5px
,
height_5px
);
ctx
.
fillRect
(
x2
-
width_3px
,
y2
-
height_3px
,
width_5px
,
height_5px
);
}
}
}
}
return
true
;
};
};
/**Отрисовывает диапазон с заданными параметрами*/
/**Отрисовывает диапазон с заданными параметрами*/
WorksheetView
.
prototype
.
_drawElements
=
function
(
drawFunction
)
{
WorksheetView
.
prototype
.
_drawElements
=
function
(
drawFunction
)
{
var
cFrozen
=
0
,
rFrozen
=
0
,
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
var
cFrozen
=
0
,
rFrozen
=
0
,
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
),
c
=
this
.
cols
,
r
=
this
.
rows
,
offsetX
=
c
[
this
.
visibleRange
.
c1
].
left
-
1
),
c
=
this
.
cols
,
r
=
this
.
rows
,
offsetX
=
c
[
this
.
visibleRange
.
c1
].
left
-
this
.
cellsLeft
,
offsetY
=
r
[
this
.
visibleRange
.
r1
].
top
-
this
.
cellsTop
;
this
.
cellsLeft
,
offsetY
=
r
[
this
.
visibleRange
.
r1
].
top
-
this
.
cellsTop
,
res
;
if
(
this
.
topLeftFrozenCell
)
{
if
(
this
.
topLeftFrozenCell
)
{
cFrozen
=
this
.
topLeftFrozenCell
.
getCol0
();
cFrozen
=
this
.
topLeftFrozenCell
.
getCol0
();
rFrozen
=
this
.
topLeftFrozenCell
.
getRow0
();
rFrozen
=
this
.
topLeftFrozenCell
.
getRow0
();
...
@@ -3699,15 +3700,24 @@
...
@@ -3699,15 +3700,24 @@
rFrozen
-=
1
;
rFrozen
-=
1
;
if
(
0
<=
cFrozen
&&
0
<=
rFrozen
)
{
if
(
0
<=
cFrozen
&&
0
<=
rFrozen
)
{
oFrozenRange
=
new
asc_Range
(
0
,
0
,
cFrozen
,
rFrozen
);
oFrozenRange
=
new
asc_Range
(
0
,
0
,
cFrozen
,
rFrozen
);
drawFunction
.
call
(
this
,
oFrozenRange
,
c
[
0
].
left
-
this
.
cellsLeft
,
r
[
0
].
top
-
this
.
cellsTop
,
args
);
res
=
drawFunction
.
call
(
this
,
oFrozenRange
,
c
[
0
].
left
-
this
.
cellsLeft
,
r
[
0
].
top
-
this
.
cellsTop
,
args
);
if
(
!
res
)
{
return
;
}
}
}
if
(
0
<=
cFrozen
)
{
if
(
0
<=
cFrozen
)
{
oFrozenRange
=
new
asc_Range
(
0
,
this
.
visibleRange
.
r1
,
cFrozen
,
this
.
visibleRange
.
r2
);
oFrozenRange
=
new
asc_Range
(
0
,
this
.
visibleRange
.
r1
,
cFrozen
,
this
.
visibleRange
.
r2
);
drawFunction
.
call
(
this
,
oFrozenRange
,
c
[
0
].
left
-
this
.
cellsLeft
,
offsetY
,
args
);
res
=
drawFunction
.
call
(
this
,
oFrozenRange
,
c
[
0
].
left
-
this
.
cellsLeft
,
offsetY
,
args
);
if
(
!
res
)
{
return
;
}
}
}
if
(
0
<=
rFrozen
)
{
if
(
0
<=
rFrozen
)
{
oFrozenRange
=
new
asc_Range
(
this
.
visibleRange
.
c1
,
0
,
this
.
visibleRange
.
c2
,
rFrozen
);
oFrozenRange
=
new
asc_Range
(
this
.
visibleRange
.
c1
,
0
,
this
.
visibleRange
.
c2
,
rFrozen
);
drawFunction
.
call
(
this
,
oFrozenRange
,
offsetX
,
r
[
0
].
top
-
this
.
cellsTop
,
args
);
res
=
drawFunction
.
call
(
this
,
oFrozenRange
,
offsetX
,
r
[
0
].
top
-
this
.
cellsTop
,
args
);
if
(
!
res
)
{
return
;
}
}
}
}
}
...
@@ -6272,10 +6282,12 @@
...
@@ -6272,10 +6282,12 @@
col
=
oFormulaRange
.
c1
;
col
=
oFormulaRange
.
c1
;
row
=
oFormulaRange
.
r1
;
row
=
oFormulaRange
.
r1
;
break
;
break
;
}
else
if
(((
Math
.
abs
(
x
-
xFormula1
)
<=
wEps
||
Math
.
abs
(
x
-
xFormula2
)
<=
wEps
)
&&
}
else
if
((((
oFormulaRange
.
c1
===
oFormulaRangeIn
.
c1
&&
Math
.
abs
(
x
-
xFormula1
)
<=
wEps
)
||
(
oFormulaRange
.
c2
===
oFormulaRangeIn
.
c2
&&
Math
.
abs
(
x
-
xFormula2
)
<=
wEps
))
&&
hEps
<=
y
-
yFormula1
&&
y
-
yFormula2
<=
hEps
)
||
hEps
<=
y
-
yFormula1
&&
y
-
yFormula2
<=
hEps
)
||
((
Math
.
abs
(
y
-
yFormula1
)
<=
hEps
||
Math
.
abs
(
y
-
yFormula2
)
<=
hEps
)
&&
wEps
<=
x
-
xFormula1
&&
(((
oFormulaRange
.
r1
===
oFormulaRangeIn
.
r1
&&
Math
.
abs
(
y
-
yFormula1
)
<=
hEps
)
||
x
-
xFormula2
<=
wEps
))
{
(
oFormulaRange
.
r2
===
oFormulaRangeIn
.
r2
&&
Math
.
abs
(
y
-
yFormula2
)
<=
hEps
))
&&
wEps
<=
x
-
xFormula1
&&
x
-
xFormula2
<=
wEps
))
{
cursor
=
kCurMove
;
cursor
=
kCurMove
;
break
;
break
;
}
}
...
@@ -6463,7 +6475,10 @@
...
@@ -6463,7 +6475,10 @@
}
}
if
(
this
.
isFormulaEditMode
||
this
.
isChartAreaEditMode
)
{
if
(
this
.
isFormulaEditMode
||
this
.
isChartAreaEditMode
)
{
var
oFormulaOrChartCursor
=
this
.
_getCursorFormulaOrChart
(
this
.
visibleRange
,
x
,
y
,
offsetX
,
offsetY
);
var
oFormulaOrChartCursor
;
this
.
_drawElements
(
function
(
_vr
,
_offsetX
,
_offsetY
,
args
)
{
return
(
null
===
(
oFormulaOrChartCursor
=
this
.
_getCursorFormulaOrChart
(
_vr
,
x
,
y
,
_offsetX
,
_offsetY
)));
});
if
(
oFormulaOrChartCursor
)
{
if
(
oFormulaOrChartCursor
)
{
return
oFormulaOrChartCursor
;
return
oFormulaOrChartCursor
;
}
}
...
@@ -12486,7 +12501,7 @@
...
@@ -12486,7 +12501,7 @@
var
m_oColor
=
new
CColor
(
120
,
120
,
120
);
var
m_oColor
=
new
CColor
(
120
,
120
,
120
);
if
(
aWs
.
workbook
.
bUndoChanges
||
aWs
.
workbook
.
bRedoChanges
)
{
if
(
aWs
.
workbook
.
bUndoChanges
||
aWs
.
workbook
.
bRedoChanges
)
{
return
;
return
false
;
}
}
var
_drawFilterMark
=
function
(
x
,
y
,
height
,
index
)
{
var
_drawFilterMark
=
function
(
x
,
y
,
height
,
index
)
{
...
@@ -12672,6 +12687,8 @@
...
@@ -12672,6 +12687,8 @@
}
}
}
}
}
}
return
true
;
};
};
WorksheetView
.
prototype
.
af_checkCursor
=
function
(
x
,
y
,
offsetX
,
offsetY
,
frozenObj
,
r
,
c
)
{
WorksheetView
.
prototype
.
af_checkCursor
=
function
(
x
,
y
,
offsetX
,
offsetY
,
frozenObj
,
r
,
c
)
{
...
...
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