From 715d3d49b6d11744df849149af27cbd45ab0ac13 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 27 Apr 2014 23:59:35 -0300 Subject: [PATCH] toolbarItem reimplemented --- .../main/javascript/widget/ToolbarPaneItem.js | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js index bf52a92b..0fce6b2e 100644 --- a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js +++ b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js @@ -42,36 +42,24 @@ mindplot.widget.ToolbarPaneItem = new Class({ panelElem.css('cursor', 'default'); var buttonElem = this.getButtonElem(); - var item = this; + var me = this; this._tip = new mindplot.widget.FloatingTip(buttonElem, { html: true, - position: 'bottom', - arrowOffset : 5, - center: true, - arrowSize: 7, - showDelay: 0, - hideDelay: 0, + placement: 'bottom', content: function() { - return item._updateSelectedItem(); - }.bind(this), + return me._updateSelectedItem(); + }, className: 'toolbarPaneTip', - motionOnShow:false, - motionOnHide:false, - motion: 0, - distance: 0, - showOn: 'xxxx', - hideOn: 'xxxx', - preventHideOnOver:true, - offset: {x:-4,y:0} + trigger: 'manual' }); this._tip.addEvent('hide', function() { - this._visible = false - }.bind(this)); + me._visible = false + }); this._tip.addEvent('show', function() { - this._visible = true - }.bind(this)); + me._visible = true + }); return panelElem; }, @@ -87,7 +75,7 @@ mindplot.widget.ToolbarPaneItem = new Class({ show : function() { if (!this.isVisible()) { this.parent(); - this._tip.show(this.getButtonElem()); + this._tip.show(); this.getButtonElem().className = 'buttonExtActive'; } }, @@ -95,7 +83,7 @@ mindplot.widget.ToolbarPaneItem = new Class({ hide : function() { if (this.isVisible()) { this.parent(); - this._tip.hide(this.getButtonElem()); + this._tip.hide(); this.getButtonElem().className = 'buttonExtOn'; } },