[Mapbender-commits] r8887 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed May 21 05:42:10 PDT 2014


Author: hwbllmnn
Date: 2014-05-21 05:42:10 -0700 (Wed, 21 May 2014)
New Revision: 8887

Modified:
   trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
do not show and use fill- style attributes in style dialog when editing lines


Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-21 12:29:21 UTC (rev 8886)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-21 12:42:10 UTC (rev 8887)
@@ -235,6 +235,10 @@
             var kml = $('#mapframe1').data('kml');
             var url = $link.parent().parent().attr('title');
             var feature = kml._kmls[url].data.features[idx];
+            var isline = false;
+            if(feature.geometry.type.match(/line/i)) {
+                isline = true;
+            }
             var preview = editStyleDialog.find('.digitize-preview');
             preview.html('');
             preview = preview.get(0);
@@ -242,8 +246,12 @@
             $.each(feature.properties, function(k, v) {
                 editStyleDialog.find('input[name="' + k + '"]').val(v);
             });
+            editStyleDialog.find('input[name*="fill"]').parent().parent().css('display', isline ? 'none' : 'table-row');
             editStyleDialog.find('input').bind('change', function() {
                 editStyleDialog.find('input').each(function() {
+                    if(isline && $(this).attr('name').match(/fill/)) {
+                        return;
+                    }
                     feature.properties[$(this).attr('name')] = $(this).val();
                     kml.render();
                     var preview = editStyleDialog.find('.digitize-preview').html('').get(0);



More information about the Mapbender_commits mailing list