-
Resize one side of a box (lower third) to text
I’m trying to get a lower third to re-scale according to the text I’m typing in – but I only want the right side of the box to re-size.
I’m using code on the ‘size’ of the rectangle path of my shape layer at the moment – do I need to play around with the position too?The code below is the one I’ve been using when I need both sides to adapt.
Thanks
margin = 23;
text_width = thisComp.layer("Text 2").sourceRectAtTime().width;
text_height = thisComp.layer("Text 2").sourceRectAtTime().height;
box_width = text_width + margin*14;
box_height = text_height + margin*2;
[box_width, box_height]