[fusion-commits] r1644 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Nov 6 15:26:28 EST 2008
Author: madair
Date: 2008-11-06 15:26:28 -0500 (Thu, 06 Nov 2008)
New Revision: 1644
Modified:
trunk/widgets/Maptip.js
Log:
closes #156: add mapDiv offset to the tip position
Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js 2008-11-06 18:32:54 UTC (rev 1643)
+++ trunk/widgets/Maptip.js 2008-11-06 20:26:28 UTC (rev 1644)
@@ -214,8 +214,11 @@
empty = false;
}
if (!empty) {
- var mapSize = this.getMap().getSize();
+ var map = this.getMap();
+ var mapSize = map.getSize();
var size = $(this.domObj).getBorderBoxSize();
+ var offset = map._oDomObj.offsets;
+ this.oMapTipPosition = this.oMapTipPosition.add(offset[0], offset[1]);
if (this.oCurrentPosition.x < mapSize.w/2) {
this.domObj.style.left = (this.oMapTipPosition.x + this.offset.x) + 'px';
} else {
@@ -268,7 +271,7 @@
this.bOverTip = false;
},
- openLink : function(url, evt) {
+ openLink: function(url, evt) {
var taskPaneTarget = Fusion.getWidgetById(this.sTarget);
if ( taskPaneTarget ) {
taskPaneTarget.setContent(url);
More information about the fusion-commits
mailing list