Opened 10 years ago
Closed 9 years ago
#11637 closed enhancement (duplicate)
[Patch] Moved zoom and center management and coordinate conversion of MapView to a new class.
Reported by: | michael2402 | Owned by: | michael2402 |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | gsoc | Cc: |
Description
Zoom and center of the Navigatable component are now managed by a new class. This also imrpoves smooth scrolling.
Try switching the time for a DEFAULT scroll to e.g. 400ms and use the conflict zoom-to. Smooth zooming would be a nice thing to activate for many such actions and is now possible.
Attachments (1)
Change History (15)
by , 10 years ago
Attachment: | 0011-Moved-zoom-and-center-management-and-coordinate-conv.patch added |
---|
comment:1 by , 10 years ago
Keywords: | gsoc added |
---|---|
Milestone: | → 15.07 |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
More comments:
- You have two different (inner) classes
ZoomChangeListener
: This is a little confusing. Do you keep the old one for backward compatibility? If so, please mark it as deprecated and get rid of all usage in JOSM-core. - On
NavigationModel.ZoomChangeListener.zoomChanged
: Do you really need theNavigationModel
as method parameter? - What happened to
lastViewID
in MapView?
comment:4 by , 10 years ago
Milestone: | 15.07 → 15.08 |
---|---|
Owner: | changed from | to
Status: | new → needinfo |
comment:6 by , 10 years ago
Michael, did you already investigate bastiK's comments? Due to some changes on MapView
and NavigatableComponent
in the meanwhile, your patch does not apply any more.
comment:7 by , 10 years ago
Yes. Currently, I am re-doing some of that work and changing the MapView to have a single view state (Window/MapView position, Zoom, Projection and center). This allows me to have a clear state management and to observe changes more easilly. The map view will be observing size and position changes by itself and e.g. automatically update when pressing TAB instead of the current rememberLastPositionOnScreen() method (policy: Move keep center of map view if window also moved/was resized, keep position if window stayed is the same).
I am currently testing it and investigating how to forward the new interfaces to the layer paint()-Method to allow for parallel use of the state (parallel painting for Java2D, to back-port some of the OpenGL changes and fix some of the OpenGL problems ;-))
I'll be able to push a new patch in approx. 2 days.
comment:8 by , 10 years ago
Milestone: | 15.09 → 15.10 |
---|
Let's postpone MapView adaptions to the 15.10 release …
comment:9 by , 10 years ago
I am currently working on this branch:
https://github.com/michaelzangl/josm/tree/mapview-redesign
I moved everything new to the MapDisplay class that is extended by NavigateableComponent to separate new and old code. Wen can merge those two later.
comment:11 by , 9 years ago
Michael, I really like the direction this is going and the initial patch seems to be functional already. Do you think you can finish this? (Preferably in digestible chunks.)
comment:12 by , 9 years ago
Yes, I am already working on it. But it will take some more time.
I am currently reworking parts of it so that the new view management that also supports basic shape transformations (BBBox->Polygon, BBBox-> enclosing BBBox). That way much code should get cleaner.
I am also changing the transformation to allow for continuous east/north coordinates to fix that 180° problem.
I set up some scripts that help making the whole process easier and automatically create (small) patches.
comment:13 by , 9 years ago
I'm closing this Ticket in favor of the new implementation started in #12889. I'll reuse parts of this patch but create more, smaller patches.
comment:14 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | needinfo → closed |
Please split this patch, so the changes and additions can be reviewed more easily. (One part refactoring to new class without real modifications, other part all the rest.)