mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 07:31:55 +08:00
[PE mobile] Added edits to preview
This commit is contained in:
@ -17,14 +17,15 @@ const PreviewController = props => {
|
||||
};
|
||||
|
||||
ContextMenu.closeContextMenu();
|
||||
show();
|
||||
onDocumentReady();
|
||||
|
||||
_view = $$('#pe-preview');
|
||||
_view.on('touchstart', onTouchStart);
|
||||
_view.on('touchmove', onTouchMove);
|
||||
_view.on('touchend', onTouchEnd);
|
||||
|
||||
show();
|
||||
onDocumentReady();
|
||||
|
||||
return () => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
@ -49,10 +50,10 @@ const PreviewController = props => {
|
||||
}
|
||||
|
||||
const exitFullScreen = () => {
|
||||
const exitFullscreen = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen;
|
||||
const requestExitFullScreen = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen;
|
||||
|
||||
if (exitFullscreen) {
|
||||
exitFullscreen.call(document).catch(err => {
|
||||
if (requestExitFullScreen) {
|
||||
requestExitFullScreen.call(document).catch(err => {
|
||||
console.error(`Error attempting to exit full screen mode: ${err.message} (${err.name})`);
|
||||
});
|
||||
} else {
|
||||
@ -62,8 +63,9 @@ const PreviewController = props => {
|
||||
|
||||
const show = () => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
api.StartDemonstration('presentation-preview', api.getCurrentPage());
|
||||
enterFullScreen(document.documentElement);
|
||||
enterFullScreen(_view[0]);
|
||||
};
|
||||
|
||||
const onTouchStart = e => {
|
||||
@ -109,7 +111,7 @@ const PreviewController = props => {
|
||||
|
||||
const onEndDemonstration = () => {
|
||||
props.closeOptions('preview');
|
||||
exitFullScreen(document.documentElement);
|
||||
exitFullScreen();
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user