diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index 156853883..d0f132005 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -246,6 +246,15 @@ define([ } this.separatorFullScreen = el.find('.separator.fullscreen'); + + var controls = $(this.el).find('.preview-controls'); + controls.on('mouseenter', function(e) { + clearTimeout(me.timerMove); + controls.addClass('over'); + }); + controls.on('mouseleave', function(e) { + controls.removeClass('over'); + }); }, show: function() { @@ -263,6 +272,22 @@ define([ iconEl.addClass('btn-pause'); this.btnPlay.updateHint(this.txtPause); } + + var me = this; + var controls = $(this.el).find('.preview-controls'); + controls.css('display', 'none'); + + setTimeout(function(){ + me.$el.on('mousemove', function() { + clearTimeout(me.timerMove); + controls.css('display', ''); + if (!controls.hasClass('over')) + me.timerMove = setTimeout(function () { + controls.css('display', 'none'); + }, 3000); + + }); + }, 1000); $('#viewport-vbox-layout').css('z-index','0'); this.fireEvent('editcomplete', this); }, @@ -279,6 +304,7 @@ define([ toolbar.onCollaborativeChanges(); } + this.$el.off('mousemove'); this.fireEvent('editcomplete', this); }, diff --git a/apps/presentationeditor/main/resources/less/document-preview.less b/apps/presentationeditor/main/resources/less/document-preview.less index a271fd2db..a5f751d95 100644 --- a/apps/presentationeditor/main/resources/less/document-preview.less +++ b/apps/presentationeditor/main/resources/less/document-preview.less @@ -66,7 +66,7 @@ #preview-goto-box { position: fixed; - bottom: 35px; + bottom: 33px; padding: 10px; margin-left: 80px; margin-bottom: 2px;