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
5038be8a
Commit
5038be8a
authored
Feb 09, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile web excel: new tracks (developing...)
parent
77f2d91b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
cell/view/EventsController.js
cell/view/EventsController.js
+2
-1
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+5
-4
cell/view/mobileTouch.js
cell/view/mobileTouch.js
+7
-5
No files found.
cell/view/EventsController.js
View file @
5038be8a
...
...
@@ -1540,7 +1540,8 @@
// Режим перемещения диапазона
if
(
t
.
isMoveRangeMode
)
{
event
.
currentTarget
.
style
.
cursor
=
ctrlKey
?
"
copy
"
:
"
move
"
;
if
(
event
.
currentTarget
&&
event
.
currentTarget
.
style
)
event
.
currentTarget
.
style
.
cursor
=
ctrlKey
?
"
copy
"
:
"
move
"
;
t
.
_moveRangeHandle
(
event
);
return
true
;
}
...
...
cell/view/WorksheetView.js
View file @
5038be8a
...
...
@@ -5933,11 +5933,11 @@
};
WorksheetView
.
prototype
.
_hitResizeCorner
=
function
(
x1
,
y1
,
x2
,
y2
)
{
var
wEps
=
this
.
width_1px
,
hEps
=
this
.
height_1px
;
var
wEps
=
this
.
width_1px
*
AscCommon
.
global_mouseEvent
.
KoefPixToMM
,
hEps
=
this
.
height_1px
*
AscCommon
.
global_mouseEvent
.
KoefPixToMM
;
return
Math
.
abs
(
x2
-
x1
)
<=
wEps
+
this
.
width_2px
&&
Math
.
abs
(
y2
-
y1
)
<=
hEps
+
this
.
height_2px
;
};
WorksheetView
.
prototype
.
_hitInRange
=
function
(
range
,
rangeType
,
vr
,
x
,
y
,
offsetX
,
offsetY
)
{
var
wEps
=
this
.
width_2px
,
hEps
=
this
.
height_2px
;
var
wEps
=
this
.
width_2px
*
AscCommon
.
global_mouseEvent
.
KoefPixToMM
,
hEps
=
this
.
height_2px
*
AscCommon
.
global_mouseEvent
.
KoefPixToMM
;
var
cursor
,
x1
,
x2
,
y1
,
y2
,
isResize
;
var
col
=
-
1
,
row
=
-
1
;
...
...
@@ -6119,13 +6119,14 @@
offsetY
=
(
y
<
this
.
cellsTop
+
heightDiff
)
?
0
:
offsetY
-
heightDiff
;
}
var
epsChangeSize
=
3
*
AscCommon
.
global_mouseEvent
.
KoefPixToMM
;
if
(
x
<=
this
.
cellsLeft
&&
y
>=
this
.
cellsTop
)
{
r
=
this
.
_findRowUnderCursor
(
y
,
true
);
if
(
r
===
null
)
{
return
oResDefault
;
}
isNotFirst
=
(
r
.
row
!==
(
-
1
!==
rFrozen
?
0
:
this
.
visibleRange
.
r1
));
f
=
!
isViewerMode
&&
(
isNotFirst
&&
y
<
r
.
top
+
3
||
y
>=
r
.
bottom
-
3
);
f
=
!
isViewerMode
&&
(
isNotFirst
&&
y
<
r
.
top
+
epsChangeSize
||
y
>=
r
.
bottom
-
epsChangeSize
);
// ToDo В Excel зависимость epsilon от размера ячейки (у нас фиксированный 3)
return
{
cursor
:
f
?
kCurRowResize
:
kCurRowSelect
,
...
...
@@ -6141,7 +6142,7 @@
return
oResDefault
;
}
isNotFirst
=
c
.
col
!==
(
-
1
!==
cFrozen
?
0
:
this
.
visibleRange
.
c1
);
f
=
!
isViewerMode
&&
(
isNotFirst
&&
x
<
c
.
left
+
3
||
x
>=
c
.
right
-
3
);
f
=
!
isViewerMode
&&
(
isNotFirst
&&
x
<
c
.
left
+
epsChangeSize
||
x
>=
c
.
right
-
epsChangeSize
);
// ToDo В Excel зависимость epsilon от размера ячейки (у нас фиксированный 3)
return
{
cursor
:
f
?
kCurColResize
:
kCurColSelect
,
...
...
cell/view/mobileTouch.js
View file @
5038be8a
...
...
@@ -622,6 +622,9 @@ function (window, undefined)
var
_x2
=
this
.
RectSelect2
.
x
+
this
.
RectSelect2
.
w
-
0.5
;
var
_y2
=
this
.
RectSelect2
.
y
+
this
.
RectSelect2
.
h
-
0.5
;
if
(
this
.
RectSelectType
==
Asc
.
c_oAscSelectionType
.
RangeCol
||
this
.
RectSelectType
==
Asc
.
c_oAscSelectionType
.
RangeRow
)
AscCommon
.
global_mouseEvent
.
KoefPixToMM
=
-
10
;
// чтобы не попасть в движения
if
(
1
==
this
.
DragSelect
)
{
global_mouseEvent
.
Button
=
0
;
...
...
@@ -667,7 +670,7 @@ function (window, undefined)
case
AscCommon
.
MobileTouchMode
.
FlowObj
:
case
AscCommon
.
MobileTouchMode
.
SelectTrack
:
{
if
(
bIsKoefPixToMM
)
if
(
bIsKoefPixToMM
||
this
.
Mode
==
AscCommon
.
MobileTouchMode
.
SelectTrack
)
{
global_mouseEvent
.
KoefPixToMM
=
5
;
}
...
...
@@ -874,10 +877,6 @@ function (window, undefined)
{
// TODO:
this
.
delegate
.
Drawing_OnMouseUp
(
e
.
changedTouches
?
e
.
changedTouches
[
0
]
:
e
);
if
(
AscCommon
.
MobileTouchMode
.
SelectTrack
==
this
.
Mode
)
this
.
delegate
.
Api
.
controller
.
_onMouseLeave
(
e
.
changedTouches
?
e
.
changedTouches
[
0
]
:
e
);
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
None
;
break
;
}
...
...
@@ -897,6 +896,9 @@ function (window, undefined)
this
.
checkPointerMultiTouchRemove
(
e
);
// нужен лив, чтобы сбросить состояния
this
.
delegate
.
Api
.
controller
.
_onMouseLeave
(
e
.
changedTouches
?
e
.
changedTouches
[
0
]
:
e
);
if
(
this
.
Api
.
isViewMode
||
isPreventDefault
)
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
...
...
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