question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace Navigator with AnimatedNavigator

See original GitHub issue

@radderz Do you think, that we need new functions for this? Wouldn’t it be not enough, if we set in all function the duration value to zero? As you can see, AnimatedNavigator checks always for duration == 0 and if true, it does the same as the old Navigator. So where is the advantage to have new functions?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:38 (38 by maintainers)

github_iconTop GitHub Comments

1reaction
charlennicommented, May 17, 2020

The main Navigator will have all of the current animation (and some more), so users do not have to switch back to the AnimatedNavigator.

AnimatedNavigator was made to replace the existing Navigator. It has the same functions plus a FlyTo function. @radderz added a FlingTo for the fling function. All other functions are only usefull, if Viewport gets more properties, which could be manipulated by the Navigator.

The only thing I could imagine is to add arguments for the easing function of an animation.

We still have an interface which includes the animation logic. It it is overriden animation logic can be ignore. I don’t see an actual use case for this but perhaps someone has already overriden it.

Radderz changes to INavigator made it ready for animations.

The AnimatedNavigator can be deprecated.

Yes

What more changes should go into that MR? What should further be tested?

  • We should update the MapControls for this behavior.
  • We should use the fling for all MapControls and check the zoom functions, if there are any (e.g. the mouse wheel zoom in Wpf).
  • We should check, if System.Timer is the correct timer for this work or if we should replace it by a special timer for this work.
  • We should think about the time steps of the timer. Perhaps 16 ms is to long.
0reactions
pauldendulkcommented, May 19, 2020

Reduce the Viewport to just public state, no methods. The current methods would be extension methods (I had this in mind also for other reasons).

There are only a few functions in Viewport:

  • Transform(): Is used to move the center of the Viewport in touch events. Should be moved to Navigator.
  • All conversions between screen coordinates and world coordinates. I assume, that you want to do this by extensions.
  • Anything else is state related. The Set… functions could be replaced by access of the properties.

Yes, that is what I had in mind. With the WindowExtent still a readonly property.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native transition animation for navigator.replace()
I'm working on a navigation that there's no more than one route in the stack. So I'm using replace() instead of the pop()...
Read more >
Stack Navigator
Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a stack....
Read more >
Navigation prop reference
navigate - go to another screen, figures out the action it needs to take to do it; reset - wipe the navigator state...
Read more >
Use the on-screen navigator—ArcGIS Pro | Documentation
Change the display view of the navigator to Heading mode (pan and north indicator only) or Full Control mode. Move up/Move down. Specific...
Read more >
Navigator class - widgets library - Dart API
A change in Navigator.pages will trigger an update to the stack of Routes. The Navigator will update its routes to match the new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found