Copy link to clipboard
Copied
I'm looking for a way to get the canvas width and height after having opened the page and posibly resized the page.
My publish settings have to be on responsive but I need to get the widht and height my canvas was when it was drawn. If I after opening the page and resizing it simply get the width/height of the canvas by looking at it's current state this won't give me the initial values of width and height but it will return the current height and width.
I need to know the width and height it is when its not resized when it's currently resized to place an object on the mouse location after click and for this i need to calculate the ratio between the original size of the canvas and the current size. I can't add the width and the height of my drawing to my script because the width and height can be different and i would like to not have to edit the script each time.
Copy link to clipboard
Copied
Hi.
Use:
lib.properties.width;
lib.properties.height;
The essential document properties defined in the FLA are stored in this global var called lib that is created in the publishing process.
Regards,
JC