Types-for-Adobe
Types-for-Adobe copied to clipboard
Added definition of ElementPlacement.
#143 Added definition of ElementPlacement. Accordingly, the type of the argument insertionLocation has been changed to ElementPlacement.
Hi! See the top of the Illustrator typedef files for reference on how to declare enums. It'd be worth checking what the enumerated value equals, too, for accuracy!
Also note that the Illustrator docs have both a 2015.3 and a 2022 version, and this change should be added to both (assuming the enum exists in both)
Hi! I tried outputting it with alert, and for example:
alert(ElementPlacement.INSIDE) // shows "ElementPlacement.INSIDE"
alert(typeof ElementPlacement.INSIDE) // shows "object"
so I’m not sure whether it’s actually a string or an object. That’s why I wrote it the way I did but how should I declare it correctly? Sorry, I’m not very familiar with TypeScript… I don't know if this is correct, but I converted it to enum by specifying a string.
Also, I don’t have an environment to test against Illustrator 2015.3, so I didn’t update that version, but it does look like the enum existed back then. I’ll go ahead and add it.