[Mapbender-commits] r6273 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jun 15 10:15:21 EDT 2010
Author: kmq
Date: 2010-06-15 14:15:21 +0000 (Tue, 15 Jun 2010)
New Revision: 6273
Modified:
trunk/mapbender/http/plugins/mb_digitize_geometry.js
Log:
Prevent selecting when dragging outside the mapframe. This caused flickering in IE
Modified: trunk/mapbender/http/plugins/mb_digitize_geometry.js
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_geometry.js 2010-06-15 14:03:57 UTC (rev 6272)
+++ trunk/mapbender/http/plugins/mb_digitize_geometry.js 2010-06-15 14:15:21 UTC (rev 6273)
@@ -253,6 +253,8 @@
}
return str;
};
+
+ var prevent = function(e){ e.preventDefault(); };
var button = new Mapbender.Button({
domElement: $digitize.get(0),
@@ -277,6 +279,8 @@
o.$target.bind("dblclick", finishFeature);
}
o.$target.bind("mousemove", mousemove);
+ $("body").bind("mousedown", prevent).bind("mouseover", prevent).bind("mousemove", prevent);
+
},
stop: function () {
if (featureCollection.count() > 0) {
@@ -305,6 +309,8 @@
o.$target.unbind("dblclick", finishFeature);
}
o.$target.unbind("mousemove", mousemove);
+ $("body").unbind("mousedown", prevent).unbind("mouseover", prevent).unbind("mousemove", prevent);
+
}
});
};
More information about the Mapbender_commits
mailing list