-
Position text box relative to bottom of previous text box
I need to position a text layer (inside an auto-scaling shape box) relative to the text layer above it.
My goal is to produce an essential graphics file with dynamic text boxes vertically positioned.
i.e.
HEADING
HEADING SECOND LINEParagraph starts here, relative to heading above.
Second paragraph starts here, relative to paragraph above.
I’ve managed to sort of get this working through parenting and anchor offset.
However when I type into the the child element (say the first or second paragraph above), the alignment offset begins to ‘creep’. I think this is because the auto-scaling text box effect relies on the anchors being centred.
I’ve trawled the forums and tried a heap of expressions to do this but can’t seem to work it out!
**UPDATE**
I worked it out! This places the following element at 50px below the Text1 layer.
a = thisComp.layer(“Text1”).transform.position[0];
b = thisComp.layer(“Text1”).transform.position[1];
c = thisComp.layer(“Text1”).sourceRectAtTime();Top = c.top;
Width = c.width;
Left= c.left;
Height = c.height;x=a;
y=b+Height+50;[x,y];