From ad9ca11c10661e3a8093040932c2a96dfb11b73f Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 29 Jan 2024 18:14:02 +0100 Subject: [PATCH] Fix #1741 --- src/Models/ThemeViewState.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Models/ThemeViewState.ts b/src/Models/ThemeViewState.ts index 14eed5ca3..4895ee1aa 100644 --- a/src/Models/ThemeViewState.ts +++ b/src/Models/ThemeViewState.ts @@ -761,20 +761,9 @@ export default class ThemeViewState implements SpecialVisualizationState { * Setup various services for which no reference are needed */ private initActors() { - // Unselect the selected element if it is panned out of view - this.mapProperties.bounds.stabilized(250).addCallbackD((bounds) => { - const selected = this.selectedElement.data - if (selected === undefined) { - return - } - const bbox = BBox.get(selected) - if (!bbox.overlapsWith(bounds)) { - this.selectedElement.setData(undefined) - } - }) - this.selectedElement.addCallback((selected) => { if (selected === undefined) { + console.trace("Unselected") // We did _unselect_ an item - we always remove the lastclick-object this.lastClickObject.features.setData([]) this.selectedLayer.setData(undefined)