context: function zoomGraphObjRefresh() {	//  constants	var cZoomBoxName = "zoomBox";//	var titleFontSize = parseInt(gUrlObj.getUrlParameterValue("title_font_size"));	var titleFontSize = 0;	if (titleFontSize == 0) {//		var cZoomBoxTopOffsetWOText = 15 - 1;//		var cZoomBoxTopOffsetWText = 32 - 1;//		var cZoomBoxRightOffset = -16;//		var cZoomBoxTopOffsetWOText = 31;//		var cZoomBoxTopOffsetWText = 0;//		var cZoomBoxRightOffset = -22;//		var cZoomBoxTopOffsetWOText = 33;//		var cZoomBoxTopOffsetWText = 0;//		var cZoomBoxRightOffset = -28;                var cZoomBoxTopOffsetWOText = gZoomBoxTopOffsetWOText;		var cZoomBoxTopOffsetWText = 0;                var cZoomBoxRightOffset = gZoomBoxRightOffset;	} else {		var cZoomBoxTopOffsetWOText = 10 - 1;		var cZoomBoxTopOffsetWText = titleFontSize + (titleFontSize * 1.6) + 10 - 1;		var cZoomBoxRightOffset = -28;	}	// zone outside of Zoom box where user can move cursor to without causing odd behavior	var cZoomSensitiveZoneName = "zoomSensitiveZone";	var cZoomSensitiveZoneOffset = 0;//	var cZoomSensitiveZoneOffset = 30;	// variables	var imgObject;	// var imgSource;	var imgAlt;	var divObject;	var left;	var top;	var width;	var height;	// zoomable selection area Width and Height	var zoomBoxWidth;	var zoomBoxHeight;	imgObject = this.imgObject;	//imgSource = imgObject.src;	imgAlt = imgObject.alt;	// determine the overall graph size	width = imgObject.width;	height = imgObject.height;	// get the graph area size from the url//	zoomBoxWidth = parseInt(gUrlObj.getUrlParameterValue("graph_width")) + 1;//	zoomBoxHeight = parseInt(gUrlObj.getUrlParameterValue("graph_height")) + 1;	zoomBoxWidth = 401;	zoomBoxHeight = 101;	// Get absolute image position relative to the overall window.	//	// start with the image's coordinates and walk through it's	// ancestory of elements (tables, div's, spans, etc...) until	// we're at the top of the display.  Along the way we add in each element's	// coordinates to get absolute image postion.	left = 0;	top = 0;	do {		left += imgObject.offsetLeft;		top += imgObject.offsetTop;		imgObject  = imgObject.offsetParent;	} while(imgObject);	// set the images's Ix1,Iy1 and Ix2,Iy2 postions based upon results	this.zoomGraphLeft = left;	this.zoomGraphTop = top;	this.zoomGraphRight = left + width;	this.zoomGraphBottom = top + height;	this.zoomGraphWidth = width;	this.zoomGraphHeight = height;	// calculate the right hand coordinate (rrdGAx2) of the zoom box (aka rrd Graph area)	this.zoomBoxRight = this.zoomGraphRight + cZoomBoxRightOffset;	// calculate the top coordinate (rrdGAy2) of the zoom box (aka rrd Graph area)	if(imgAlt == "") {		this.zoomBoxTop = this.zoomGraphTop + cZoomBoxTopOffsetWOText;	} else {		this.zoomBoxTop = this.zoomGraphTop + cZoomBoxTopOffsetWText;	}	// calculate the left hand coordinate (rrdGAx1) of the zoom box (aka rrd Graph area)	this.zoomBoxLeft = this.zoomBoxRight - zoomBoxWidth;	// calculate the bottom coordinate (rrdGAy1) of the zoom box (aka rrd Graph area)	this.zoomBoxBottom = this.zoomBoxTop + zoomBoxHeight;	// set the objects zoom sizes from the url values (aka rrd Graph size)	this.zoomBoxWidth = zoomBoxWidth;	this.zoomBoxHeight = zoomBoxHeight;	// this.drawSelection(this.zoomBoxLeft, this.zoomBoxTop, this.zoomBoxRight, this.zoomBoxBottom);	this.drawSelection(0, 0, 0, 0); // reset selection	divObject = document.getElementById(cZoomBoxName);	divObject.style.left = this.zoomBoxLeft + "px";	divObject.style.top = this.zoomBoxTop + "px";	divObject.style.width = this.zoomBoxWidth + "px";	divObject.style.height = this.zoomBoxHeight + "px";	// allow the crosshair to extend outside of the Graph area without graphical glitches	this.zoomSensitiveZoneLeft = this.zoomBoxLeft - cZoomSensitiveZoneOffset;	this.zoomSensitiveZoneTop = this.zoomBoxTop - cZoomSensitiveZoneOffset;	this.zoomSensitiveZoneRight = this.zoomBoxRight + cZoomSensitiveZoneOffset;	this.zoomSensitiveZoneBottom = this.zoomBoxBottom + cZoomSensitiveZoneOffset;	this.zoomSensitiveZoneWidth = this.zoomSensitiveZoneRight - this.zoomSensitiveZoneLeft;	this.zoomSensitiveZoneHeight = this.zoomSensitiveZoneBottom - this.zoomSensitiveZoneTop;	divObject = document.getElementById(cZoomSensitiveZoneName);	divObject.style.left = this.zoomSensitiveZoneLeft + "px";	divObject.style.top = this.zoomSensitiveZoneTop + "px";	divObject.style.width = this.zoomSensitiveZoneWidth + "px";	divObject.style.height = this.zoomSensitiveZoneHeight + "px";}
meta: 2281	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2281/2a685cd816ac82c91683e3496857c21ea5bfa866/zoom.js/buggy/opennms-webapp/src/main/webapp/js/zoom.js