Extend the timeline when new data added

We are doing hotspot points and are showing another point as a moving item following the track of the points. You can see the Blue circle is the moving item and the others are static points.

This all works well however we want to get additional data and add it to the end. We are using
viewer.timeline.zoomTo(startDate, endDate);

Is there any way to extend the endDate without going back to the start?

Just going viewer.timeline.zoomTo(viewer.clock.startTime, newEndDate); should do what you need, right? Here’s a Sandcastle example. Click “Extend” to extend the timeline as the clock continues to move.

Hmm I thought that was what I was doing but it was going back to the start.

That example is exactly what I’m trying to do so I’m obviously doing something wrong.

Thanks!

So my apologies! It was definitely user error!

I discovered I had this.
viewer.clock.currentTime = startTime;

So was doing the zoomTo then further down resetting the currentTime!