rem: registerEvent("mouseup", zoomdiv, zoomClick); 
context: function zoomArea() {    var click = 1;    var pt1, pt2;    window.focus();    var zoomdiv = getElement("zoom");    function zoomClick(evt) {        // mouse click handler        if (click == 1) {            // first click -- start moving            click = 2;            pt1 = evtPosition(evt);            moveElement(zoomdiv, Rectangle(pt1.x, pt1.y, 0, 0));            showElement(zoomdiv, true);            // show moving            registerEvent("mousemove", elemScaler, zoomMove);            registerEvent("mousemove", zoomdiv, zoomMove);            // enable drag-to-zoom            registerEvent("mouseup", elemScaler, zoomClick);            registerEvent("mouseup", zoomdiv, zoomClick);        } else {            // second click -- end moving            pt2 = evtPosition(evt);            showElement(zoomdiv, false);            unregisterEvent("mousemove", elemScaler, zoomMove);            unregisterEvent("mousemove", zoomdiv, zoomMove);            unregisterEvent("mousedown", elemScaler, zoomClick);            unregisterEvent("mousedown", zoomdiv, zoomClick);            var p1 = dlTrafo.invtransform(pt1);            var p2 = dlTrafo.invtransform(pt2);            var ww = p2.x-p1.x;            var wh = p2.y-p1.y;            if ((ww > 0)&&(wh > 0)) {                setParameter("wx", cropFloat(p1.x));                setParameter("wy", cropFloat(p1.y));                setParameter("ww", cropFloat(ww));                setParameter("wh", cropFloat(wh));                parseArea();                // zoomed is always fit                setParameter("ws", 1);                display();            }        }    }    function zoomMove(evt) {        // mouse move handler        pt2 = evtPosition(evt);        // restrict marks to move right and down        moveElement(zoomdiv, Rectangle(pt1.x, pt1.y, Math.abs(pt1.x - pt2.x), Math.abs(pt1.y - pt2.y)));    }    // starting event capture    registerEvent("mousedown", elemScaler, zoomClick);    registerEvent("mousedown", zoomdiv, zoomClick);}
meta: 7747	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7747/e4a21a43f1a611cb10c6e0cf23eb20fa1bcbb441/dllib.js/buggy/client/digitallibrary/greyskin/dllib.js