remove timeout (reporter mode)
This commit is contained in:
parent
09a49ed246
commit
7e78981a8a
|
@ -158,21 +158,29 @@ define([
|
||||||
this.previewPanel = this.previewPanel || PE.getController('Viewport').getView('DocumentPreview');
|
this.previewPanel = this.previewPanel || PE.getController('Viewport').getView('DocumentPreview');
|
||||||
var me = this,
|
var me = this,
|
||||||
isResized = false;
|
isResized = false;
|
||||||
|
|
||||||
|
var reporterObject = PE.getController('Main').document;
|
||||||
|
|
||||||
if (this.previewPanel && !this.previewPanel.isVisible() && this.api) {
|
if (this.previewPanel && !this.previewPanel.isVisible() && this.api) {
|
||||||
this.previewPanel.show();
|
this.previewPanel.show();
|
||||||
var _onWindowResize = function() {
|
var _onWindowResize = function() {
|
||||||
if (isResized) return;
|
if (isResized) return;
|
||||||
isResized = true;
|
isResized = true;
|
||||||
Common.NotificationCenter.off('window:resize', _onWindowResize);
|
Common.NotificationCenter.off('window:resize', _onWindowResize);
|
||||||
me.api.StartDemonstration('presentation-preview', _.isNumber(slidenum) ? slidenum : 0, PE.getController('Main').document);
|
me.api.StartDemonstration('presentation-preview', _.isNumber(slidenum) ? slidenum : 0, reporterObject);
|
||||||
Common.component.Analytics.trackEvent('Viewport', 'Preview');
|
Common.component.Analytics.trackEvent('Viewport', 'Preview');
|
||||||
};
|
};
|
||||||
if (!me.viewport.mode.isDesktopApp && !Common.Utils.isIE11) {
|
if (!me.viewport.mode.isDesktopApp && !Common.Utils.isIE11) {
|
||||||
Common.NotificationCenter.on('window:resize', _onWindowResize);
|
Common.NotificationCenter.on('window:resize', _onWindowResize);
|
||||||
me.fullScreen(document.documentElement);
|
me.fullScreen(document.documentElement);
|
||||||
setTimeout(function(){
|
|
||||||
|
if (!reporterObject) {
|
||||||
|
setTimeout(function(){
|
||||||
|
_onWindowResize();
|
||||||
|
}, 100);
|
||||||
|
} else {
|
||||||
_onWindowResize();
|
_onWindowResize();
|
||||||
}, 100);
|
}
|
||||||
} else
|
} else
|
||||||
_onWindowResize();
|
_onWindowResize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue