Skip to content

Commit

Permalink
Support layer labels API format
Browse files Browse the repository at this point in the history
  • Loading branch information
nizetic committed Mar 26, 2024
1 parent 3056142 commit 5a9a079
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/store/response.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ export const useResponseStore = create((set, get) => ({
});
});
useLayersStore.getState().addPolygonLayers(polygonLayers);
drawing.textLayers.forEach(name => textLayerNames.add(name));
drawing.textLayers.forEach(layer => {
// check if layer is just string or object - to support old and new format
if (layer.name) {
textLayerNames.add(layer.name);
} else {
textLayerNames.add(layer);
}
});
});

if (polygonLayerNames.size === 0) {
Expand Down

0 comments on commit 5a9a079

Please sign in to comment.