From 0837c017a1a3d565a0981d302edbd8441f113aeb Mon Sep 17 00:00:00 2001 From: dmscode Date: Sun, 15 Jun 2025 06:48:05 +0800 Subject: [PATCH 1/3] Update zh-cn.ts to 32d0301 --- src/lang/locale/zh-cn.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lang/locale/zh-cn.ts b/src/lang/locale/zh-cn.ts index bcb2c0c..1759657 100644 --- a/src/lang/locale/zh-cn.ts +++ b/src/lang/locale/zh-cn.ts @@ -203,14 +203,22 @@ export default { FOLDER_NAME: "Excalidraw 文件夹(區分大小寫!)", FOLDER_DESC: "新绘图的默认存储路径。若为空,将在库的根目录中创建新绘图。", + CROP_SUFFIX_NAME : "裁剪文件后缀" , + CROP_SUFFIX_DESC : + "为裁剪图像时创建的新图纸文件名的最后部分。" + + "如果不需要后缀,请留空。" , CROP_PREFIX_NAME: "剪贴文件的前缀", CROP_PREFIX_DESC: "当剪贴图片进来时保存的文件名的前缀。 " + - "留空则使用 'cropped_'", + "如果不需要前缀,请留空。" , + ANNOTATE_SUFFIX_NAME : "注释文件后缀" , + ANNOTATE_SUFFIX_DESC : + "为注释图像时创建的新绘图文件名的最后部分。" + + "如果不需要后缀,请留空。" , ANNOTATE_PREFIX_NAME: "标注文件的前缀", ANNOTATE_PREFIX_DESC: "在标注图像时创建新绘图的文件名的第一部分。" + - "留空则使用'annotated_'", + "如果不需要后缀,请留空。" , ANNOTATE_PRESERVE_SIZE_NAME: "在标注时保留图像尺寸", ANNOTATE_PRESERVE_SIZE_DESC: "当在 Markdown 中标注图像时,替换后的图像链接将包含原始图像的宽度。", From ad091df4d9ac27d41435f55660f8697347ec1a58 Mon Sep 17 00:00:00 2001 From: dmscode Date: Mon, 16 Jun 2025 06:52:20 +0800 Subject: [PATCH 2/3] Update zh-cn.ts to 32d0301 --- src/lang/locale/zh-cn.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/locale/zh-cn.ts b/src/lang/locale/zh-cn.ts index 1759657..36c3871 100644 --- a/src/lang/locale/zh-cn.ts +++ b/src/lang/locale/zh-cn.ts @@ -218,7 +218,7 @@ export default { ANNOTATE_PREFIX_NAME: "标注文件的前缀", ANNOTATE_PREFIX_DESC: "在标注图像时创建新绘图的文件名的第一部分。" + - "如果不需要后缀,请留空。" , + "如果不需要前缀,请留空。" , ANNOTATE_PRESERVE_SIZE_NAME: "在标注时保留图像尺寸", ANNOTATE_PRESERVE_SIZE_DESC: "当在 Markdown 中标注图像时,替换后的图像链接将包含原始图像的宽度。", From e5438c1e5698dfd32ba2ff9ac7e2656efc8620bd Mon Sep 17 00:00:00 2001 From: zsviczian Date: Mon, 16 Jun 2025 11:52:12 +0000 Subject: [PATCH 3/3] fixed determineFocusDistance function signature preventing ExcaliBrain from rendering --- manifest-beta.json | 2 +- manifest.json | 2 +- src/shared/Dialogs/Messages.ts | 4 ++++ src/shared/ExcalidrawAutomate.ts | 3 +++ src/types/excalidrawLib.d.ts | 3 ++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifest-beta.json b/manifest-beta.json index dd5626c..667e3f2 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "2.12.3", + "version": "2.12.4", "minAppVersion": "1.1.6", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/manifest.json b/manifest.json index a06f6ac..52ac609 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "2.12.3", + "version": "2.12.4", "minAppVersion": "1.1.6", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/src/shared/Dialogs/Messages.ts b/src/shared/Dialogs/Messages.ts index b8af288..413ced9 100644 --- a/src/shared/Dialogs/Messages.ts +++ b/src/shared/Dialogs/Messages.ts @@ -17,6 +17,10 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
Buy Me a Coffee at ko-fi.com
`, +"2.12.4":` +## Fixed +- ExaliBrain did not render after the 2.12.3 update. [#2384](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2384) +`, "2.12.3":` ## Minor fixes - Includes all recent updates and fixes from excalidraw.com diff --git a/src/shared/ExcalidrawAutomate.ts b/src/shared/ExcalidrawAutomate.ts index b71a36f..5550347 100644 --- a/src/shared/ExcalidrawAutomate.ts +++ b/src/shared/ExcalidrawAutomate.ts @@ -1715,6 +1715,7 @@ export class ExcalidrawAutomate { id = id ?? nanoid(); const startPoint = points[0] as GlobalPoint; const endPoint = points[points.length - 1] as GlobalPoint; + const elementsMap = arrayToMap(this.getElements()); this.elementsDict[id] = { points: normalizeLinePoints(points), lastCommittedPoint: null, @@ -1723,6 +1724,7 @@ export class ExcalidrawAutomate { focus: formatting?.startObjectId ? determineFocusDistance( this.getElement(formatting?.startObjectId) as ExcalidrawBindableElement, + elementsMap, endPoint, startPoint, ) @@ -1734,6 +1736,7 @@ export class ExcalidrawAutomate { focus: formatting?.endObjectId ? determineFocusDistance( this.getElement(formatting?.endObjectId) as ExcalidrawBindableElement, + elementsMap, startPoint, endPoint, ) diff --git a/src/types/excalidrawLib.d.ts b/src/types/excalidrawLib.d.ts index fc52c82..b79d45b 100644 --- a/src/types/excalidrawLib.d.ts +++ b/src/types/excalidrawLib.d.ts @@ -52,7 +52,7 @@ type EmbeddedLink = declare namespace ExcalidrawLib { type ElementUpdate = Omit< Partial, - "id" | "version" | "versionNonce" + "id" | "updated" >; type ExportOpts = { @@ -108,6 +108,7 @@ declare namespace ExcalidrawLib { function determineFocusDistance( element: ExcalidrawBindableElement, + elementsMap: ElementsMap, a: GlobalPoint, b: GlobalPoint, ): number;