rem: moveElement(zoomdiv, getRect(pt1, pt2)); 
add: moveElement(zoomdiv, rect); 
context: function zoomArea() {    var pt1, pt2;    var zoomdiv = getElement("zoom");    var overlay = getElement("overlay");    // use overlay div to avoid <img> mousemove problems    var rect = getElementRect(picElem);    // FIX ME: is there a way to query the border width from CSS info?    // rect.x -= 2; // account for overlay borders    // rect.y -= 2;    moveElement(overlay, rect);    showElement(overlay, true);    // start event capturing    registerEvent("mousedown", overlay, zoomStart);    registerEvent("mousedown", elemScaler, zoomStart);    window.focus();// mousedown handler: start moving    function zoomStart(evt) {        pt1 = evtPosition(evt);        unregisterEvent("mousedown", overlay, zoomStart);        unregisterEvent("mousedown", elemScaler, zoomStart);        // unregisterEvent("mousedown", zoomdiv, zoomStart);        // setup and show zoom div        moveElement(zoomdiv, Rectangle(pt1.x, pt1.y, 0, 0));        showElement(zoomdiv, true);        // register move events        registerEvent("mousemove", overlay, zoomMove);        registerEvent("mousemove", zoomdiv, zoomMove);        registerEvent("mousemove", elemScaler, zoomMove);        // register up events for drag end        registerEvent("mouseup", overlay, zoomEnd);        registerEvent("mouseup", zoomdiv, zoomEnd);        registerEvent("mouseup", elemScaler, zoomEnd);        return stopEvent(evt);        }    // mouseup handler: end moving    function zoomEnd(evt) {        pt2 = evtPosition(evt);        // assume a click if the area is too small (up to 3 x 3 pixel)        var clickArea = getRect(pt1, pt2).getArea();        if (clickArea <= MIN_AREA_SIZE) return stopEvent(evt);         // hide zoom div        showElement(zoomdiv, false);        showElement(overlay, false);        // unregister move events        unregisterEvent("mousemove", overlay, zoomMove);        unregisterEvent("mousemove", zoomdiv, zoomMove);        unregisterEvent("mousemove", elemScaler, zoomMove);        // unregister drag events        unregisterEvent("mouseup", overlay, zoomEnd);        unregisterEvent("mouseup", zoomdiv, zoomEnd);        unregisterEvent("mouseup", elemScaler, zoomMove);        // calc offsets        var area = getRect(            // FIX ME: liefert negative x/y Werte, wenn hmir/vmir=1            dlTrafo.invtransform(pt1),            dlTrafo.invtransform(pt2)            );        setParameter("wx", cropFloat(area.x));        setParameter("wy", cropFloat(area.y));        setParameter("ww", cropFloat(area.width));        setParameter("wh", cropFloat(area.height));        // parseArea(); // why?        // zoomed is always fit        setParameter("ws", 1);        display();        return stopEvent(evt);        }    // mouse move handler    function zoomMove(evt) {        pt2 = evtPosition(evt);        // update zoom div        moveElement(zoomdiv, getRect(pt1, pt2));        return stopEvent(evt);        }    // get a rectangle from two points    function getRect(p1, p2) {        return new Rectangle(            Math.min(p1.x, p2.x),            Math.min(p1.y, p2.y),            Math.abs(p1.x - p2.x),            Math.abs(p1.y - p2.y)            );        }}
meta: 7747	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7747/5927e0031d63b488f9d4630e16e2cc2c628c42e2/dllib.js/clean/client/digitallibrary/greyskin/dllib.js