From ec5f532b337b71727110909e1463f8e89bbad2f3 Mon Sep 17 00:00:00 2001 From: Andrey Kuznecov Date: Fri, 3 Mar 2023 12:34:37 +0700 Subject: [PATCH 1/2] fix --- src/deckgl2gisLayer.ts | 2 ++ src/utils.ts | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/deckgl2gisLayer.ts b/src/deckgl2gisLayer.ts index 040e835..d13b398 100644 --- a/src/deckgl2gisLayer.ts +++ b/src/deckgl2gisLayer.ts @@ -149,6 +149,8 @@ export class Deck2gisLayer implements DeckCustomLayer { if (this.deck) { removeLayer(this.deck, this); } + this.deck = null; + this.map = null; }; /** diff --git a/src/utils.ts b/src/utils.ts index 5626f54..840594f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -106,9 +106,6 @@ export function addLayer(deck: Deck, layer: Deck2gisLayer): void { export function removeLayer(deck: Deck, layer: Deck2gisLayer): void { (deck.props as CustomRenderProps)._2gisData._2gisCustomLayers.delete(layer); updateLayers(deck); - if ((deck.props as CustomRenderProps)._2gisData._2gisCustomLayers.size === 0) { - (deck.props as CustomRenderProps)._2gisData._2gisMap.__deck = undefined; - } } /** From 38c29985f8ef0aed7dc5eded35fea25b836aafe2 Mon Sep 17 00:00:00 2001 From: Andrey Kuznecov Date: Fri, 3 Mar 2023 12:42:53 +0700 Subject: [PATCH 2/2] up version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e587b66..3952b8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@2gis/deck2gis-layer", - "version": "1.1.8", + "version": "1.1.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@2gis/deck2gis-layer", - "version": "1.1.8", + "version": "1.1.9", "license": "BSD-2-Clause", "dependencies": { "@deck.gl/core": "8.8.17", diff --git a/package.json b/package.json index b968177..57ea866 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@2gis/deck2gis-layer", - "version": "1.1.8", + "version": "1.1.9", "description": "", "main": "dist/deck2gislayer.js", "typings": "dist/types/index.d.ts",