mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
Update ExcalidrawView.ts
This commit is contained in:
@@ -861,7 +861,8 @@ export default class ExcalidrawView extends TextFileView {
|
||||
}
|
||||
};
|
||||
|
||||
const el: ExcalidrawElement[] = this.excalidrawAPI.getSceneElements();
|
||||
const newIds = newElements.map((e)=>e.id);
|
||||
const el: ExcalidrawElement[] = this.excalidrawAPI.getSceneElements().filter((e)=>!newIds.includes(e.id));
|
||||
let st: AppState = this.excalidrawAPI.getAppState();
|
||||
|
||||
if(repositionToCursor) newElements = repositionElementsToCursor(newElements,currentPosition,true);
|
||||
@@ -1398,4 +1399,4 @@ export default class ExcalidrawView extends TextFileView {
|
||||
export function getTextMode(data:string):TextMode {
|
||||
const parsed = data.search("excalidraw-plugin: parsed\n")>-1 || data.search("excalidraw-plugin: locked\n")>-1; //locked for backward compatibility
|
||||
return parsed ? TextMode.parsed : TextMode.raw;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user