rem:  var pt = dlTrafo.invtransform(evtPosition(evt)); var newarea = new Rectangle( pt.x - 0.5 * dlArea.width, pt.y - 0.5 * dlArea.height, dlArea.width, dlArea.height ); newarea.stayInside(dlMaxArea);    if (newarea.equals(dlArea)) return; unregisterEvent("mousedown", elemScaler, moveCenterEvent);  setParamFromArea(newarea); parseArea(); display(); } 
add:  var pt = dlTrafo.invtransform(evtPosition(evt)); var newarea = new Rectangle( pt.x - 0.5 * dlArea.width, pt.y - 0.5 * dlArea.height, dlArea.width, dlArea.height ); newarea.stayInside(dlMaxArea);    if (newarea.equals(dlArea)) return; unregisterEvent("mousedown", scalerImg, moveCenterEvent);  setParamFromArea(newarea); parseArea(); display(); } 
context:     function moveCenterEvent(evt) {        // move to handler        var pt = dlTrafo.invtransform(evtPosition(evt));        var newarea = new Rectangle(            pt.x - 0.5 * dlArea.width,            pt.y - 0.5 * dlArea.height,            dlArea.width,            dlArea.height            );        newarea.stayInside(dlMaxArea);        // newarea = dlMaxArea.fit(newarea);        // debugProps(newarea, "newarea");        // debugProps(dlArea, "dlArea");        if (newarea.equals(dlArea)) return; // keep event handler        unregisterEvent("mousedown", elemScaler, moveCenterEvent);        // set parameters        setParamFromArea(newarea);        parseArea();        display();    }
meta: 7747	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7747/5927e0031d63b488f9d4630e16e2cc2c628c42e2/dllib.js/clean/client/digitallibrary/greyskin/dllib.js