CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.05k stars 3.51k forks source link

Timeline scrubber moves out of view #773

Open raviagrwl420 opened 11 years ago

raviagrwl420 commented 11 years ago

The timeline scrubber moves out of view when either real-time is out of current timeline view or it is played past the minimum or maximum visible values on the timeline.

In this case the timeline can be adjusted accordingly so that the timeline scrubber is always visible on the timeline.

mramato commented 11 years ago

My preference is that the timeline scrubber would follow the following rules.

  1. If the visible timeline interval includes the start or stop time, the scrubber moves as it does now.
  2. When the scrubber hits the end of the visible window, shifts the visible interval so that the scrubber stays in view. The scrubber itself would slow move to the middle of the timeline. So if you are looking at a small interval on a large animation time, the scrubber would basically always be in the middle.
  3. If someone drags the scrubber, it moves as it does now, but once animation resumes, it slowly moves back to the middle of the screen.

Hopefully I explained things clearly, but if not, let me know. These are just my opinions, so I would like to hear with @emackey thinks as well.

emackey commented 11 years ago

@mramato allow me to suggest:

  1. The visible interval has the same limits as now, namely in CLAMPED or LOOP_STOP mode it cannot show any time outside of the defined time interval, regardless of the following rules.
  2. While animating, when the scrubber reaches 2/3rds of the distance from the middle to either end of the visible window, while animating in the direction of that edge, the visible window begins panning at twice the speed of playback. This double-speed panning gently pushes the scrubber back towards the middle, even though the scrubber itself is still moving.
  3. If the double-speed panning is still in effect when the scrubber reaches the middle, it changes to single-speed panning, which effectively holds the scrubber in place in the center while time animates.
  4. Any use of the time controls or scrubber will abort the auto-panning. Also, auto-panning is aborted if it causes the start or stop time to become visible while in CLAMPED or LOOP_STOP mode (reaching the limits of rule 1). Once aborted, auto-panning does not resume until rule 2 is satisfied again.

Does this make sense? I hope it's the same as what you had in mind, just described differently.

mramato commented 11 years ago

Yeah @emackey I think we are on the same page. Thanks.

emackey commented 11 years ago

@macoda are you game for this?

raviagrwl420 commented 11 years ago

@mramato @emackey Thanks for your suggestions! You certainly made it much clearer.

It makes a lot more sense to work on this rather than 515 due to the difficulty in reproducing it. I am totally game for this and I will start working on this ASAP.

raviagrwl420 commented 11 years ago

@emackey , @mramato

I have been onto this for the past few days. Though I was not able to give much time, I have implemented the basic characteristics as mentioned by @emackey however the implementation is still a lot bugy and I am trying to sort it out.

I am sorry for the delay but I had to travel from the university to my home. I will finish this as soon as possible. I hope it wont be a problem.

mramato commented 11 years ago

No problem at all. There's no need to apologize. We're glad you're still working on it.

raviagrwl420 commented 11 years ago

I know it has been too long but I never got to finish this so I would like to do it now.

@emackey I wanted to know if this Any use of the time controls or scrubber will abort the auto-panning. also includes using the ShuttleRing to change the speed of animation.

emackey commented 11 years ago

Good question! The answer is no, you've found a valid exception to the rule. If the speed changes during auto-panning, then the auto-panning must modify its own speed to keep pace, and does not abort.

raviagrwl420 commented 11 years ago

Okay! I was expecting it to be so..

I already implemented the "double speed pan" for the visible window which gently pushes the scrubber to the middle and once it reaches the middle it changes to "single speed pan". But I still have some concerns:

  1. The middle is not exactly the "middle" but a "middle region" since there are occasions (with high animation speeds) when it zooms past the "middle".
  2. When the scrubber reaches the above mentioned "middle region" it stops since the "single speed pan" is now activated but if then the speed of animation is increased it overshoots in the other direction thus moving out of view from the other side. I am still unable to find a reason for this behavior.
  3. The total feel of the scrubber and visible window panning together is a lot shaky.
mramato commented 11 years ago

@macoda if you think you are close, but stuck on a few issues; feel free to open a pull request early and we can give you direct feedback on the code in order to help you out.

pjcozzi commented 7 years ago

OBE since this hasn't come up in four years?

hpinkos commented 7 years ago

This hasn't been very high priority, but it would be good to address whenever we get a chance to revamp the timeline

mramato commented 7 years ago

It has come up and it actually a giant PIA when working with time dynamic data to not have this.

mramato commented 7 years ago

The main problem is the entire Timeline really needs to be rewritten.