Skip to content

Commit

Permalink
Fix getLegendUrl after merge pull request merge #319
Browse files Browse the repository at this point in the history
  • Loading branch information
volterra79 committed Feb 6, 2023
1 parent ba5a72d commit b8c5da0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/CatalogLayerLegend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
async setLayerCategories(all=false) {
try {
const projectLayer = this.getProjectLayer();
const categories = projectLayer.getCategories();
Expand Down Expand Up @@ -178,9 +177,9 @@
nodes.forEach(({icon, title, symbols = []}) => {
if (icon) symbols = [{icon, title}];
categories.forEach(category => {
category.disabled =
("undefined" !== typeof category.checked ? category.checked : true) &&
false == symbols.find(symbol => symbol.icon === category.icon && symbol.title === category.title);
const find = symbols.find(symbol => symbol.icon === category.icon && symbol.title === category.title);
const disabled = "undefined" !== typeof category.checked ? category.checked : true;
category.disabled = disabled && !find;
});
})
} else {
Expand Down Expand Up @@ -230,7 +229,7 @@
CatalogEventHub.$on('layer-change-style', this.handlerChangeLegend);
// Get all legend graphics of a layer when start
if(this.layer.visible) {
if (this.layer.visible) {
this.setLayerCategories(true).then(() => {
if (this.dynamic) {
GUI.getService('map').on('change-map-legend-params', async () => {
Expand Down

0 comments on commit b8c5da0

Please sign in to comment.