Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 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:

Description

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 Changed 5 years ago by bastiK

Resolution: fixed
Status: newclosed

In 7816/josm:

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

comment:2 Changed 5 years ago by bastiK

In 7817/josm:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.