[Mapbender-commits] r5325 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 13 10:34:56 EST 2010
Author: christoph
Date: 2010-01-13 10:34:55 -0500 (Wed, 13 Jan 2010)
New Revision: 5325
Modified:
trunk/mapbender/http/plugins/mb_navigation.js
Log:
element is now added to map itself
Modified: trunk/mapbender/http/plugins/mb_navigation.js
===================================================================
--- trunk/mapbender/http/plugins/mb_navigation.js 2010-01-13 15:34:10 UTC (rev 5324)
+++ trunk/mapbender/http/plugins/mb_navigation.js 2010-01-13 15:34:55 UTC (rev 5325)
@@ -43,41 +43,33 @@
switch (direction) {
case "n":
top = (
- parseInt($target.css("top"), 10) +
iconOffset
) + "px";
left = (
- parseInt($target.css("left"), 10) +
parseInt($target.css("width"), 10) / 2 - iconDim/2
) + "px";
break;
case "s":
top = (
- parseInt($target.css("top"), 10) +
parseInt($target.css("height"), 10) - iconDim - iconOffset
) + "px";
left = (
- parseInt($target.css("left"), 10) +
parseInt($target.css("width"), 10) / 2 - iconDim/2
) + "px";
break;
case "w":
top = (
- parseInt($target.css("top"), 10) +
parseInt($target.css("height"), 10) / 2 - iconDim/2
) + "px";
left = (
- parseInt($target.css("left"), 10) +
iconOffset
) + "px";
break;
case "e":
top = (
- parseInt($target.css("top"), 10) +
parseInt($target.css("height"), 10) / 2 - iconDim/2
) + "px";
left = (
- parseInt($target.css("left"), 10) +
parseInt($target.css("width"), 10) - iconDim - iconOffset
) + "px";
break;
@@ -97,18 +89,20 @@
var $arrow = $("<span title='" + dir.toUpperCase() + "' " +
"id='" + id + "_" + dir + "' class=" +
"'ui-icon ui-corner-all ui-state-default ui-icon-triangle-1-" + dir +
- "'></span>").click(function () {
-
+ "'></span>"
+ ).click(function (e) {
+ console.log(e.target);
$target.mapbender(function () {
this.pan(dir);
});
+ return false;
}).mouseover(function () {
$(this).addClass("ui-state-hover");
return true;
}).mouseout(function () {
$(this).removeClass("ui-state-hover");
return true;
- }).appendTo($this);
+ }).appendTo($target);
positionArrow($arrow, dir);
$target.mapbender(function () {
More information about the Mapbender_commits
mailing list