corrected minor error

This commit is contained in:
zsviczian
2023-11-25 07:06:14 +01:00
parent e72c1676c2
commit 44c828c7e7
2 changed files with 4 additions and 2 deletions

View File

@@ -111,6 +111,7 @@ const getRequestObjFromSelectedElements = async (view) => {
new Notice ("Aborting because there is nothing selected.",4000);
return;
}
ea.copyViewElementsToEAforEditing(viewElements);
const bb = ea.getBoundingBox(viewElements);
const size = (bb.width*bb.height);
const minRatio = Math.sqrt(360000/size);
@@ -131,13 +132,14 @@ const getRequestObjFromSelectedElements = async (view) => {
const img =
await ea.createPNG(
view.file.path,
null,
scale,
exportSettings,
loader,
"light",
);
const dataURL = `data:image/png;base64,${await blobToBase64(img)}`;
ea.clear();
return { json: async () => ({ image: dataURL }) }
}

File diff suppressed because one or more lines are too long