[Mapbender-commits] r1270 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Apr 23 05:01:17 EDT 2007
Author: christoph
Date: 2007-04-23 05:01:17 -0400 (Mon, 23 Apr 2007)
New Revision: 1270
Modified:
trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
continuing a polygon as a line (and vice versa) disabled.
Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php 2007-04-20 14:43:13 UTC (rev 1269)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php 2007-04-23 09:01:17 UTC (rev 1270)
@@ -480,23 +480,50 @@
executeDigitizePreFunctions();
obj.title = obj.title_on;
if (obj.id == button_point) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.point) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
d.addMember(parent.geomType.point);
d.get(-1).addGeometry();
}
else {
+/*
+//
+// delete existing line or polygon
+//
d.del(-1);
d.addMember(parent.geomType.point);
d.get(-1).addGeometry();
+*/
}
}
else if (obj.id == button_polygon) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.polygon) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
// new geometry
d.addMember(parent.geomType.polygon);
d.get(-1).addGeometry();
}
else {
+/*
+//
+// continue a line as a polygon
+//
if (d.get(-1).geomType != parent.geomType.polygon) {
var geometryTemplate = parent.cloneObject(d.get(-1));
d.del(-1);
@@ -509,14 +536,28 @@
}
}
s.add(d.getPoint(-1, -1, 0));
+*/
}
}
else if (obj.id == button_line) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.line) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
d.addMember(parent.geomType.line);
d.get(-1).addGeometry();
}
else {
+/*
+//
+// continue a polygon as a line
+//
if (d.get(-1).geomType != parent.geomType.line) {
var geometryTemplate = parent.cloneObject(d.get(-1));
d.del(-1);
@@ -528,7 +569,7 @@
}
}
}
- s.add(d.getPoint(-1, -1, 0));
+*/
}
}
else if (obj.id == button_clear) {
More information about the Mapbender_commits
mailing list