diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index f552d2204a..2ab50e74f9 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -630,6 +630,22 @@ define([ updateThemeColors: function (){ this.view.updateColors(); + }, + + getAnimationPanelTip: function (effect) { + var result; + if (effect) { + var nodeType = effect[0] === AscFormat.NODE_TYPE_CLICKEFFECT ? this.view.textStartOnClick : + (effect[0] === AscFormat.NODE_TYPE_WITHEFFECT ? this.view.textStartWithPrevious : + (effect[0] === AscFormat.NODE_TYPE_AFTEREFFECT ? this.view.textStartAfterPrevious : '')); + var presetClass = _.findWhere(Common.define.effectData.getEffectGroupData(), {value: effect[1]}); + presetClass = presetClass ? presetClass.caption : ''; + var preset = _.findWhere(Common.define.effectData.getEffectData(), {value: effect[2]}); + preset = preset ? preset.displayValue : ''; + var name = effect[3] || ''; + result = nodeType + '\n' + presetClass + '\n' + preset + ' : ' + name; + } + return result; } }, PE.Controllers.Animation || {})); diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js index d47f5081b8..53f60049a0 100644 --- a/apps/presentationeditor/main/app/controller/DocumentHolder.js +++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js @@ -493,12 +493,16 @@ define([ } if (event.get_Type() == Asc.c_oAscContextMenuTypes.AnimEffect) { - showPoint[0] += event.get_ButtonWidth() + 2; - showPoint[1] += event.get_ButtonHeight() + 2; - menu.menuAlign = 'tr-br'; - if (me.documentHolder.cmpEl.offset().top + showPoint[1] + menu.menuRoot.outerHeight() > Common.Utils.innerHeight() - 10) { - showPoint[1] -= event.get_ButtonHeight() + 4; - menu.menuAlign = 'br-tr'; + if (event.get_ButtonWidth()) { + showPoint[0] += event.get_ButtonWidth() + 2; + showPoint[1] += event.get_ButtonHeight() + 2; + menu.menuAlign = 'tr-br'; + if (me.documentHolder.cmpEl.offset().top + showPoint[1] + menu.menuRoot.outerHeight() > Common.Utils.innerHeight() - 10) { + showPoint[1] -= event.get_ButtonHeight() + 4; + menu.menuAlign = 'br-tr'; + } + } else { + menu.menuAlign = 'tl-tr'; } } @@ -948,7 +952,11 @@ define([ break; } } else if (type===Asc.c_oAscMouseMoveDataTypes.EffectInfo) { - ToolTip = moveData.get_Info(); + var tip = moveData.get_EffectText(); + if (!tip) { + tip = me.getApplication().getController('Animation').getAnimationPanelTip(moveData.get_EffectDescription()) || ''; + } + ToolTip = tip; } var recalc = false; screenTip.isHidden = false; diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index a1391e9147..f14c0d4d16 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -2474,7 +2474,6 @@ define([ me.animEffectMenu = new Common.UI.Menu({ restoreHeightAndTop: true, scrollToCheckedItem: false, - menuAlign: 'tr-br', style: 'min-width: auto;', initMenu: function(value){ me.menuAnimStartOnClick.setChecked(value.effect === AscFormat.NODE_TYPE_CLICKEFFECT, true);