From 7713fd33a3cc589fb66bce5cb06c7b3555f2302f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 4 Dec 2021 13:42:21 +0300 Subject: [PATCH] [PE] Fix Bug 54127 --- .../presentationeditor/main/app/view/DocumentHolder.js | 10 +++++++++- .../main/app/view/DocumentPreview.js | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index 063930144..65f523a00 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -439,6 +439,14 @@ define([ /** coauthoring end **/ me.hideTips(); onDocumentHolderResize(); + }, + 'preview:show': function(e){ + me.isPreviewVisible = true; + screenTip && (screenTip.tipLength = -1); // redraw link tip + }, + 'preview:hide': function(e){ + me.isPreviewVisible = false; + screenTip && (screenTip.tipLength = -1); // redraw link tip } }); @@ -508,7 +516,7 @@ define([ ToolTip = ToolTip.substr(0, 256) + '...'; if (screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) { - screenTip.toolTip.setTitle(ToolTip + '
' + me.txtPressLink + ''); + screenTip.toolTip.setTitle(ToolTip + (me.isPreviewVisible ? '' : '
' + me.txtPressLink + '')); screenTip.tipLength = ToolTip.length; screenTip.strTip = ToolTip; recalc = true; diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index eb3806fed..746045778 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -308,6 +308,7 @@ define([ }, 1000); $('#viewport-vbox-layout').css('z-index','0'); this.fireEvent('editcomplete', this); + Common.NotificationCenter.trigger('preview:show'); }, hide: function() { @@ -324,6 +325,7 @@ define([ this.$el.off('mousemove'); this.fireEvent('editcomplete', this); + Common.NotificationCenter.trigger('preview:hide'); }, setApi: function(o) {