Skip to content

Commit

Permalink
fix: current object not mixed with other overlays (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
juggler31 committed Mar 20, 2024
1 parent 1ef7b03 commit aced066
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHANGELOG
**Bug fixes**

- 'Others' color config to use with leaflet overlay (#290)
- Current object not mixed with other overlays (#292)

8.7.1 (2024-03-13)
-------------------
Expand Down
6 changes: 0 additions & 6 deletions mapentity/static/mapentity/mapentity.detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ $(document).ready(function () {
});
map.layerscontrol.addOverlay(layer, objectsname, verbosename);

// Change the group layer "verbosename" (current object list) in first position
var allOverlaysLayers = document.getElementsByClassName('leaflet-control-layers-overlays')[0];
if (allOverlaysLayers) {
allOverlaysLayers.insertBefore(allOverlaysLayers.lastChild, allOverlaysLayers.firstChild);
}

// Add object family layer (without current object)
map.on('layeradd', function (e) {
var options = e.layer.options || { 'modelname': 'None' };
Expand Down
4 changes: 0 additions & 4 deletions mapentity/static/mapentity/mapentity.forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ MapEntity.GeometryField = L.GeometryField.extend({
var nameHTML = '<span style="color: '+ style['color'] + ';">&#x25A3;</span>&nbsp;' + objectsname;
map.layerscontrol.addOverlay(objectsLayer, nameHTML, tr("Objects"))

// Change the group layer "Objects" (current object list) in first position
var allOverlaysLayers = document.getElementsByClassName('leaflet-control-layers-overlays')[0];
allOverlaysLayers.insertBefore(allOverlaysLayers.lastChild, allOverlaysLayers.firstChild);

var url = this.modelLayerUrl();
objectsLayer.load(url);
},
Expand Down
4 changes: 0 additions & 4 deletions mapentity/static/mapentity/mapentity.map.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@ $(window).on('entity:map:list', function (e, data) {
}
);

// Change the group layer "Objects" (current object list) in first position
var allOverlaysLayers = document.getElementsByClassName('leaflet-control-layers-overlays')[0];
allOverlaysLayers.insertBefore(allOverlaysLayers.lastChild, allOverlaysLayers.firstChild);

$(window).unload(function () {
MapEntity.Context.saveFullContext(map, {
filter: '#mainfilter',
Expand Down

0 comments on commit aced066

Please sign in to comment.