From a8562ce3fbf41123d653788d626c117e4f5fef2f Mon Sep 17 00:00:00 2001 From: Oleksiy Protas Date: Tue, 22 Aug 2017 01:06:22 +0300 Subject: [PATCH] Hide objects instead of deleting Prevents #272 at a cost of a memory leak For demonstration purpose only --- frontend/app/components/CesiumMap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/CesiumMap.js b/frontend/app/components/CesiumMap.js index 896904e..98d05ee 100644 --- a/frontend/app/components/CesiumMap.js +++ b/frontend/app/components/CesiumMap.js @@ -296,7 +296,8 @@ export default class CesiumContainer extends Component { clearShape(shape) { if(defined(shape)) - this.viewer.entities.remove(shape); + shape.show = false; // TODO: very ugly, fix scheduled in #272 + //this.viewer.entities.remove(shape); } /* distance between latlon and cartesian */