[Mapbender-commits] r8971 - trunk/mapbender/http/widgets
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jul 2 02:20:11 PDT 2014
Author: hwbllmnn
Date: 2014-07-02 02:20:10 -0700 (Wed, 02 Jul 2014)
New Revision: 8971
Modified:
trunk/mapbender/http/widgets/w_digitize.js
Log:
prevent snapping to first point when drawing lines
Modified: trunk/mapbender/http/widgets/w_digitize.js
===================================================================
--- trunk/mapbender/http/widgets/w_digitize.js 2014-07-02 08:51:27 UTC (rev 8970)
+++ trunk/mapbender/http/widgets/w_digitize.js 2014-07-02 09:20:10 UTC (rev 8971)
@@ -285,6 +285,10 @@
&& !this._polygonIsInvalid;
var lastPointSnapped = this._isLastPointSnapped(mousePos);
+ if(this.options.type === 'line') {
+ firstPointSnapped = false;
+ }
+
var digitizeData = {
pos: {
mousePos: mousePos,
@@ -337,6 +341,10 @@
var firstPointSnapped = this._isFirstPointSnapped(mousePos);
var lastPointSnapped = this._isLastPointSnapped(mousePos);
+ if(this.options.type === 'line') {
+ firstPointSnapped = false;
+ }
+
this._isPolygon(this._digitizePoints, data.pos);
if (this._currentPolygonIsInvalid) {
this._polygonIsInvalid = true;
More information about the Mapbender_commits
mailing list