Commit 30e77f80 authored by Julia Radzhabova's avatar Julia Radzhabova

[PE] Баг с превью в полноэкранном режиме при наличии переходов между слайдами.

parent 298880d0
......@@ -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();
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment