rem: pt2 = evtPosition(evt);  showElement(zoomdiv, false); showElement(overlay, false);  unregisterEvent("mousemove", overlay, zoomMove); unregisterEvent("mousemove", zoomdiv, zoomMove);  unregisterEvent("mouseup", overlay, zoomEnd); unregisterEvent("mouseup", zoomdiv, zoomEnd);  var rect = getRect( dlTrafo.invtransform(pt1), dlTrafo.invtransform(pt2) );  if (rect.getArea() < 0.00001) return zoomArea(); setParameter("wx", cropFloat(rect.x)); setParameter("wy", cropFloat(rect.y)); setParameter("ww", cropFloat(rect.width)); setParameter("wh", cropFloat(rect.height)); parseArea();  setParameter("ws", 1); display(); return stopEvent(evt); } 
add: pt2 = evtPosition(evt);  var clickArea = getRect(pt1, pt2).getArea(); if (clickArea <= MIN_AREA_SIZE) return stopEvent(evt);  showElement(zoomdiv, false); showElement(overlay, false);  unregisterEvent("mousemove", overlay, zoomMove); unregisterEvent("mousemove", zoomdiv, zoomMove); unregisterEvent("mousemove", elemScaler, zoomMove);  unregisterEvent("mouseup", overlay, zoomEnd); unregisterEvent("mouseup", zoomdiv, zoomEnd); unregisterEvent("mouseup", elemScaler, zoomMove);  var area = getRect(  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));   setParameter("ws", 1); display(); return stopEvent(evt); } 
context: 	function zoomEnd(evt) {		pt2 = evtPosition(evt);		// hide zoom div		showElement(zoomdiv, false);		showElement(overlay, false);		// unregister move events		unregisterEvent("mousemove", overlay, zoomMove);		unregisterEvent("mousemove", zoomdiv, zoomMove);		// unregister drag events		unregisterEvent("mouseup", overlay, zoomEnd);		unregisterEvent("mouseup", zoomdiv, zoomEnd);		// calc offsets		var rect = getRect(			dlTrafo.invtransform(pt1),			dlTrafo.invtransform(pt2)			);		// try again if area is too small		if (rect.getArea() < 0.00001) return zoomArea();		setParameter("wx", cropFloat(rect.x));		setParameter("wy", cropFloat(rect.y));		setParameter("ww", cropFloat(rect.width));		setParameter("wh", cropFloat(rect.height));		parseArea();		// zoomed is always fit		setParameter("ws", 1);		display();		return stopEvent(evt);		}
meta: 7747	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7747/b558443abc997acd0db2f5f940a087d1a2056c8e/dllib.js/clean/client/digitallibrary/greyskin/dllib.js