[Mapbender-commits] r8900 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu May 22 05:14:43 PDT 2014
Author: hwbllmnn
Date: 2014-05-22 05:14:43 -0700 (Thu, 22 May 2014)
New Revision: 8900
Modified:
trunk/mapbender/http/plugins/kmlTree.js
Log:
fixed reordering of objects
Modified: trunk/mapbender/http/plugins/kmlTree.js
===================================================================
--- trunk/mapbender/http/plugins/kmlTree.js 2014-05-22 10:08:12 UTC (rev 8899)
+++ trunk/mapbender/http/plugins/kmlTree.js 2014-05-22 12:14:43 UTC (rev 8900)
@@ -154,10 +154,10 @@
var kml = $('#mapframe1').data('kml');
var url = $(this).parent().attr('title');
var ids = [];
- var i = 0;
+ var i = $(this).children().length;;
$.each($(this).children(), function(k, v) {
ids.push($(v).attr('idx'));
- $(v).attr('idx', i++);
+ $(v).attr('idx', --i);
});
kml.reorderFeatures(url, ids.reverse());
}
More information about the Mapbender_commits
mailing list