Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10860 closed defect (fixed)

set initial viewport correctly when mapview is opened

Reported by: bastiK Owned by: team
Priority: normal Milestone: 14.12
Component: Core Version:
Keywords: Cc:


When you open an osm file after JOSM start (or download from the server), it first renders a larger area and after a split second zooms in to the download box.

This can be noticed in particular for a larger dataset where the rendering takes some time.

The viewport should be initialized correctly to avoid this glitch.

Technically, the problem is the the MapView dimensions are not available in the constructor. This is currently solved by listening for the first componentResized event and setting the zoom at that point. However, the componentResized comes after the first rendering is issued, so it is too late.

The only solution I see at the moment is to hook into the paint method and initialize the zoom there.

Attachments (0)

Change History (2)

comment:1 by bastiK, 9 years ago

Resolution: fixed
Status: newclosed

In 7816/josm:

fixed #10860 - set initial viewport correctly when mapview is opened

comment:2 by bastiK, 9 years ago

In 7817/josm:

fixed #10861 - Zoom to layer when opening new file (see #10860)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
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.