Compare commits

...

1 Commits

Author SHA1 Message Date
zsviczian 6e60df0b47 Removed determineFocusDistance() 2025-08-02 19:03:44 +02:00
3 changed files with 2 additions and 27 deletions
-3
View File
@@ -86,7 +86,6 @@ export const obsidianToExcalidrawMap: { [key: string]: string } = {
export let { export let {
sceneCoordsToViewportCoords, sceneCoordsToViewportCoords,
viewportCoordsToSceneCoords, viewportCoordsToSceneCoords,
determineFocusDistance,
intersectElementWithLine, intersectElementWithLine,
getCommonBoundingBox, getCommonBoundingBox,
getMaximumGroups, getMaximumGroups,
@@ -120,7 +119,6 @@ export function updateExcalidrawLib() {
const requiredFunctions = [ const requiredFunctions = [
'sceneCoordsToViewportCoords', 'sceneCoordsToViewportCoords',
'viewportCoordsToSceneCoords', 'viewportCoordsToSceneCoords',
'determineFocusDistance',
'intersectElementWithLine', 'intersectElementWithLine',
'getCommonBoundingBox', 'getCommonBoundingBox',
'measureText', 'measureText',
@@ -138,7 +136,6 @@ export function updateExcalidrawLib() {
({ ({
sceneCoordsToViewportCoords, sceneCoordsToViewportCoords,
viewportCoordsToSceneCoords, viewportCoordsToSceneCoords,
determineFocusDistance,
intersectElementWithLine, intersectElementWithLine,
getCommonBoundingBox, getCommonBoundingBox,
getMaximumGroups, getMaximumGroups,
+2 -17
View File
@@ -25,7 +25,6 @@ import {
COLOR_NAMES, COLOR_NAMES,
fileid, fileid,
GITHUB_RELEASES, GITHUB_RELEASES,
determineFocusDistance,
getCommonBoundingBox, getCommonBoundingBox,
getLineHeight, getLineHeight,
getMaximumGroups, getMaximumGroups,
@@ -1745,26 +1744,12 @@ export class ExcalidrawAutomate {
lastCommittedPoint: null, lastCommittedPoint: null,
startBinding: { startBinding: {
elementId: formatting?.startObjectId, elementId: formatting?.startObjectId,
focus: formatting?.startObjectId focus: 0.1,
? determineFocusDistance(
this.getElement(formatting?.startObjectId) as ExcalidrawBindableElement,
elementsMap,
endPoint,
startPoint,
)
: 0.1,
gap: GAP, gap: GAP,
}, },
endBinding: { endBinding: {
elementId: formatting?.endObjectId, elementId: formatting?.endObjectId,
focus: formatting?.endObjectId focus: 0.1,
? determineFocusDistance(
this.getElement(formatting?.endObjectId) as ExcalidrawBindableElement,
elementsMap,
startPoint,
endPoint,
)
: 0.1,
gap: GAP, gap: GAP,
}, },
//https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/388 //https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/388
-7
View File
@@ -106,13 +106,6 @@ declare namespace ExcalidrawLib {
}, },
): { x: number; y: number }; ): { x: number; y: number };
function determineFocusDistance(
element: ExcalidrawBindableElement,
elementsMap: ElementsMap,
a: GlobalPoint,
b: GlobalPoint,
): number;
function intersectElementWithLine( function intersectElementWithLine(
element: ExcalidrawBindableElement, element: ExcalidrawBindableElement,
a: GlobalPoint, a: GlobalPoint,