[fusion-commits] r1465 - in trunk/widgets: . Maptip
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Aug 22 09:09:32 EDT 2008
Author: madair
Date: 2008-08-22 09:09:32 -0400 (Fri, 22 Aug 2008)
New Revision: 1465
Modified:
trunk/widgets/Maptip.js
trunk/widgets/Maptip/Maptip.css
Log:
re #103: add an offset to the tip position; clean up CSS file
Modified: trunk/widgets/Maptip/Maptip.css
===================================================================
--- trunk/widgets/Maptip/Maptip.css 2008-08-21 20:42:10 UTC (rev 1464)
+++ trunk/widgets/Maptip/Maptip.css 2008-08-22 13:09:32 UTC (rev 1465)
@@ -1,4 +1,4 @@
-div.maptipContainer{
+div.maptipContainer {
display: none;
border: 1px solid #000;
background-color: #E5DAC7;
@@ -27,93 +27,3 @@
padding: 4px;
}
-div.maptipContainer{
- display: none;
- border: 1px solid #000;
- background-color: #E5DAC7;
- line-height: 0px;
- font-size: 0px;
- position: absolute;
- z-index: 101;
-}
-
-iframe.maptipShim {
- position:absolute;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- filter: Alpha(opacity:0);
- opacity: 0;
- -moz-opacity: 0;
- z-index: -1;
-}
-
-div.maptipContent {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11px;
- line-height: 14px;
- padding: 4px;
-}
-
-div.maptipContainer{
- display: none;
- border: 1px solid #000;
- background-color: #E5DAC7;
- line-height: 0px;
- font-size: 0px;
- position: absolute;
- z-index: 101;
-}
-
-iframe.maptipShim {
- position:absolute;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- filter: Alpha(opacity:0);
- opacity: 0;
- -moz-opacity: 0;
- z-index: -1;
-}
-
-div.maptipContent {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11px;
- line-height: 14px;
- padding: 4px;
-}
-
-div.maptipContainer{
- display: none;
- border: 1px solid #000;
- background-color: #E5DAC7;
- line-height: 0px;
- font-size: 0px;
- position: absolute;
- z-index: 101;
-}
-
-iframe.maptipShim {
- position:absolute;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- filter: Alpha(opacity:0);
- opacity: 0;
- -moz-opacity: 0;
- z-index: -1;
-}
-
-div.maptipContent {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11px;
- line-height: 14px;
- padding: 4px;
-}
-
-
-
-
Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js 2008-08-21 20:42:10 UTC (rev 1464)
+++ trunk/widgets/Maptip.js 2008-08-22 13:09:32 UTC (rev 1465)
@@ -56,7 +56,8 @@
delay: null,
aLayers: null,
bOverTip: false,
- sWinFeatures : 'menubar=no,location=no,resizable=no,status=no',
+ sWinFeatures: 'menubar=no,location=no,resizable=no,status=no',
+ offset: new OpenLayers.Pixel(2,2),
initialize : function(widgetTag)
{
@@ -213,14 +214,14 @@
var mapSize = this.getMap().getSize();
var size = Element.getDimensions(this.domObj);
if (this.oCurrentPosition.x < mapSize.w/2) {
- this.domObj.style.left = (this.oMapTipPosition.x) + 'px';
+ this.domObj.style.left = (this.oMapTipPosition.x + this.offset.x) + 'px';
} else {
- this.domObj.style.left = (this.oMapTipPosition.x - size.width) + 'px';
+ this.domObj.style.left = (this.oMapTipPosition.x - (size.width+this.offset.x)) + 'px';
}
if (this.oCurrentPosition.y < mapSize.h/2) {
- this.domObj.style.top = (this.oMapTipPosition.y) + 'px';
+ this.domObj.style.top = (this.oMapTipPosition.y + this.offset.y) + 'px';
} else {
- this.domObj.style.top = (this.oMapTipPosition.y - size.height) + 'px';
+ this.domObj.style.top = (this.oMapTipPosition.y - (size.height+this.offset.y)) + 'px';
}
this.domObj.style.visibility = 'hidden';
this.domObj.style.display = 'block';
More information about the fusion-commits
mailing list