[Mapbender-commits] r2163 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 3 11:32:29 EST 2008


Author: nimix
Date: 2008-03-03 11:32:28 -0500 (Mon, 03 Mar 2008)
New Revision: 2163

Modified:
   branches/2.5/http/javascripts/popup.js
Log:
update popup class

Modified: branches/2.5/http/javascripts/popup.js
===================================================================
--- branches/2.5/http/javascripts/popup.js	2008-03-03 14:46:12 UTC (rev 2162)
+++ branches/2.5/http/javascripts/popup.js	2008-03-03 16:32:28 UTC (rev 2163)
@@ -4,109 +4,6 @@
 * License (>=v2). Read the file gpl.txt that comes with Mapbender for details. 
 */
 //http://www.mapbender.org/index.php/popup
-
-/*jqModal*/
-/*
- * jqModal - Minimalist Modaling with jQuery
- *
- * Copyright (c) 2007 Brice Burgess <bhb at iceburg.net>, http://www.iceburg.net
- * Licensed under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- * 
- * $Version: 2007.08.17 +r11
- * 
- */
-(function($) {
-$.fn.jqm=function(o){
-var _o = {
-zIndex: 3000,
-overlay: 50,
-overlayClass: 'jqmOverlay',
-closeClass: 'jqmClose',
-trigger: '.jqModal',
-ajax: false,
-target: false,
-modal: false,
-toTop: false,
-onShow: false,
-onHide: false,
-onLoad: false
-};
-return this.each(function(){if(this._jqm)return; s++; this._jqm=s;
-H[s]={c:$.extend(_o, o),a:false,w:$(this).addClass('jqmID'+s),s:s};
-if(_o.trigger)$(this).jqmAddTrigger(_o.trigger);
-});};
-
-$.fn.jqmAddClose=function(e){hs(this,e,'jqmHide'); return this;};
-$.fn.jqmAddTrigger=function(e){hs(this,e,'jqmShow'); return this;};
-$.fn.jqmShow=function(t){return this.each(function(){if(!H[this._jqm].a)$.jqm.open(this._jqm,t)});};
-$.fn.jqmHide=function(t){return this.each(function(){if(H[this._jqm].a)$.jqm.close(this._jqm,t)});};
-
-$.jqm = {
-hash:{},
-open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(/^\d+$/.test(h.w.css('z-index')))?h.w.css('z-index'):c.zIndex,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});h.t=t;h.a=true;h.w.css('z-index',z);
- if(c.modal) {if(!A[0])F('bind');A.push(s);o.css('cursor','wait');}
- else if(c.overlay > 0)h.w.jqmAddClose(o);
- else o=false;
-
- h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):false;
- if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
-
- if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;
-  r.load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
- else if(cc)h.w.jqmAddClose($(cc,h.w));
-
- if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);	
- (c.onShow)?c.onShow(h):h.w.show();e(h);return false;
-},
-close:function(s){var h=H[s];h.a=false;
- if(A[0]){A.pop();if(!A[0])F('unbind');}
- if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();
- if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return false;
-}};
-var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),
-i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),
-e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
-f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(e){}},
-F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},
-m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},
-hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});
- $(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false;});}});};
-})(jQuery);
-/*
- * jqDnR - Minimalistic Drag'n'Resize for jQuery.
- *
- * Copyright (c) 2007 Brice Burgess <bhb at iceburg.net>, http://www.iceburg.net
- * Licensed under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- * 
- * $Version: 2007.08.19 +r2
- */
-
-(function($){
-$.fn.jqDrag=function(h){return i(this,h,'d');};
-$.fn.jqResize=function(h){return i(this,h,'r');};
-$.jqDnR={dnr:{},e:0,
-drag:function(v){
- if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY});
- else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)});
-  return false;},
-stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);}
-};
-var J=$.jqDnR,M=J.dnr,E=J.e,
-i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e;
- h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e;
- // attempt utilization of dimensions plugin to fix IE issues
- if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}}
- M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0].scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')};
- E.css({opacity:0.8});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
- return false;
- });
-});},
-f=function(k){return parseInt(E.css(k))||false;};
-})(jQuery);
-/*end jqModal*/
-
 var popup_count = 0;
 var popup_top = 150;
 
@@ -114,7 +11,29 @@
  * @class A class representing a popup window
  *
  * @constructor
- * @param {String} title the title text of the popup 
+ * @param {String/Object} title the title text of the popup or Options object
+ * Elelemts of the options object (all optional):
+ *  left: position left
+ *  top: position top
+ *  width: popup width
+ *  height: popup height
+ *  title: popup title
+ *  frameName: name of the popups iframe if it loads a frame
+ *  opacity: opacity of the frame
+ *  html:content html of the frame (not parsed if url not false)
+ *  url:content url of the frame
+ *  minWidth: minimum width of the popup if the user resizes it
+ *  maxWidth: maximum width of the popup if the user resizes it
+ *  minHeight: minimum height of the popup if the user resizes it
+ *  maxHeight: maximum height of the popup if the user resizes it
+ *  minTop: minimum top position if the user moves the popup
+ *  minLeft: minimum left position if the user moves the popup 
+ *  maxRight: maximum right position if the user moves/resizes the popup
+ *  maxBottom: maximum bottom position if the user moves/resized the popup
+ * 	style: additional styles for the popup
+ *  destroy: remove dom of popup if user closes it (don't use it for iframes with framename)
+ *  closeCallback: function that is called if the user closes the window
+ * 
  * @param {String} html the "body" of the popup, can also be "url:http://foo.de" to display a website
  * @param {Number} width width of the popup
  * @param {Number} height hight of the popup
@@ -131,119 +50,70 @@
 			break;
 		}
 
-	//Set member vars
-	this.left=posx?posx:25*create_pos;
-	this.top=posy?posy:25*create_pos;
-	this.width=width?width:300;
-	this.height=height?height:250;
-	this.title=title;
-	this.opacity=opacity?opacity:1.0;
-	this.html=html.indexOf("url:")==0?('<iframe name="'+fName+'" src="'+html.substr(4)+'"></iframe>'):('<div class="scrollDiv">'+html+'</div>');
 	this.id="popup"+String(create_pos);
+	
+	//Set defaults
+	defaults = {
+		left:25*create_pos,
+		top:25*create_pos,
+		width:300,height:250,
+		title:"Title",
+		frameName:this.id
+	}
+		
+	if(typeof(title)!='object'){
+		this.options = defaults;
+		
+		//Set vars
+		if(posx)this.options.left=posx;
+		if(posy)this.options.top=posx;
+		if(width)this.options.width=width;
+		if(height)this.options.height=height;
+		if(title)this.options.title=title;
+		if(fName)this.options.frameName=fName;
+		if(opacity)this.options.opacity;
+		if(html){
+			if(html.indexOf("url:")==0)
+				this.options.url=html.substr(4);
+			else
+				this.options.html=html;
+		}
+	}
+	else
+		this.options=$.extend(defaults, title);
+
 	popup_count++;
+	
+	//create dom popup
+	$("body").append("<div style=\"display:none;z-index:"+popup_top+"\" id=\""+this.id+"\"></div>");
+	this.div = $("#"+this.id).mbPopup(this.options);
 }
 
 /**
- * createCatcher creates a helper div over the whole browser frame
- * @return return the dom element of the div
+ * Shows the popup
  */
-function createCatcher(){
-	$("#mouse_catch").remove();
-	var div=document.createElement('div');
-	div.style.position="absolute";
-	div.style.top="0px";
-	div.style.left="0px";
-//	div.style.backgroundColor='#000000';
-//	div.style.opacity='0.5';
-	div.style.width=document.body.scrollWidth+"px";
-	div.style.height=document.body.scrollHeight+"px";
-	div.id="mouse_catch";
-	div.style.zIndex=popup_top+2;
-	if(top.ie)
-		div.style.background = "url(../img/transparent.gif)";
-	window.document.body.appendChild(div);
-	return div;
+mb_popup.prototype.show = function(){
+	if(!document.getElementById(this.id)){
+		//(re)create dom popup
+		$("body").append("<div style=\"display:none;z-index:"+popup_top+"\" id=\""+this.id+"\"></div>");
+		this.div = $("#"+this.id).mbPopup(this.options);
+	}
+	if(!this.isVisible())
+		$("#"+this.id).show();
 }
 
 /**
- * removeCatcher deletes the helper div
+ * Hides the popup
  */
-function removeCatcher(){
-	$("#mouse_catch").remove();
+mb_popup.prototype.hide = function(){	
+	$("#"+this.id).hide();
 }
 
 /**
- * Shows the popup
- */
-mb_popup.prototype.show = function(){
-	if(document.getElementById(this.id))return;
-	//create popup div
-	var div=document.createElement('div');
-	div.id=this.id;
-	div.className = "jqmNotice";
-	
-	//set some attributes
-	div.style.left=String(this.left)+"px";
-	div.style.top=String(this.top)+"px";
-	div.style.width=String(this.width)+"px";
-	div.style.height=String(this.height)+"px";
-	div.style.zIndex=popup_top++;
-	div.style.opacity=String(this.opacity);
-	
-	//create window
-	document.body.appendChild(div);
-	
-	//create Window elements
-	div.innerHTML='<div class="jqmnTitle jqDrag"><h1>'+this.title+'</h1></div><div class="jqmnContent">'+this.html+'</div><img src="../img/close_icon.png" class="jqmClose" alt="close" /><div class="jqResize" />';
-	
-	//Bind events on title click (move window)
-	$(div.firstChild).mousedown(function(){
-		//set to top
-		this.parentNode.style.zIndex=popup_top++;
-		//create helper div to steal mouse events
-		$(createCatcher()).mouseup(function(){
-			//hand event to move routine
-			$().trigger('mouseup');
-			//remove helper div
-			removeCatcher();
-		})
-	;});
-	//bind events for resizing window
-	$(div.lastChild).mousedown(function(){
-		//set to top
-		this.parentNode.style.zIndex=popup_top++;
-		//create helper div to steal mouse events
-		$(createCatcher()).mouseup(function(){
-			//hand event to move routine
-			$().trigger('mouseup');
-			//remove helper div
-			removeCatcher();
-		})
-	;});
-	
-	//attach jquery window classes to div
-	$("#"+this.id, document).jqDrag('.jqDrag').jqResize('.jqResize').jqm({
-      overlay: 0,
-      onShow: function(h) {
-        //on show annimate
-        h.w.show();
-       },
-      onHide: function(h) {
-        // on close do animation and destroy dom element.
-        h.w.slideUp("slow",function() {if(h.o) h.o.remove(); if(h.w)h.w.remove();removeCatcher();});}
-        
-      });
-	$("#"+this.id).jqm().jqmShow();
-	//on click bring window to top
-	$("*>#"+this.id).click(function (){this.style.zIndex=popup_top++});
-}
-
-/**
  * Hides the popup
  */
-mb_popup.prototype.hide = function(){	
-	var div=document.getElementById(this.id);
-	$("#"+this.id).jqm().jqmHide();
+mb_popup.prototype.destroy = function(){	
+	$("#"+this.id).remove();
 }
 
 /**
@@ -252,7 +122,6 @@
  * @param {Number} width new width of the popup  
  */
 mb_popup.prototype.setWidth = function(width){
-	this.width=width;
 	var div=document.getElementById(this.id);
 	if(div)div.style.width=width;
 }
@@ -263,7 +132,6 @@
  * @param {Number} height new height of the popup  
  */
 mb_popup.prototype.setHeight = function(height){
-	this.height=height;
 	var div=document.getElementById(this.id);
 	if(div)div.style.height=height;
 }
@@ -274,7 +142,6 @@
  * @param {Number} left new left position of the popup  
  */
 mb_popup.prototype.setLeft = function(left){
-	this.left=left;
 	var div=document.getElementById(this.id);
 	if(div)div.style.left=left;
 }
@@ -285,7 +152,6 @@
  * @param {Number} top new top position of the popup  
  */
 mb_popup.prototype.setTop = function(topp){
-	this.top=topp;
 	var div=document.getElementById(this.id);
 	if(div)div.style.top=topp;
 }
@@ -296,7 +162,6 @@
  * @param {Number} opacity new opacity value of the popup  
  */
 mb_popup.prototype.setOpacity = function(opacityy){
-	this.opacity=opacityy;
 	var div=document.getElementById(this.id);
 	if(div)div.style.opacity=opacityy;
 }
@@ -307,7 +172,6 @@
  * @param {String} title new title text of the popup  
  */
 mb_popup.prototype.setTitle = function(title){
-	this.title=title;
 	$("#"+this.id+" h1").text(title);
 }
 
@@ -317,7 +181,8 @@
  * @param {String} html new html "body" of the popup  
  */
 mb_popup.prototype.setHtml = function(htmll){
-	this.html="<div class='scrollDiv'>"+htmll+"</div>";
+	this.options.url=null;
+	this.options.html=htmll;
 	$("#"+this.id+" .jqmnContent").html(htmll);
 }
 
@@ -327,8 +192,13 @@
  * @param {String} url new url of the popup  
  */
 mb_popup.prototype.setUrl = function(url){
-	this.html="url:"+url;
-	$("#"+this.id+" .jqmnContent").html('<iframe src="'+url+'"></iframe>');
+	this.options.url=url;
+	this.options.html=null;
+	try{
+		eval("window.frames."+this.options.frameName+".location = \""+url+"\"");
+	}catch(e){
+		$("#"+this.id+" .jqmnContent").html('<iframe src="'+url+'"></iframe>');
+	}
 }
 
 /**
@@ -337,6 +207,188 @@
  * @type Boolean
  */
 mb_popup.prototype.isVisible = function(){
-	return document.getElementById(this.id)?true:false;
+	return $("#"+this.id+":visible").length>0?true:false;
 }
 
+/**
+ * get Scroll position
+ */
+function getScrollPos() {  
+	var scrOf ={X:0,Y:0,wW:$(window).width(),dW:$().width(),wH:$(window).height(),dH:$().height()};  
+	
+	if( typeof( window.pageYOffset ) == 'number' ) {  
+		//Netscape compliant  
+		scrOf.Y = window.pageYOffset;  
+		scrOf.X = window.pageXOffset;  
+	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {  
+		//DOM compliant  
+		scrOf.Y = document.body.scrollTop;  
+		scrOf.X = document.body.scrollLeft;  
+	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {  
+		//IE6 standards compliant mode  
+		scrOf.Y = document.documentElement.scrollTop;  
+		scrOf.X = document.documentElement.scrollLeft;  
+	}  
+	return scrOf;  
+}
+
+(function($){
+	$.fn.mbPopup = function(options){
+		//default settings
+		defaults = {
+			left:0,top:0,
+			width:300,height:250,
+			title:"",
+			frameName:"",
+			opacity:1.0,html:false,url:false,
+			minWidth:false,maxWidth:false,
+			minHeight:false,maxHeight:false,
+			minTop:false,minLeft:false,
+			maxRight:false,maxBottom:false,
+			style:null,
+			destroy:true,
+			closeCallback:null
+		};
+		//override defaults
+		settings=$.extend(defaults,options)
+		
+		//add Styles
+		this.addClass("jqmNotice");
+		
+		this.css({top:settings.top,
+			left:settings.left,
+			width:settings.width,
+			height:settings.height,
+			opacity:settings.opacity
+			});
+		
+		if(settings.style)
+			this.css(settings.style);
+		
+		//Insert content
+		if(settings.url)
+			html = ('<iframe name="'+settings.frameName+'" src="'+settings.url+'"></iframe>');
+		else
+			html = ('<div class="scrollDiv">'+settings.html+'</div>');
+	
+		this.html('<div class="jqmnTitle jqDrag"><h1>'+settings.title+'</h1></div><div class="jqmnContent">'+html+'</div><img src="../img/close_icon.png" class="jqmClose" alt="close" /><div class="jqResize" />');
+	
+		var data = {El:this,fY:settings.minTop,fX:settings.minLeft,tX:settings.maxRight,tY:settings.maxBottom,
+			fW:settings.minWidth,tW:settings.maxWidth,fH:settings.minHeight,tH:settings.maxHeight,
+			destroy:settings.destroy,opacity:settings.opacity,close:settings.closeCallback}
+
+		//Make window Dragable
+		$(".jqDrag", this).bind('mousedown',data,function(event){
+			//set to top
+			event.data.El.css("z-index",popup_top++);
+			event.data.El.css('opacity',0.8)
+			//create helper div to steal mouse events
+			$("body").append("<div style=\"position:absolute;top:0px;left:0px;width:"+$().width()+"px;height:"+$().height()+"px;z-index:"+(popup_top+2)+(top.ie?";background:url(../img/transparent.gif)":"")+"\" id=\"mouse_catcher\"></div>");
+			
+			//Parse setiings of min and max position
+			var data = $.mbPopupFn.parseDimensions(event);
+			
+			//bind mouse events to popup
+			$().bind("mousemove",data,$.mbPopupFn.drag).bind('mouseup',event.data,$.mbPopupFn.stopdrag);
+			$("#mouse_catcher").bind("mousemove",data,$.mbPopupFn.drag).bind('mouseup',event.data,$.mbPopupFn.stopdrag);
+		});
+		
+		//Make Window resizable
+		$(".jqResize", this).bind('mousedown',data,function(event){
+			//set to top
+			event.data.El.css("z-index",popup_top++);
+			event.data.El.css('opacity',0.8)
+			//create helper div to steal mouse events
+			$("body").append("<div style=\"position:absolute;top:0px;left:0px;width:"+$().width()+"px;height:"+$().height()+"px;z-index:"+(popup_top+2)+(top.ie?";background:url(../img/transparent.gif)":"")+"\" id=\"mouse_catcher\"></div>");
+
+			//Parse setiings of min and max position
+			var data = $.mbPopupFn.parseDimensions(event);
+			
+			//bind mouse events to popup
+			$().bind("mousemove",data,$.mbPopupFn.resize).bind('mouseup',event.data,$.mbPopupFn.stopresize);
+			$("#mouse_catcher").bind("mousemove",data,$.mbPopupFn.resize).bind('mouseup',event.data,$.mbPopupFn.stopresize);
+		});
+		
+		//closeButton
+		$(".jqmClose", this).bind('click',data, function(event){
+			if(event.data.close)
+				event.data.close();
+			if(event.data.destroy)
+				event.data.El.slideUp('slow', function(){$(this).remove();});
+			else
+				event.data.El.slideUp('slow');
+		});
+		
+		//raise on click
+		this.click(function(){this.style.zIndex=popup_top++});
+	};
+	//helper functions
+	$.mbPopupFn = {
+		//on drag
+		drag:function(event){
+			//console.log("tesddt");			
+			var newPos = {X:event.data.X+event.pageX-event.data.pX,
+				Y:event.data.Y+event.pageY-event.data.pY};
+			if(event.data.fX!==false&&newPos.X<event.data.fX)
+				newPos.X=event.data.fX;
+			if(event.data.fY!==false&&newPos.Y<event.data.fY)
+				newPos.Y=event.data.fY;
+			if(event.data.tX!==false&&newPos.X>event.data.tX-event.data.W)
+				newPos.X=event.data.tX-event.data.W;
+			if(event.data.tY!==false&&newPos.Y>event.data.tY-event.data.H)
+				newPos.Y=event.data.tY-event.data.H;
+			
+			event.data.El.css({left:newPos.X,top:newPos.Y});
+		},
+		//on resize
+		resize:function(event){
+			var newDim = {W:Math.max(event.pageX-event.data.pX+event.data.W,0),
+				H:Math.max(event.pageY-event.data.pY+event.data.H,0)};
+			if(event.data.fW!==false&&newDim.W<event.data.fW)
+				newDim.W=event.data.fW;
+			if(event.data.fH!==false&&newDim.H<event.data.fH)
+				newDim.H=event.data.fH;
+			if(event.data.tW!==false&&newDim.W>event.data.tW)
+				newDim.W=event.data.tW;
+			if(event.data.tH!==false&&newDim.H>event.data.tH)
+				newDim.H=event.data.tH;
+			if(event.data.tX!==false&&newDim.W+event.data.X>event.data.tX)
+				newDim.W=event.data.tX-event.data.X;
+			if(event.data.tY!==false&&newDim.H+event.data.Y>event.data.tY)
+				newDim.H=event.data.tY-event.data.Y;	
+						
+			event.data.El.css({width:newDim.W,height:newDim.H});
+		},
+		stopdrag:function(event){
+			event.data.El.css('opacity',event.data.opacity)
+			$().unbind('mousemove',$.mbPopupFn.drag).unbind('mouseup',$.mbPopupFn.stopdrag);
+			$("#mouse_catcher").unbind('mousemove',$.mbPopupFn.drag).unbind('mouseup',$.mbPopupFn.stopdrag).remove();
+		},
+		stopresize:function(event){
+			event.data.El.css('opacity',event.data.opacity)
+			$().unbind('mousemove',$.mbPopupFn.resize).unbind('mouseup',$.mbPopupFn.stopresize);
+			$("#mouse_catcher").unbind('mousemove',$.mbPopupFn.resize).unbind('mouseup',$.mbPopupFn.stopresize).remove();
+		},
+		//parse move and resize dimensions
+		parseDimensions:function(d){
+			var dim = getScrollPos();
+			return {El:d.data.El,
+				fX:(d.data.fX=="window"?dim.X:(d.data.fX=="document"?0:(d.data.fX<0?dim.dW-d.data.fX:d.data.fX))),
+				fY:(d.data.fX=="window"?dim.Y:(d.data.fY=="document"?0:(d.data.fY<0?dim.dH-d.data.fY:d.data.fY))),
+				tX:(d.data.tX=="window"?dim.X+dim.wW:(d.data.tX=="document"?dim.dW:(d.data.tX<0?dim.dW-d.data.tX:d.data.tX))),
+				tY:(d.data.tY=="window"?dim.Y+dim.wH:(d.data.tY=="document"?dim.dH:(d.data.tH<0?dim.dH-d.data.tH:d.data.tY))),
+				fW:(d.data.fW=="window"?dim.wW:(d.data.fW=="document"?dim.dW:(d.data.fW<0?dim.dW-d.data.fW:d.data.fW))),
+				fH:(d.data.fH=="window"?dim.wH:(d.data.fH=="document"?dim.dH:(d.data.fH<0?dim.dH-d.data.fH:d.data.fH))),
+				tW:(d.data.tW=="window"?dim.wW:(d.data.tW=="document"?dim.dW:(d.data.tW<0?dim.dW-d.data.tW:d.data.tW))),
+				tH:(d.data.tH=="window"?dim.wH:(d.data.tH=="document"?dim.dH:(d.data.tH<0?dim.dH-d.data.tH:d.data.tH))),
+				X:parseInt(d.data.El.css("left")),
+				Y:parseInt(d.data.El.css("top")),
+				W:parseInt(d.data.El.css("width")),
+				H:parseInt(d.data.El.css("height")),
+				pX:d.pageX,
+				pY:d.pageY
+			};
+		}
+	};
+	})
+(jQuery);



More information about the Mapbender_commits mailing list