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 FF even when the mouse button isn't being held).

Random Human
  • 926
  • 1
  • 14
  • 31
zero
  • 2,899
  • 8
  • 39
  • 63

1 Answers1

0

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

zero
  • 2,899
  • 8
  • 39
  • 63