Skip to content

Commit

Permalink
2.6.3-beta-4
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed Nov 2, 2024
1 parent f7cd05f commit 59107f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "2.6.3-beta-3",
"version": "2.6.3-beta-4",
"minAppVersion": "1.1.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "MIT",
"dependencies": {
"@popperjs/core": "^2.11.8",
"@zsviczian/excalidraw": "0.17.6-10",
"@zsviczian/excalidraw": "0.17.6-11",
"chroma-js": "^2.4.2",
"clsx": "^2.0.0",
"@zsviczian/colormaster": "^1.2.2",
Expand Down
6 changes: 5 additions & 1 deletion src/CodeMirrorExtension/EditorHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Extension } from "@codemirror/state";
import ExcalidrawPlugin from "src/main";
import { HideTextBetweenCommentsExtension } from "./Fadeout";
import { debug, DEBUGGING } from "src/utils/DebugHelper";
export const EDITOR_FADEOUT = "fadeOutExcalidrawMarkup";

const editorExtensions: {[key:string]:Extension}= {
Expand All @@ -10,13 +11,16 @@ const editorExtensions: {[key:string]:Extension}= {
export class EditorHandler {
private activeEditorExtensions: Extension[] = [];

constructor(private plugin: ExcalidrawPlugin) {}
constructor(private plugin: ExcalidrawPlugin) {
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(EditorHandler, `ExcalidrawPlugin.construct EditorHandler`);
}

destroy(): void {
this.plugin = null;
}

setup(): void {
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(this.setup, `ExcalidrawPlugin.construct EditorHandler.setup`);
this.plugin.registerEditorExtension(this.activeEditorExtensions);
this.updateCMExtensionState(EDITOR_FADEOUT, this.plugin.settings.fadeOutExcalidrawMarkup);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ export default class ExcalidrawPlugin extends Plugin {
this.registerMonkeyPatches();

this.stylesManager = new StylesManager(this);
this.scriptEngine = new ScriptEngine(this);
await this.initializeFonts();
imageCache.initializeDB(this);

this.isReady = true;
switchToExcalidraw(this.app);
Expand All @@ -424,7 +427,6 @@ export default class ExcalidrawPlugin extends Plugin {

//initialization that can happen after Excalidraw views are initialized
this.registerEventListeners();
this.initializeFonts();
this.runStartupScript();
this.editorHandler = new EditorHandler(this);
this.editorHandler.setup();
Expand All @@ -434,8 +436,6 @@ export default class ExcalidrawPlugin extends Plugin {
this.registerEditorSuggest(new FieldSuggester(this));
this.setPropertyTypes();
this.taskbone = new Taskbone(this);
this.scriptEngine = new ScriptEngine(this);
imageCache.initializeDB(this);
});
}

Expand Down

0 comments on commit 59107f0

Please sign in to comment.