Skip to content

Multi touch controls - #285

Merged
snide merged 12 commits into
mainfrom
multiTouchControls
May 27, 2025
Merged

Multi touch controls#285
snide merged 12 commits into
mainfrom
multiTouchControls

Conversation

@dgreenheck

@dgreenheck dgreenheck commented May 20, 2025

Copy link
Copy Markdown
Collaborator

Fixes #277

  • Two finger pinch and twist will zoom / rotate the scene on a touch capable device
  • Three fighter pinch and twist will zoom / rotate the map on a touch capable device
  • Migration to change scene related rotation values from int to real

@github-actions

github-actions Bot commented May 20, 2025

Copy link
Copy Markdown
Contributor

Fly Preview Deployments - Completed ✅

@dgreenheck

Copy link
Copy Markdown
Collaborator Author

@snide Give this a try on your iPad and let me know how you like the UX. I did some testing on my phone and it worked OK. Performance is awful, which is concerning since the iPhone 15 should be plenty powerful to run this. My iPad is very old and is on Safari 15 which does not have some of the modern web APIs needed so I wasn't able to test on that.

  • Scene controls are bound to 2 fingers (drag -> pan, pinch -> zoom, rotate ->. rotate)
  • Map controls are bound to 3 fingers (drag -> pan, pinch -> zoom, rotate ->. rotate)

FYI I have not fully tested all the other map layers yet.

@snide

snide commented May 21, 2025

Copy link
Copy Markdown
Contributor

Nice, this is great! Tested this in the following, which all seemed to work well. I think Android firefox be able to use pointer events, so don't know what's up there. When you use two fingers the whole scene disappears.

  • iOS Safari ✔️
  • iOS Firefox ✔️
  • iOS Chrome ✔️
  • Android Chrome ✔️
  • Android Firefox ❌

FYI I have not fully tested all the other map layers yet.

Yep. Noticed that regular mouse events (for erasing) look busted in this PR. Yell if you want me to do any deeper testing.

@snide

snide commented May 21, 2025

Copy link
Copy Markdown
Contributor

Also. FWIW, Android Firefox is less than 1% of usage, so don't break your back on it if it's hard to test. It's of course the browser I use, but that's not a good enough reason 🤣

@dgreenheck

Copy link
Copy Markdown
Collaborator Author

@snide I believe I fixed the issue with the fog/marker layers not working.

Did you want me to implement this on the web side in this PR as well or are you going to do that? It looks like your implementation has some additional complexity going on (looking at the scene mouse movement).

@snide

snide commented May 23, 2025

Copy link
Copy Markdown
Contributor

Awesome. I can take care of it when I get back.

@snide
snide merged commit 8653d53 into main May 27, 2025
@snide
snide deleted the multiTouchControls branch May 27, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow map/scene scale and rotation with pinch/expand/rotate two finger movements

2 participants