fix modify opacity ea-script not processing NaN.

This commit is contained in:
zahuifan
2022-01-03 21:32:43 +08:00
parent be7c043871
commit dbb64e5044

View File

@@ -12,6 +12,9 @@ Although excalidraw has the opacity option in its native property Settings, it a
```javascript
*/
const alpha = parseFloat(await utils.inputPrompt("Background color opacity?","number","0.6"));
if(isNaN(alpha)) {
return;
}
const elements=ea.getViewSelectedElements().filter((el)=>["rectangle","ellipse","diamond","line","image"].includes(el.type));
ea.copyViewElementsToEAforEditing(elements);
ea.getElements().forEach((el)=>{