summaryrefslogtreecommitdiffstats
path: root/js/rubberband.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/rubberband.js')
-rw-r--r--js/rubberband.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/js/rubberband.js b/js/rubberband.js
index 1c2d0c2..9a08771 100644
--- a/js/rubberband.js
+++ b/js/rubberband.js
@@ -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) {