-
Shapelayer (box) autosizes to multiple text layers
Hi,
I have this design. Now I’m trying to have the red box autosize in width too the two clubs. So for example if the game would be PSV – ADO the red bar would be shorter. I guess shape position X axsis should scale up to X end from the last team. But not sure if that is possible?
Who is Team1 vs Team2 has the sourcetext pulled from a json file.
Allready got the position from the second team fixed to the first team.
gap = 50;
L = thisComp.layer("01_firstname");
r = L.sourceRectAtTime(time,false);
hisRight = L.position[0] + (r.left + r.width - L.anchorPoint[0])*L.scale[0]/100;
r = sourceRectAtTime(time,false);
myLeft = position[0] + (r.left - anchorPoint[0])*scale[0]/100;
delta = hisRight - myLeft;
value + delta + gap
Sorry, there were no replies found.
