From 2248cc15e36d5e7ee5bd8ccdbea3a82fe85afb75 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Thu, 27 Jul 2023 23:20:12 +0200 Subject: [PATCH] 0.2.2 --- manifest.json | 2 +- src/Scene.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 64e125b..56d22e2 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "excalibrain", "name": "ExcaliBrain", - "version": "0.2.1", + "version": "0.2.2", "minAppVersion": "1.1.6", "description": "A clean, intuitive and editable graph view for Obsidian", "author": "Zsolt Viczian", diff --git a/src/Scene.ts b/src/Scene.ts index 86fdb8f..c8dfc98 100644 --- a/src/Scene.ts +++ b/src/Scene.ts @@ -374,7 +374,12 @@ export class Scene { ea.clear(); const excalidrawAPI = ea.getExcalidrawAPI(); if(!retainCentralNode) { - excalidrawAPI.updateScene({elements:[]}); + ea.copyViewElementsToEAforEditing(ea.getViewElements()); + ea.getElements().forEach((el: Mutable)=>el.isDeleted=true); + excalidrawAPI.updateScene({ + elements: ea.getElements(), + }); + ea.clear(); } else { excalidrawAPI.updateScene({ elements:excalidrawAPI.getSceneElements().filter((el:ExcalidrawElement)=>this.rootNode.embeddedElementIds.includes(el.id))