1

I'm making a 360 degree image viewer (in plain JavaScript) and i'm trying to make it so that when a user mouses left or right over the image it swaps images (creating the 360 effect) but only while they're holding down their mouse button.

I tried using the event's "which" property (equals 1 in Chrome when left mouse button is held but seems to always equal 1 in Safari and Firefox even when the mouse button isn't being held).

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
zero
  • 2,999
  • 9
  • 42
  • 67

1 Answers1

0

found the problem: i was using preventDefault() in mousemove instead of mousedown

zero
  • 2,999
  • 9
  • 42
  • 67