Shape following right-justified text
Hi everyone!
I have this expression which works great. It's made for a shape (in this example a dot) to follow the end of a text.
My problem now is, that i dont know how to make it work, when the text is right-justified instead. Because right now it only works on left-justified text.
In this picture you can see how it works right now. It follows the end of the text:

This is the expression used:
x=thisComp.layer("SText").sourceRectAtTime(time,true).width + thisComp.layer("SText").transform.position[0] + effect("x Offset")("Slider");
Now i want to right-justify the text and make the dot follow the other end of the text, so it ends up looking like this everytime i type a new text:

Hope someone can help!
Thanks in advance 🙂
Best regards,
Niklas
