mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
fixed determineFocusDistance function signature preventing ExcaliBrain from rendering
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -17,6 +17,10 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
|
||||
|
||||
<div class="ex-coffee-div"><a href="https://ko-fi.com/zsolt"><img src="https://storage.ko-fi.com/cdn/kofi6.png?v=6" border="0" alt="Buy Me a Coffee at ko-fi.com" height=45></a></div>
|
||||
`,
|
||||
"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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
3
src/types/excalidrawLib.d.ts
vendored
3
src/types/excalidrawLib.d.ts
vendored
@@ -52,7 +52,7 @@ type EmbeddedLink =
|
||||
declare namespace ExcalidrawLib {
|
||||
type ElementUpdate<TElement extends ExcalidrawElement> = Omit<
|
||||
Partial<TElement>,
|
||||
"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;
|
||||
|
||||
Reference in New Issue
Block a user