[fusion-commits] r2475 - trunk/widgets/Redline
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Dec 2 00:12:48 EST 2011
Author: liuar
Date: 2011-12-01 21:12:48 -0800 (Thu, 01 Dec 2011)
New Revision: 2475
Modified:
trunk/widgets/Redline/editmarkup.php
Log:
Fix ticket #498 [Redline]the panel has all the labels missing if user draws a invalid polygon.
Stop creating redline features if user digitizes an invalid polygon.
Modified: trunk/widgets/Redline/editmarkup.php
===================================================================
--- trunk/widgets/Redline/editmarkup.php 2011-12-01 10:04:17 UTC (rev 2474)
+++ trunk/widgets/Redline/editmarkup.php 2011-12-02 05:12:48 UTC (rev 2475)
@@ -211,6 +211,14 @@
function OnPolyonDigitized(polygon)
{
+ if(polygon.Count < 3)
+ {
+ // invalid polygon
+ ClearDigitization();
+
+ return;
+ }
+
PromptAndSetMarkupText();
var geomText = polygon.Count;
@@ -359,7 +367,7 @@
$selected = 'selected';
foreach($markupFeatures as $markupId => $markupText) {
?>
- <option value="<?= $markupId ?>" <?=$selected ?> ><?= (strlen($markupText) > 0) ? htmlentities($markupText) : '[no text]' ?></option>
+ <option value="<?= $markupId ?>" <?=$selected ?> ><?= (strlen($markupText) > 0) ? $markupText : '[no text]' ?></option>
<?php
$selected = '';
}
More information about the fusion-commits
mailing list