Changes between Initial Version and Version 2 of Ticket #23102


Ignore:
Timestamp:
2023-08-07T14:55:02+02:00 (11 months ago)
Author:
taylor.smock
Comment:

For the first one, I don't see a problem, but I would want to test it on different systems. With that said, we (kind of) already support that, via the JOSM Preferences -> Display -> Zoom steps to get double scale setting. So I don't know if we really need it.

For the second patch, I'm really not big fan. I don't know what version of Java you are using, but newer versions of Java have been cracking down on reflection, so I'd really like to avoid new (non-test) usage of reflection.

That is probably why you have the Run with --add-opens java.desktop/com.apple.eawt.event=ALL-UNNAMED comment. Realistically, that else statement should be checking to see if we are on mac (PlatformManager.isPlatformOsx()).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23102

    • Property Keywords macosx added
    • Property Summary Poor map navigation on macbooks[RFC PATCH] Poor map navigation on macbooks
  • Ticket #23102 – Description

    initial v2  
    55I've been looking through the code, and it looks like we can get closer to something good with some changes to src/org/openstreetmap/josm/gui/MapMover.java. Scrolling can be turned into (very nice and smooth) panning by changing mouseWheelMoved:
    66
    7 {{{
     7{{{#!diff
    88@@ -252,8 +317,19 @@
    99      */
     
    2828This leaves us without a zoom gesture. On macos the multitouch pinch gesture is accessed through the apple java specific GestureUtilities, We can use reflection to dynamically link against it (this was taken from https://gist.github.com/alanwhite/42502f20390baf879d093691ebb72066). Note that I'm manually keeping track of the fractional part of the zoom to make it feel a little better. Ideally the mapview should support fractional zooming internally, but I like this first change being single file:
    2929
    30 {{{
     30{{{#!diff
    3131@@ -106,6 +114,33 @@
    3232         }