[Mapbender-commits] r8888 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed May 21 05:54:01 PDT 2014
Author: hwbllmnn
Date: 2014-05-21 05:54:01 -0700 (Wed, 21 May 2014)
New Revision: 8888
Modified:
trunk/mapbender/http/plugins/kmlTree.js
trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
allow de-selecting of objects in kml tree by clicking it again or closing the edit dialog
Modified: trunk/mapbender/http/plugins/kmlTree.js
===================================================================
--- trunk/mapbender/http/plugins/kmlTree.js 2014-05-21 12:42:10 UTC (rev 8887)
+++ trunk/mapbender/http/plugins/kmlTree.js 2014-05-21 12:54:01 UTC (rev 8888)
@@ -92,9 +92,7 @@
$('#mapframe1').data('kml').renderPreview(obj.data.features[i], preview, 20);
title = obj.data.features[i].properties.name;
- $feature.bind('click', function() {
- $(this).addClass('kmltree-selected').siblings().removeClass('kmltree-selected');
- });
+
$feature.bind('mouseout',(function(jsonFeature){return function(){
var map = o.$target.mapbender();
var g = new GeometryArray();
Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php 2014-05-21 12:42:10 UTC (rev 8887)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php 2014-05-21 12:54:01 UTC (rev 8888)
@@ -178,6 +178,7 @@
button.stop();
$(this).find('.digitize-image').unbind('click');
that.destroy();
+ $('#kmlTree li.kmltree-selected').removeClass('kmltree-selected');
});
attributesDialog = $(editAttributesHtml);
attributesDialog.dialog({
@@ -342,6 +343,11 @@
var editObject = function($link, menu) {
return function() {
editDialog.find('*').unbind();
+ if($link.hasClass('kmltree-selected')) {
+ console.log('has class?!?', $link);
+ editDialog.dialog('close');
+ return;
+ }
$link.addClass('kmltree-selected').siblings().removeClass('kmltree-selected');
var idx = $link.attr('idx');
var kml = $('#mapframe1').data('kml');
More information about the Mapbender_commits
mailing list