diff --git a/manifest-beta.json b/manifest-beta.json index 94bdc6f..a56c9dc 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "2.7.5-beta-1", + "version": "2.7.5", "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 9f4d921..2f29092 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "2.7.4", + "version": "2.7.5", "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 af5d2a0..ee1dd27 100644 --- a/src/shared/Dialogs/Messages.ts +++ b/src/shared/Dialogs/Messages.ts @@ -17,6 +17,32 @@ I develop this plugin as a hobby, spending my free time doing this. If you find
Buy Me a Coffee at ko-fi.com
`, +"2.7.5":` +## Fixed +- PDF export scenario described in [#2184](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2184) +- Elbow arrows do not work within frames [#2187](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2187) +- Embedding images into Excalidraw with areaRef links did not work as expected due to conflicting SVG viewbox and width and height values +- Can't exit full-screen mode in popout windows using the Command Palette toggle action [#2188](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2188) +- If the image mask extended beyond the image in "Mask and Crop" image mode, the mask got misaligned from the image. +- PDF image embedding fixes that impacted some PDF files (not all): + - When cropping the PDF page in the scene (by double-clicking the image to crop), the size and position of the PDF cutout drifted. + - Using PDF++ there was a small offset in the position of the cutout in PDF++ and the image in Excalidraw. + - Updated a number of scripts including Split Ellipse, Select Similar Elements, and Concatenate Lines + +## New in ExcalidrawAutomate +${String.fromCharCode(96,96,96)} + /** + * Add, modify, or delete keys in element.customData and preserve existing keys. + * Creates customData={} if it does not exist. + * Takes the element id for an element in ea.elementsDict and the newData to add or modify. + * To delete keys set key value in newData to undefined. So {keyToBeDeleted:undefined} will be deleted. + * @param id + * @param newData + * @returns undefined if element does not exist in elementsDict, returns the modified element otherwise. + */ + public addAppendUpdateCustomData(id:string, newData: Partial>); +${String.fromCharCode(96,96,96)} +`, "2.7.4":` ## Fixed - Regression from 2.7.3 where image fileId got overwritten in some cases diff --git a/src/view/ExcalidrawView.ts b/src/view/ExcalidrawView.ts index e51f08f..a3ad7a5 100644 --- a/src/view/ExcalidrawView.ts +++ b/src/view/ExcalidrawView.ts @@ -226,20 +226,25 @@ export const addFiles = async ( .forEach((f:FileData) => { s.scene.elements .filter((el:ExcalidrawElement)=>el.type === "image" && el.fileId === f.id && ( - (el.crop && el.crop.naturalWidth !== f.size.width) || !el.customData?.pdfPageViewProps + (el.crop && el.crop?.naturalWidth !== f.size.width) || !el.customData?.pdfPageViewProps )) .forEach((el:Mutable) => { - s.dirty = true; - const scale = f.size.width / el.crop.naturalWidth; - el.crop = { - x: el.crop.x * scale, - y: el.crop.y * scale, - width: el.crop.width * scale, - height: el.crop.height * scale, - naturalWidth: f.size.width, - naturalHeight: f.size.height, - }; - addAppendUpdateCustomData(el, { pdfPageViewProps: f.pdfPageViewProps}); + if(el.crop) { + s.dirty = true; + const scale = f.size.width / el.crop.naturalWidth; + el.crop = { + x: el.crop.x * scale, + y: el.crop.y * scale, + width: el.crop.width * scale, + height: el.crop.height * scale, + naturalWidth: f.size.width, + naturalHeight: f.size.height, + }; + } + if(!el.customData?.pdfPageViewProps) { + s.dirty = true; + addAppendUpdateCustomData(el, { pdfPageViewProps: f.pdfPageViewProps}); + } }); });