mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-02 10:02:12 +00:00
only show layer if it has been activated before
This commit is contained in:
@@ -51,8 +51,6 @@ export class ExtensionAPI {
|
|||||||
}
|
}
|
||||||
overlay.id = this.getOverlayId(overlay.id);
|
overlay.id = this.getOverlayId(overlay.id);
|
||||||
|
|
||||||
let show = get(this._overlays).get(overlay.id) === undefined;
|
|
||||||
|
|
||||||
this._overlays.update(($overlays) => {
|
this._overlays.update(($overlays) => {
|
||||||
$overlays.set(overlay.id, overlay);
|
$overlays.set(overlay.id, overlay);
|
||||||
return $overlays;
|
return $overlays;
|
||||||
@@ -85,6 +83,7 @@ export class ExtensionAPI {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const current = get(currentOverlays);
|
const current = get(currentOverlays);
|
||||||
|
let show = false;
|
||||||
if (current && isSelected(current, overlay.id)) {
|
if (current && isSelected(current, overlay.id)) {
|
||||||
show = true;
|
show = true;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user