Skip to content

Conversation

lucaswoj
Copy link
Contributor

@lucaswoj lucaswoj commented Dec 1, 2015

fixes #1496

Allows touch / pinch rotation to be disabled via

map.pinch.disableRotation();

and enabled via

map.pinch.enableRotation();

cc @jfirebaugh @mcwhittemore @bhousel @mourner

@jfirebaugh
Copy link
Contributor

The handler Pinch isn't just about pinch, so it should be renamed to Touch, and the example code should read map.touch.disableRotation(). Let's fix this before publicizing this API.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Dec 1, 2015

Pinch doesn't encapsulate all touch events, just those that use two fingers. It does not handle panning, for example. Perhaps TwoFingeredTouch would be a more correct name but I think Pinch is ok for now.

Sounds like there's a bigger discussion about refactoring to be had.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Dec 2, 2015

@jfirebaugh How's TouchZoomRotate?

@lucaswoj lucaswoj force-pushed the disable-pinch-rotation-1496 branch from cc3843b to 70d4490 Compare December 3, 2015 18:54
@lucaswoj lucaswoj merged commit 70d4490 into master Dec 3, 2015
@lucaswoj lucaswoj deleted the disable-pinch-rotation-1496 branch December 3, 2015 19:02
@bgentry
Copy link

bgentry commented Dec 4, 2015

docs could probably also use an update to show how to disable touch rotate (maybe in the existing disable rotation example). Thanks for fixing this!

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Dec 4, 2015

@bgentry Agreed -- we need to fully document all these interaction handlers and put together an example.

@sheerun
Copy link

sheerun commented Apr 1, 2019

this would be better as option something like touchZoom: true

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.

Disable touch rotation
4 participants