mladenilic/threesixty.js

Listen for swipe gestures on a different element (instead of just the image itself).

markadrake opened this issue · 3 comments

Consider the following element on your web page:

image

By default: The target area for gestures will match the width/height of the image only:

image

Requested update: I'd propose a new property in the config to allow override of the default behavior, so you can listen for and capture gestures on another element all together. This would allow a user to interact with the 360 view within a much greater area:

image

I hope my suggestion is clear, please let me know if you'd like to see this as a PR. I have a project going on and may provide the perfect opportunity to make the change.

Hi @markadrake,

Sure, I'll merge such PR.

With backward compatibility in mind, let's keep the new config property optional, defaulting to the current value.

Thanks!

Hi @mladenilic thanks so much for your response. I'll get started on that PR next week. Look forward to your feedback! All the best,

Hi @markadrake,

ThreeSixty now supports optional swipeTarget config option. All swipe/drag events will be registered on this element. If this option is omitted from config, then image container is used as swipe target.

Best!