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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon May 12 01:56:28 PDT 2014


Author: hwbllmnn
Date: 2014-05-12 01:56:28 -0700 (Mon, 12 May 2014)
New Revision: 8839

Modified:
   trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
select item on edit, fixed zooming for right click context menu


Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-12 08:47:46 UTC (rev 8838)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2014-05-12 08:56:28 UTC (rev 8839)
@@ -196,6 +196,9 @@
 
     var contextmenuObject = function() {
         var $link = $(this);
+        if($link.attr('idx') === undefined) {
+            $link = $link.parent();
+        }
         var menu = $(geomMenu);
         $(document.body).append(menu);
         var pos = $link.offset();
@@ -205,11 +208,12 @@
                    function() {$(this).removeClass('ui-state-hover'); });
         menu.children('li:has(.digitize-zoomto)').bind('click', function() {
             var kml = $('#mapframe1').data('kml');
-            var url = $link.parent().parent().parent().attr('title');
-            kml.zoomToFeature(url, $link.parent().attr('idx'));
+            var url = $link.parent().parent().attr('title');
+            kml.zoomToFeature(url, $link.attr('idx'));
             menu.menu('destroy').remove();
         });
         menu.children('li:has(.digitize-pencil)').bind('click', function() {
+            $link.addClass('kmltree-selected').siblings().removeClass('kmltree-selected');
             editDialog.dialog('open');
             editDialog.find('.digitize-attributes').bind('click', function() {
                 attributesDialog.dialog('open');



More information about the Mapbender_commits mailing list