Find a dynamic text box's height with Javascript

Explorer ,
Dec 19, 2021 Dec 19, 2021

Copy link to clipboard

Copied

Hey all Pretty sure this is not doable but trying anyways: I'm looking to read with Javascript the height of a text box as set inside Animate. Meaning - I have set a text box in Animate which is higher than the text that it holds. I would like to read the height of the box. For a given instance, named lets say "message", then this.message..getBounds().height, this.message..getMeasuredHeight(), etc... all return the height of the actual text, not the height of the box holding that text. Does anyone have an idea how to get the box's height? Thnx in advance!

Views

52

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Dec 19, 2021 Dec 19, 2021
Hi. As far as I can tell, that bounding box is only used in the author time. That information is not retained in the output. Perhaps a workaround would be to adjust your text box to have a height that is the multiple of a line of text. So you can get the height of one single line of text and multiply it by 2, 3, 4 and so on. Regards, JC

Likes

Translate

Translate
Adobe Community Professional ,
Dec 19, 2021 Dec 19, 2021

Copy link to clipboard

Copied

LATEST

Hi.

 

As far as I can tell, that bounding box is only used in the author time. That information is not retained in the output.

 

Perhaps a workaround would be to adjust your text box to have a height that is the multiple of a line of text. So you can get the height of one single line of text and multiply it by 2, 3, 4 and so on.

 

Regards,

JC

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines