Author: jmorliaguet
Date: Sun Mar 12 19:36:17 2006
New Revision: 2629
Modified:
cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:
- optimizations: we stop event propagation when the event has been handled
Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Sun Mar 12
19:36:17 2006
@@ -673,6 +673,7 @@
} else {
this.moved = draggable;
}
+ this.dragged = draggable;
this.moved.setStyle({'position': 'absolute'});
this.moved.moveTo({'x': this.x0, 'y': this.y0});
@@ -2048,6 +2049,7 @@
} else {
this.active = false;
}
+ Event.stop(e);
},
hideEvent: function(e) {
@@ -2057,6 +2059,7 @@
if (!Position.within(this.area, mouseX, mouseY)) {
this.active = false;
}
+ Event.stop(e);
},
callEvent: function(e) {
@@ -2079,6 +2082,7 @@
}
CPSSkins.notify("command", event);
this.active = false;
+ Event.stop(e);
},
mouseOverEvent: function(e) {
@@ -2094,6 +2098,7 @@
);
$(menu).show();
}
+ Event.stop(e);
}
});
@@ -2164,10 +2169,12 @@
if (!Position.within(this.area, mouseX, mouseY)) {
this.active = false;
}
+ Event.stop(e);
},
mouseOverEvent: function(e) {
this.entered = true;
+ Event.stop(e);
}
});
@@ -2216,12 +2223,14 @@
}
this.show();
+ Event.stop(e);
},
moveEvent: function(e) {
var mouseX = Event.pointerX(e);
var mouseY = Event.pointerY(e);
this.widget.moveTo({'x': mouseX+10, 'y': mouseY+10});
+ Event.stop(e);
},
hideEvent: function(e) {
@@ -2233,6 +2242,7 @@
}
this.hide();
+ Event.stop(e);
}
});
--
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins