[PE] Баг с превью в полноэкранном режиме при наличии переходов между слайдами.
This commit is contained in:
parent
298880d0a6
commit
30e77f802b
|
@ -121,18 +121,23 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPreview: function(btn, e) {
|
onPreview: function(btn, e) {
|
||||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
var previewPanel = PE.getController('Viewport').getView('DocumentPreview'),
|
||||||
if (previewPanel) {
|
me = this;
|
||||||
|
if (previewPanel && me.api) {
|
||||||
previewPanel.show();
|
previewPanel.show();
|
||||||
if (!this.statusbar.mode.isDesktopApp)
|
var onWindowResize = function() {
|
||||||
this.fullScreen(document.documentElement);
|
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||||
|
|
||||||
if (this.api) {
|
var current = me.api.getCurrentPage();
|
||||||
var current = this.api.getCurrentPage();
|
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||||
this.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('Status Bar', 'Preview');
|
Common.component.Analytics.trackEvent('Status Bar', 'Preview');
|
||||||
}
|
};
|
||||||
|
if (!me.statusbar.mode.isDesktopApp) {
|
||||||
|
Common.NotificationCenter.on('window:resize', onWindowResize);
|
||||||
|
me.fullScreen(document.documentElement);
|
||||||
|
} else
|
||||||
|
onWindowResize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -737,18 +737,23 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onPreview: function(btn, e) {
|
onPreview: function(btn, e) {
|
||||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
var previewPanel = PE.getController('Viewport').getView('DocumentPreview'),
|
||||||
if (previewPanel) {
|
me = this;
|
||||||
|
if (previewPanel && me.api) {
|
||||||
previewPanel.show();
|
previewPanel.show();
|
||||||
if (!this.toolbar.mode.isDesktopApp)
|
var onWindowResize = function() {
|
||||||
this.fullScreen(document.documentElement);
|
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||||
|
|
||||||
if (this.api) {
|
var current = me.api.getCurrentPage();
|
||||||
var current = this.api.getCurrentPage();
|
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||||
this.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Preview');
|
Common.component.Analytics.trackEvent('ToolBar', 'Preview');
|
||||||
}
|
};
|
||||||
|
if (!me.toolbar.mode.isDesktopApp) {
|
||||||
|
Common.NotificationCenter.on('window:resize', onWindowResize);
|
||||||
|
me.fullScreen(document.documentElement);
|
||||||
|
} else
|
||||||
|
onWindowResize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ define([
|
||||||
|
|
||||||
onWindowResize: function(e) {
|
onWindowResize: function(e) {
|
||||||
this.onLayoutChanged('window');
|
this.onLayoutChanged('window');
|
||||||
|
Common.NotificationCenter.trigger('window:resize');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -667,13 +667,17 @@ define([
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (me.slidesCount>0) {
|
if (me.slidesCount>0) {
|
||||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||||
if (previewPanel && !previewPanel.isVisible()) {
|
if (previewPanel && !previewPanel.isVisible() && me.api) {
|
||||||
previewPanel.show();
|
previewPanel.show();
|
||||||
if (!me.mode.isDesktopApp)
|
var onWindowResize = function() {
|
||||||
me.fullScreen(document.documentElement);
|
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||||
if (me.api) {
|
|
||||||
me.api.StartDemonstration('presentation-preview', 0);
|
me.api.StartDemonstration('presentation-preview', 0);
|
||||||
}
|
};
|
||||||
|
if (!me.mode.isDesktopApp) {
|
||||||
|
Common.NotificationCenter.on('window:resize', onWindowResize);
|
||||||
|
me.fullScreen(document.documentElement);
|
||||||
|
} else
|
||||||
|
onWindowResize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -924,16 +928,21 @@ define([
|
||||||
caption : me.txtPreview
|
caption : me.txtPreview
|
||||||
}).on('click', function(item) {
|
}).on('click', function(item) {
|
||||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||||
if (previewPanel) {
|
if (previewPanel && me.api) {
|
||||||
previewPanel.show();
|
previewPanel.show();
|
||||||
me.fullScreen(document.documentElement);
|
var onWindowResize = function() {
|
||||||
|
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||||
|
|
||||||
if (me.api) {
|
|
||||||
var current = me.api.getCurrentPage();
|
var current = me.api.getCurrentPage();
|
||||||
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||||
|
|
||||||
Common.component.Analytics.trackEvent('DocumentHolder', 'Preview');
|
Common.component.Analytics.trackEvent('DocumentHolder', 'Preview');
|
||||||
}
|
};
|
||||||
|
if (!me.mode.isDesktopApp) {
|
||||||
|
Common.NotificationCenter.on('window:resize', onWindowResize);
|
||||||
|
me.fullScreen(document.documentElement);
|
||||||
|
} else
|
||||||
|
onWindowResize();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue