Modify

Opened 9 years ago

Closed 8 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)

0011-Moved-zoom-and-center-management-and-coordinate-conv.patch (73.4 KB ) - added by michael2402 9 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Don-vip, 9 years ago

Keywords: gsoc added
Milestone: 15.07

comment:2 by bastiK, 9 years ago

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.)

comment:3 by bastiK, 9 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 the NavigationModel as method parameter?
  • What happened to lastViewID in MapView?

comment:4 by Don-vip, 9 years ago

Milestone: 15.0715.08
Owner: changed from team to michael2402
Status: newneedinfo

comment:5 by Don-vip, 9 years ago

Milestone: 15.0815.09

Milestone renamed

comment:6 by simon04, 9 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 michael2402, 9 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 simon04, 9 years ago

Milestone: 15.0915.10

Let's postpone MapView adaptions to the 15.10 release …

comment:9 by michael2402, 9 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:10 by simon04, 9 years ago

Milestone: 15.10

Unschedule tickets without progress

comment:11 by bastiK, 8 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 michael2402, 8 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 michael2402, 8 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 michael2402, 8 years ago

Resolution: duplicate
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain michael2402.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.