Opened 9 years ago
Closed 9 years ago
#12593 closed defect (wontfix)
Missing steps on zoom slider
Reported by: | Adrian | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | template_report zoom slider scale | Cc: |
Description
What steps will reproduce the problem?
- Load some data into JOSM
- Put the focus on the zoom slider
- Operate the left and right arrow keys
- Observe that the scale changes in steps of 10%
- Drag the zoom slider
What is the expected result?
The scale changes in steps of 10%
What happens instead?
About one-third of the steps are inaccessible, so quite often the scale changes with a step of 20%
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-02-28 14:07:49 +0100 (Sun, 28 Feb 2016) Build-Date:2016-02-28 22:44:23 Revision:9900 Relative:URL: ^/trunk Identification: JOSM/1.5 (9900 en) Mac OS X 10.9.5 Memory Usage: 1490 MB / 3641 MB (498 MB allocated, but free) Java version: 1.8.0_74-b02, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Dataset consistency test: No problems found Plugins: - ImportImagePlugin (31772) - InfoMode (31772) - PicLayer (31895) - apache-commons (31895) - cadastre-fr (32060) - download_along (31772) - editgpx (31772) - ejml (31895) - geotools (31895) - imagery_offset_db (32046) - jts (31772) - log4j (31895) - measurement (31895) - opendata (32071) - poly (31772) - reverter (32005) - turnrestrictions (31895) - undelete (31895) - utilsplugin2 (32018) - waydownloader (31772)
Attachments (1)
Change History (8)
comment:1 by , 9 years ago
by , 9 years ago
follow-up: 4 comment:2 by , 9 years ago
I'm not sure if I understand the problem described here. I do see all levels with changes of ~10% (based on scale number).
Do you have background imagery? If yes, did you turn off snapping to background imagery scales?
comment:3 by , 9 years ago
Keywords: | zoom slider scale added |
---|
comment:4 by , 9 years ago
Replying to wiktorn:
I'm not sure if I understand the problem described here. I do see all levels with changes of ~10% (based on scale number).
Do you have background imagery? If yes, did you turn off snapping to background imagery scales?
I did not have any background imagery. With r9900, dragging the zoom slider, and starting at maximum zoom, I get this sequence of steps in metres (latitude 43.3° and Mercator projection EPSG:3857):
7.04, 9.37, 11.3, 13.7, 16.6, 18.3 ...
With the left and right arrow keys I get
7.04, 7.75, 8.52, 9.37, 10.3, 11.3, 12.5, 13.7, 15.1, 16.6, 18.3 ...
With my patch, and dragging the zoom slider, I get
7.04, 8.52, 9.37, 10.3, 11.3, 12.5, 13.7, 15.1, 16.6, 18.3 ... (It seems there is a bug in JSlider which means the second step is always missing.)
comment:5 by , 9 years ago
I understand now.
I guess, that's not the bug in JSLider, it's just the fact, that we have 114 pixels for 150 zoom levels (JSlider values), hence not all of them are possible to get using mouse. We can make the slider wider, but I do not see the value from that, and bigger control will use more screen estate.
comment:6 by , 9 years ago
OK, the missing steps will have to be obtained by using the left and right arrow keys (with the focus on the zoom slider).
comment:7 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I have looked at this and it seems the only way to fix it is to make the zoom slider longer. Then, the scale needs to be moved to the right so that it remains centred beneath the slider. If you wish to adopt this idea, the attached diff does it. The diff is to be applied to file src/org/openstreetmap/josm/gui/MapView.java (Note the unusual format of the diff.)