#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.
In 7816/josm: