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
726c80c3
Commit
726c80c3
authored
Jul 25, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reporter mode developing...
parent
f0c9151b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
44 deletions
+148
-44
common/Drawings/WorkEvents.js
common/Drawings/WorkEvents.js
+2
-0
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+5
-0
slide/Drawing/Transitions.js
slide/Drawing/Transitions.js
+104
-44
slide/api.js
slide/api.js
+37
-0
No files found.
common/Drawings/WorkEvents.js
View file @
726c80c3
...
...
@@ -56,6 +56,8 @@
AscCommon
.
stopEvent
=
function
(
e
)
{
if
(
!
e
)
return
;
if
(
e
.
preventDefault
)
e
.
preventDefault
();
if
(
e
.
stopPropagation
)
...
...
slide/Drawing/HtmlPage.js
View file @
726c80c3
...
...
@@ -785,6 +785,11 @@ function CEditorPage(api)
window
.
onkeydown
=
this
.
onKeyDown
;
window
.
onkeyup
=
this
.
onKeyUp
;
if
(
window
.
attachEvent
)
window
.
attachEvent
(
'
onmessage
'
,
this
.
m_oApi
.
DemonstrationToReporterMessages
);
else
window
.
addEventListener
(
'
message
'
,
this
.
m_oApi
.
DemonstrationToReporterMessages
,
false
);
}
// --------------------------------------------------------------------------
...
...
slide/Drawing/Transitions.js
View file @
726c80c3
...
...
@@ -3215,6 +3215,9 @@ function CDemonstrationManager(htmlpage)
if
(
!
this
.
Mode
)
return
;
if
(
this
.
HtmlPage
.
m_oApi
.
isReporterMode
)
window
.
postMessage
(
"
{
\"
reporter_command
\"
:
\"
go_to_slide
\"
,
\"
slide
\"
:
"
+
slideNum
+
"
}
"
,
"
*
"
);
this
.
CorrectSlideNum
();
if
((
slideNum
==
this
.
SlideNum
)
||
(
slideNum
<
0
)
||
(
slideNum
>=
this
.
SlidesCount
))
...
...
@@ -3242,11 +3245,9 @@ function CDemonstrationManager(htmlpage)
}
// manipulators
this
.
onKeyDown
=
function
(
e
)
this
.
onKeyDown
Code
=
function
(
cod
e
)
{
AscCommon
.
check_KeyboardEvent
(
e
);
switch
(
AscCommon
.
global_keyboardEvent
.
KeyCode
)
switch
(
code
)
{
case
13
:
// enter
case
32
:
// space
...
...
@@ -3282,6 +3283,25 @@ function CDemonstrationManager(htmlpage)
default
:
break
;
}
}
this
.
onKeyDown
=
function
(
e
)
{
AscCommon
.
check_KeyboardEvent
(
e
);
if
(
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
)
{
var
_msg_
=
{
"
main_command
"
:
true
,
"
keyCode
"
:
AscCommon
.
global_keyboardEvent
.
KeyCode
};
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
.
postMessage
(
JSON
.
stringify
(
_msg_
),
"
*
"
);
oThis
.
HtmlPage
.
IsKeyDownButNoPress
=
true
;
return
false
;
}
this
.
onKeyDownCode
(
AscCommon
.
global_keyboardEvent
.
KeyCode
);
oThis
.
HtmlPage
.
IsKeyDownButNoPress
=
true
;
return
false
;
...
...
@@ -3301,6 +3321,19 @@ function CDemonstrationManager(htmlpage)
this
.
onMouseUp
=
function
(
e
)
{
if
(
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
)
{
var
_msg_
=
{
"
main_command
"
:
true
,
"
mouseUp
"
:
true
};
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
.
postMessage
(
JSON
.
stringify
(
_msg_
),
"
*
"
);
AscCommon
.
stopEvent
(
e
);
return
false
;
}
// next slide
oThis
.
CorrectSlideNum
();
...
...
@@ -3327,10 +3360,22 @@ function CDemonstrationManager(htmlpage)
}
}
e
.
preventDefault
(
);
AscCommon
.
stopEvent
(
e
);
return
false
;
}
this
.
onMouseWheelDelta
=
function
(
delta
)
{
if
(
delta
>
0
)
{
this
.
NextSlide
();
}
else
{
this
.
PrevSlide
();
}
}
this
.
onMouseWhell
=
function
(
e
)
{
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
...
...
@@ -3345,21 +3390,36 @@ function CDemonstrationManager(htmlpage)
else
delta
=
(
e
.
detail
>
0
)
?
1
:
-
1
;
if
(
delta
>
0
)
{
oThis
.
NextSlide
();
}
else
if
(
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
)
{
oThis
.
PrevSlide
();
var
_msg_
=
{
"
main_command
"
:
true
,
"
mouseWhell
"
:
delta
};
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
.
postMessage
(
JSON
.
stringify
(
_msg_
),
"
*
"
);
AscCommon
.
stopEvent
(
e
);
return
false
;
}
e
.
preventDefault
();
oThis
.
onMouseWheelDelta
(
delta
);
AscCommon
.
stopEvent
(
e
);
return
false
;
}
this
.
Resize
=
function
()
{
if
(
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
)
{
var
_msg_
=
{
"
main_command
"
:
true
,
"
resize
"
:
true
};
oThis
.
HtmlPage
.
m_oApi
.
reporterWindow
.
postMessage
(
JSON
.
stringify
(
_msg_
),
"
*
"
);
}
if
(
!
this
.
Mode
)
return
;
...
...
slide/api.js
View file @
726c80c3
...
...
@@ -5945,6 +5945,10 @@ background-repeat: no-repeat;\
_this
.
DemonstrationGoToSlide
(
_obj
[
"
slide
"
]);
break
;
}
case
"
go_to_slide
"
:
{
_this
.
WordControl
.
DemonstrationManager
.
GoToSlide
(
_obj
[
"
slide
"
]);
}
default
:
break
;
}
...
...
@@ -5954,6 +5958,39 @@ background-repeat: no-repeat;\
}
};
asc_docs_api
.
prototype
.
DemonstrationToReporterMessages
=
function
(
e
)
{
var
_this
=
window
.
editor
;
try
{
var
_obj
=
JSON
.
parse
(
e
.
data
);
if
(
undefined
==
_obj
[
"
main_command
"
])
return
;
if
(
undefined
!==
_obj
[
"
keyCode
"
])
{
_this
.
WordControl
.
DemonstrationManager
.
onKeyDownCode
(
_obj
[
"
keyCode
"
]);
}
else
if
(
undefined
!==
_obj
[
"
mouseUp
"
])
{
_this
.
WordControl
.
DemonstrationManager
.
onMouseUp
({});
}
else
if
(
undefined
!==
_obj
[
"
mouseWhell
"
])
{
_this
.
WordControl
.
DemonstrationManager
.
onMouseWheelDelta
(
_obj
[
"
mouseWhell
"
]);
}
else
if
(
undefined
!==
_obj
[
"
resize
"
])
{
_this
.
WordControl
.
DemonstrationManager
.
Resize
();
}
}
catch
(
err
)
{
}
};
asc_docs_api
.
prototype
.
DemonstrationPlay
=
function
()
{
if
(
undefined
!==
this
.
EndShowMessage
)
...
...
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