[PE] Баг с превью в полноэкранном режиме при наличии переходов между слайдами.
This commit is contained in:
parent
298880d0a6
commit
30e77f802b
|
@ -121,18 +121,23 @@ define([
|
|||
},
|
||||
|
||||
onPreview: function(btn, e) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||
if (previewPanel) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview'),
|
||||
me = this;
|
||||
if (previewPanel && me.api) {
|
||||
previewPanel.show();
|
||||
if (!this.statusbar.mode.isDesktopApp)
|
||||
this.fullScreen(document.documentElement);
|
||||
var onWindowResize = function() {
|
||||
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||
|
||||
if (this.api) {
|
||||
var current = this.api.getCurrentPage();
|
||||
this.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||
var current = me.api.getCurrentPage();
|
||||
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||
|
||||
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) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||
if (previewPanel) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview'),
|
||||
me = this;
|
||||
if (previewPanel && me.api) {
|
||||
previewPanel.show();
|
||||
if (!this.toolbar.mode.isDesktopApp)
|
||||
this.fullScreen(document.documentElement);
|
||||
var onWindowResize = function() {
|
||||
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||
|
||||
if (this.api) {
|
||||
var current = this.api.getCurrentPage();
|
||||
this.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||
var current = me.api.getCurrentPage();
|
||||
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||
|
||||
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) {
|
||||
this.onLayoutChanged('window');
|
||||
Common.NotificationCenter.trigger('window:resize');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -667,13 +667,17 @@ define([
|
|||
e.stopPropagation();
|
||||
if (me.slidesCount>0) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||
if (previewPanel && !previewPanel.isVisible()) {
|
||||
if (previewPanel && !previewPanel.isVisible() && me.api) {
|
||||
previewPanel.show();
|
||||
if (!me.mode.isDesktopApp)
|
||||
me.fullScreen(document.documentElement);
|
||||
if (me.api) {
|
||||
var onWindowResize = function() {
|
||||
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||
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
|
||||
}).on('click', function(item) {
|
||||
var previewPanel = PE.getController('Viewport').getView('DocumentPreview');
|
||||
if (previewPanel) {
|
||||
if (previewPanel && me.api) {
|
||||
previewPanel.show();
|
||||
me.fullScreen(document.documentElement);
|
||||
var onWindowResize = function() {
|
||||
Common.NotificationCenter.off('window:resize', onWindowResize);
|
||||
|
||||
if (me.api) {
|
||||
var current = me.api.getCurrentPage();
|
||||
me.api.StartDemonstration('presentation-preview', _.isNumber(current) ? current : 0);
|
||||
|
||||
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