mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
Rename web2d fire event.
This commit is contained in:
parent
892c939376
commit
cb36e97c07
@ -24,7 +24,6 @@ mindplot.NodeGraph = new Class({
|
||||
this._mouseEvents = true;
|
||||
this.setModel(nodeModel);
|
||||
this._onFocus = false;
|
||||
this._event = new Events();
|
||||
this._size = {width:50,height:20};
|
||||
},
|
||||
|
||||
@ -67,7 +66,7 @@ mindplot.NodeGraph = new Class({
|
||||
|
||||
fireEvent: function(type, event) {
|
||||
var elem = this.get2DElement();
|
||||
elem.fireEvent(type, event);
|
||||
elem.toggle(type, event);
|
||||
},
|
||||
|
||||
setMouseEventsEnabled : function(isEnabled) {
|
||||
|
@ -87,8 +87,8 @@ web2d.Element = new Class({
|
||||
this._peer.addEvent(type, listener);
|
||||
},
|
||||
|
||||
fireEvent : function(type, event) {
|
||||
this._peer.fireEvent(type, event);
|
||||
toggle : function(type, event) {
|
||||
this._peer.toggle(type, event);
|
||||
},
|
||||
|
||||
cloneEvents : function(from) {
|
||||
|
@ -89,7 +89,7 @@ web2d.peer.svg.ElementPeer = new Class({
|
||||
$(this._native).bind(type, listener);
|
||||
},
|
||||
|
||||
fireEvent:function (type, event) {
|
||||
toggle:function (type, event) {
|
||||
$(this._native).toggle(type, event);
|
||||
},
|
||||
|
||||
|
@ -118,7 +118,7 @@
|
||||
return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();
|
||||
return this;}});var a=function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase();});};this.Events=new Class({$events:{},addEvent:function(d,c,b){d=a(d);
|
||||
this.$events[d]=(this.$events[d]||[]).include(c);if(b){c.internal=true;}return this;},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this;
|
||||
},fireEvent:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this;}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c);}else{f.apply(this,c);
|
||||
},toggle:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this;}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c);}else{f.apply(this,c);
|
||||
}},this);return this;},removeEvent:function(e,d){e=a(e);var c=this.$events[e];if(c&&!d.internal){var b=c.indexOf(d);if(b!=-1){delete c[b];}}return this;
|
||||
},removeEvents:function(d){var e;if(typeOf(d)=="object"){for(e in d){this.removeEvent(e,d[e]);}return this;}if(d){d=a(d);}for(e in this.$events){if(d&&d!=e){continue;
|
||||
}var c=this.$events[e];for(var b=c.length;b--;){if(b in c){this.removeEvent(e,c[b]);}}}return this;}});this.Options=new Class({setOptions:function(){var b=this.options=Object.merge.apply(null,[{},this.options].append(arguments));
|
||||
|
Loading…
Reference in New Issue
Block a user