mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
remove .bind method from IconGroup
This commit is contained in:
parent
78e05e6aaf
commit
b550f7892e
@ -166,13 +166,15 @@ mindplot.IconGroup.RemoveTip = new Class({
|
|||||||
icon.remove();
|
icon.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
|
||||||
widget.addEvent('mouseover', function () {
|
widget.addEvent('mouseover', function () {
|
||||||
this.show(topicId, icon);
|
me.show(topicId, icon);
|
||||||
}.bind(this));
|
});
|
||||||
|
|
||||||
widget.addEvent('mouseout', function () {
|
widget.addEvent('mouseout', function () {
|
||||||
this.hide();
|
me.hide();
|
||||||
}.bind(this));
|
});
|
||||||
|
|
||||||
widget.setPosition(pos.x + 80, pos.y - 50);
|
widget.setPosition(pos.x + 80, pos.y - 50);
|
||||||
this._fadeElem.append(widget);
|
this._fadeElem.append(widget);
|
||||||
@ -197,17 +199,15 @@ mindplot.IconGroup.RemoveTip = new Class({
|
|||||||
clearTimeout(this._closeTimeoutId)
|
clearTimeout(this._closeTimeoutId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var me = this;
|
||||||
if (this._activeIcon) {
|
if (this._activeIcon) {
|
||||||
var widget = this._widget;
|
var widget = this._widget;
|
||||||
var close = function () {
|
var close = function () {
|
||||||
|
me._activeIcon = null;
|
||||||
this._activeIcon = null;
|
me._fadeElem.removeChild(widget);
|
||||||
this._fadeElem.removeChild(widget);
|
me._widget = null;
|
||||||
this._widget = null;
|
me._closeTimeoutId = null;
|
||||||
|
};
|
||||||
this._closeTimeoutId = null;
|
|
||||||
|
|
||||||
}.bind(this);
|
|
||||||
|
|
||||||
if (!$defined(delay) || delay == 0) {
|
if (!$defined(delay) || delay == 0) {
|
||||||
close();
|
close();
|
||||||
@ -273,14 +273,16 @@ mindplot.IconGroup.RemoveTip = new Class({
|
|||||||
|
|
||||||
decorate:function (topicId, icon) {
|
decorate:function (topicId, icon) {
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
|
||||||
if (!icon.__remove) {
|
if (!icon.__remove) {
|
||||||
icon.addEvent('mouseover', function () {
|
icon.addEvent('mouseover', function () {
|
||||||
this.show(topicId, icon);
|
me.show(topicId, icon);
|
||||||
}.bind(this));
|
});
|
||||||
|
|
||||||
icon.addEvent('mouseout', function () {
|
icon.addEvent('mouseout', function () {
|
||||||
this.hide();
|
me.hide();
|
||||||
}.bind(this));
|
});
|
||||||
icon.__remove = true;
|
icon.__remove = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user