mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-26 21:23:49 +01:00
toolbarItem reimplemented
This commit is contained in:
parent
bb39a9a9d7
commit
0e4d01475d
@ -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';
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user