[fusion-commits] r2459 - trunk/widgets/Redline
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Nov 16 03:39:44 EST 2011
Author: liuar
Date: 2011-11-16 00:39:44 -0800 (Wed, 16 Nov 2011)
New Revision: 2459
Modified:
trunk/widgets/Redline/editmarkup.php
Log:
Fix ticket #488 [Redline]the panel has all the labels missing if user draws a invalid polygon
Stop doing redline if user digitized an invalid polygon (vertexes number less than 3).
Modified: trunk/widgets/Redline/editmarkup.php
===================================================================
--- trunk/widgets/Redline/editmarkup.php 2011-11-16 08:13:23 UTC (rev 2458)
+++ trunk/widgets/Redline/editmarkup.php 2011-11-16 08:39:44 UTC (rev 2459)
@@ -210,7 +210,12 @@
function OnPolyonDigitized(polygon)
{
- PromptAndSetMarkupText();
+ if(polygon.Count < 3)
+ { // clear invalid polygon
+ ClearDigitization();
+ return;
+ }
+ PromptAndSetMarkupText();
var geomText = polygon.Count;
for (var i = 0; i < polygon.Count; i++)
@@ -225,7 +230,7 @@
}
function SelectMarkup()
- {
+ {
markupFeatures = document.getElementById("markupFeatures");
reqParams = "MAPNAME=" + encodeURIComponent(mapName);
More information about the fusion-commits
mailing list