axaq / traviso.js

Traviso is an open source JS engine that makes it easy to build isometric applications that run in a web browser.
MIT License
317 stars 41 forks source link

How to integrate pinch zoom? #17

Closed ricardo-wky closed 3 years ago

ricardo-wky commented 4 years ago

Hey axaq,

Great work with traviso.js, I'm loving it.

It has almost everything I need, except pinch zoom for mobile. I tried to integrate with hammer.js, without success.

What are the steps to make traviso work with pinch zoom?

Best regards

axaq commented 4 years ago

Hi @ricardo-wky

Thanks for nice words. I hope it helps you going forward.

Pinch zoom is a bit tricky since the map is draggable and the touch/mouse events are currently working against that. You would probably going to have to start to change the interaction methods here: https://github.com/axaq/traviso.js/blob/881652092fc417fd8671e215a302655700494513/src/traviso/EngineView.js#L1679

axaq commented 3 years ago

Closing due to no further discussion.