mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-10-16 04:18:19 +00:00
manage overlay opacity
This commit is contained in:
@@ -24,4 +24,16 @@ export function getLayers(node: LayerTreeType, layers: { [key: string]: boolean
|
||||
}
|
||||
});
|
||||
return layers;
|
||||
}
|
||||
|
||||
export function isSelected(node: LayerTreeType, id: string) {
|
||||
return Object.keys(node).some((key) => {
|
||||
if (key === id) {
|
||||
return node[key];
|
||||
}
|
||||
if (typeof node[key] !== "boolean" && isSelected(node[key], id)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user