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
3f229e5a
Commit
3f229e5a
authored
Jul 04, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
995efc5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
4 deletions
+135
-4
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+134
-3
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+1
-1
No files found.
slide/Drawing/DrawingDocument.js
View file @
3f229e5a
...
...
@@ -5462,6 +5462,8 @@ function CNotesDrawer(page)
this
.
fontManager
.
Initialize
(
true
);
this
.
fontManager
.
SetHintsProps
(
true
,
true
);
this
.
m_oTimerScrollSelect
=
-
1
;
var
oThis
=
this
;
this
.
Init
=
function
()
...
...
@@ -5476,6 +5478,12 @@ function CNotesDrawer(page)
_elemOverlay
.
HtmlElement
.
onmousedown
=
this
.
onMouseDown
;
_elemOverlay
.
HtmlElement
.
onmousemove
=
this
.
onMouseMove
;
_elemOverlay
.
HtmlElement
.
onmouseup
=
this
.
onMouseUp
;
this
.
HtmlPage
.
m_oNotesContainer
.
HtmlElement
.
onmousewheel
=
this
.
onMouseWhell
;
if
(
this
.
HtmlPage
.
m_oNotesContainer
.
HtmlElement
.
addEventListener
)
{
this
.
HtmlPage
.
m_oNotesContainer
.
HtmlElement
.
addEventListener
(
"
DOMMouseScroll
"
,
this
.
onMouseWhell
,
false
);
}
};
this
.
OnUpdateOverlay
=
function
()
...
...
@@ -5624,11 +5632,29 @@ function CNotesDrawer(page)
var
_x
=
global_mouseEvent
.
X
-
oThis
.
HtmlPage
.
X
-
((
oThis
.
HtmlPage
.
m_oMainParent
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
var
_y
=
global_mouseEvent
.
Y
-
oThis
.
HtmlPage
.
Y
-
((
oThis
.
HtmlPage
.
m_oNotesContainer
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
console
.
log
(
_x
+
"
,
"
+
_y
);
if
(
-
1
==
oThis
.
m_oTimerScrollSelect
)
{
oThis
.
m_oTimerScrollSelect
=
setInterval
(
oThis
.
onSelectWheel
,
20
);
}
_x
-=
oThis
.
OffsetX
;
_x
*=
g_dKoef_pix_to_mm
;
_y
*=
g_dKoef_pix_to_mm
;
oThis
.
HtmlPage
.
m_oLogicDocument
.
Notes_OnMouseDown
(
global_mouseEvent
,
_x
,
_y
);
};
this
.
onMouseMove
=
function
(
e
)
{
AscCommon
.
check_MouseMoveEvent
(
e
);
if
(
e
)
AscCommon
.
check_MouseMoveEvent
(
e
);
var
_x
=
global_mouseEvent
.
X
-
oThis
.
HtmlPage
.
X
-
((
oThis
.
HtmlPage
.
m_oMainParent
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
var
_y
=
global_mouseEvent
.
Y
-
oThis
.
HtmlPage
.
Y
-
((
oThis
.
HtmlPage
.
m_oNotesContainer
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
_x
-=
oThis
.
OffsetX
;
_x
*=
g_dKoef_pix_to_mm
;
_y
*=
g_dKoef_pix_to_mm
;
oThis
.
HtmlPage
.
m_oLogicDocument
.
Notes_OnMouseMove
(
global_mouseEvent
,
_x
,
_y
);
};
this
.
onMouseUp
=
function
(
e
)
{
...
...
@@ -5637,7 +5663,112 @@ function CNotesDrawer(page)
var
_x
=
global_mouseEvent
.
X
-
oThis
.
HtmlPage
.
X
-
((
oThis
.
HtmlPage
.
m_oMainParent
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
var
_y
=
global_mouseEvent
.
Y
-
oThis
.
HtmlPage
.
Y
-
((
oThis
.
HtmlPage
.
m_oNotesContainer
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
console
.
log
(
_x
+
"
,
"
+
_y
);
if
(
-
1
!=
oThis
.
m_oTimerScrollSelect
)
{
clearInterval
(
oThis
.
m_oTimerScrollSelect
);
oThis
.
m_oTimerScrollSelect
=
-
1
;
}
_x
-=
oThis
.
OffsetX
;
_x
*=
g_dKoef_pix_to_mm
;
_y
*=
g_dKoef_pix_to_mm
;
oThis
.
HtmlPage
.
m_oLogicDocument
.
Notes_OnMouseUp
(
global_mouseEvent
,
_x
,
_y
);
};
this
.
onMouseWhell
=
function
(
e
)
{
if
(
false
===
oThis
.
HtmlPage
.
m_oApi
.
bInit_word_control
)
return
;
var
_ctrl
=
false
;
if
(
e
.
metaKey
!==
undefined
)
_ctrl
=
e
.
ctrlKey
||
e
.
metaKey
;
else
_ctrl
=
e
.
ctrlKey
;
if
(
true
===
_ctrl
)
{
AscCommon
.
stopEvent
(
e
);
return
false
;
}
var
delta
=
0
;
var
deltaX
=
0
;
var
deltaY
=
0
;
if
(
undefined
!=
e
.
wheelDelta
&&
e
.
wheelDelta
!=
0
)
{
//delta = (e.wheelDelta > 0) ? -45 : 45;
delta
=
-
45
*
e
.
wheelDelta
/
120
;
}
else
if
(
undefined
!=
e
.
detail
&&
e
.
detail
!=
0
)
{
//delta = (e.detail > 0) ? 45 : -45;
delta
=
45
*
e
.
detail
/
3
;
}
// New school multidimensional scroll (touchpads) deltas
deltaY
=
delta
;
deltaY
>>=
0
;
if
(
0
!=
deltaY
)
oThis
.
HtmlPage
.
m_oScrollNotes_
.
scrollBy
(
0
,
deltaY
,
false
);
// здесь - имитируем моус мув ---------------------------
var
_e
=
{};
_e
.
pageX
=
global_mouseEvent
.
X
;
_e
.
pageY
=
global_mouseEvent
.
Y
;
_e
.
clientX
=
global_mouseEvent
.
X
;
_e
.
clientY
=
global_mouseEvent
.
Y
;
_e
.
altKey
=
global_mouseEvent
.
AltKey
;
_e
.
shiftKey
=
global_mouseEvent
.
ShiftKey
;
_e
.
ctrlKey
=
global_mouseEvent
.
CtrlKey
;
_e
.
metaKey
=
global_mouseEvent
.
CtrlKey
;
_e
.
srcElement
=
global_mouseEvent
.
Sender
;
oThis
.
onMouseMove
(
_e
);
// ------------------------------------------------------
AscCommon
.
stopEvent
(
e
);
return
false
;
};
this
.
onSelectWheel
=
function
()
{
if
(
false
===
oThis
.
HtmlPage
.
m_oApi
.
bInit_word_control
)
return
;
var
_y
=
global_mouseEvent
.
Y
-
oThis
.
HtmlPage
.
Y
-
((
oThis
.
HtmlPage
.
m_oNotesContainer
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
+
0.5
)
>>
0
);
var
positionMinY
=
0
;
var
positionMaxY
=
oThis
.
HtmlPage
.
m_oNotes
.
AbsolutePosition
.
B
*
g_dKoef_mm_to_pix
;
var
scrollYVal
=
0
;
if
(
_y
<
positionMinY
)
{
var
delta
=
30
;
if
(
20
>
(
positionMinY
-
_y
))
delta
=
10
;
scrollYVal
=
-
delta
;
}
else
if
(
_y
>
positionMaxY
)
{
var
delta
=
30
;
if
(
20
>
(
_y
-
positionMaxY
))
delta
=
10
;
scrollYVal
=
delta
;
}
if
(
0
!=
scrollYVal
)
{
oThis
.
HtmlPage
.
m_oScrollNotes_
.
scrollByY
(
scrollYVal
,
false
);
oThis
.
onMouseMove
();
}
};
this
.
onUpdateTarget
=
function
()
...
...
slide/Editor/Format/Presentation.js
View file @
3f229e5a
...
...
@@ -3262,7 +3262,7 @@ CPresentation.prototype =
var
oCurSlide
=
this
.
Slides
[
this
.
CurPage
];
if
(
oCurSlide
){
if
(
oCurSlide
.
notesShape
){
oCurSlide
.
notesShape
.
selectionSetEnd
(
e
,
x
,
y
,
this
.
CurPage
);
oCurSlide
.
notesShape
.
selectionSetEnd
(
e
,
X
,
Y
,
this
.
CurPage
);
this
.
Notes_UpdateSelectionState
();
}
}
...
...
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