/* --------------------- rubberband -------------------- */ SQL.Rubberband = OZ.Class().extend(SQL.Visual); SQL.Rubberband.prototype.init = function(owner) { this.owner = owner; SQL.Visual.prototype.init.apply(this); this.dom.container = OZ.$("rubberband"); OZ.Event.add("area", "mousedown", this.bind(this.down)); } SQL.Rubberband.prototype.down = function(e) { OZ.Event.prevent(e); var scroll = OZ.DOM.scroll(); this.x = this.x0 = e.clientX + scroll[0]; this.y = this.y0 = e.clientY + scroll[1]; 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)); } SQL.Rubberband.prototype.move = function(e) { var scroll = OZ.DOM.scroll(); var x = e.clientX + scroll[0]; var y = e.clientY + scroll[1]; this.width = Math.abs(x-this.x0); this.height = Math.abs(y-this.y0); if (x