Hey Kira,
the method is looking at the “source” of the footage at a certain time.
But the current time of the composition (which is default if you don’t give a number to .sourceRectAtTime() ) is not necessarily the current time of the source of a layer.
So you are seeing values for sourceRect that are out of sync: the method asks what is the sourceRect of this layer at its own 1:07 time (the current time-value of the comp), and that is what’s returned, even though that is not the currently displayed frame of this textlayer.
It’s confusing and unintuitive because for shape, solid, stills and text layers we’re not as aware of the actual inpoint and internal time of those layers as we are with a video or precomp.
Here is the fix:
l=thisComp.layer(index-1);
sr=l.sourceRectAtTime(l.sourceTime(time));
Now sr holds the sourceRect of the layer as we now see it. The l.sourceTime(time) method has figured out what time of the layer’s source is currently being displayed for us.