no more OZ.Class(), dedicated pubsub, std bind

This commit is contained in:
Ondrej Zara
2015-06-12 13:11:35 +02:00
parent 6fb6ba452f
commit 097b9e89c9
16 changed files with 159 additions and 171 deletions
+6 -7
View File
@@ -1,13 +1,12 @@
/* --------------------- rubberband -------------------- */
SQL.Rubberband = OZ.Class().extend(SQL.Visual);
SQL.Rubberband.prototype.init = function(owner) {
SQL.Rubberband = function(owner) {
this.owner = owner;
SQL.Visual.prototype.init.apply(this);
SQL.Visual.apply(this);
this.dom.container = OZ.$("rubberband");
OZ.Event.add("area", "mousedown", this.bind(this.down));
OZ.Event.add("area", "mousedown", this.down.bind(this));
}
SQL.Rubberband.prototype = Object.create(SQL.Visual.prototype);
SQL.Rubberband.prototype.down = function(e) {
OZ.Event.prevent(e);
@@ -17,8 +16,8 @@ SQL.Rubberband.prototype.down = function(e) {
this.width = 0;
this.height = 0;
this.redraw();
this.documentMove = OZ.Event.add(document, "mousemove", this.bind(this.move));
this.documentUp = OZ.Event.add(document, "mouseup", this.bind(this.up));
this.documentMove = OZ.Event.add(document, "mousemove", this.move.bind(this));
this.documentUp = OZ.Event.add(document, "mouseup", this.up.bind(this));
}
SQL.Rubberband.prototype.move = function(e) {