[Mapbender-commits] r5291 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 6 09:45:14 EST 2010
Author: christoph
Date: 2010-01-06 09:45:13 -0500 (Wed, 06 Jan 2010)
New Revision: 5291
Modified:
trunk/mapbender/http/plugins/mb_navigation.js
Log:
Modified: trunk/mapbender/http/plugins/mb_navigation.js
===================================================================
--- trunk/mapbender/http/plugins/mb_navigation.js 2010-01-06 14:44:56 UTC (rev 5290)
+++ trunk/mapbender/http/plugins/mb_navigation.js 2010-01-06 14:45:13 UTC (rev 5291)
@@ -37,7 +37,6 @@
options.$target.each(function () {
var $target = $(this);
var id = $target.attr("id");
- var map = Mapbender.modules[id];
var positionArrow = function ($domElement, direction) {
var top, left;
@@ -97,18 +96,25 @@
var dir = directionArray[i];
var $arrow = $("<span title='" + dir.toUpperCase() + "' " +
"id='" + id + "_" + dir + "' class=" +
- "'ui-icon ui-corner-all ui-icon-triangle-1-" + dir +
+ "'ui-icon ui-corner-all ui-state-default ui-icon-triangle-1-" + dir +
"'></span>").click(function () {
- map.pan(dir);
+
+ $target.mapbender(function () {
+ this.pan(dir);
+ });
}).mouseover(function () {
- $(this).addClass("ui-state-default");
+ $(this).addClass("ui-state-hover");
+ return true;
}).mouseout(function () {
- $(this).removeClass("ui-state-default");
+ $(this).removeClass("ui-state-hover");
+ return true;
}).appendTo($this);
positionArrow($arrow, dir);
- map.events.dimensionsChanged.register(function () {
- positionArrow($arrow, dir);
+ $target.mapbender(function () {
+ this.events.dimensionsChanged.register(function () {
+ positionArrow($arrow, dir);
+ });
});
})();
}
More information about the Mapbender_commits
mailing list