scrollmonitor icon indicating copy to clipboard operation
scrollmonitor copied to clipboard

horizontal scrolling

Open musicformellons opened this issue 8 years ago • 8 comments

Looks nice! Can you use it also for horizontal instead of vertical scrolling?

musicformellons avatar Dec 09 '16 07:12 musicformellons

Unfortunately you cannot. It's a surprisingly rare feature request.

stutrek avatar Dec 09 '16 15:12 stutrek

Actually it will be very usefull

ferredel avatar Dec 12 '16 16:12 ferredel

I have to agree horizontal scroll would be useful.

jwebcat avatar Jun 28 '17 09:06 jwebcat

+1 it would be super useful to carousel

mcfog avatar Oct 11 '17 08:10 mcfog

Yes please!

johanneslamers avatar Nov 03 '17 09:11 johanneslamers

I don't recommend but if you really want to have or need a quick-win solution (but dirty), clone the not minimized version of scrollMonitor.js (and call it scrollMonitorHoriz.js, e.g.) and apply the following changes to the code:

  1. rename all "scrollMonitor" to "scrollMonitorHoriz"
  2. apply the following replacements (case sensitive):
  • "top" => "left"
  • "Top" => "Left"
  • "bottom" => "right"
  • "Bottom" => "Right"
  • "height" => "width"
  • "Height" => "Width"
  • "window.pageYOffset" => "window.pageXOffset"

and this should make the trick but that new version will no longer support the vertical scrolling...

boeledi avatar Dec 19 '17 12:12 boeledi

🤘 Nice hack.

I think there's a second place you'll need to edit if you want it to work in scroll containers too, but if it works keep doing it.

stutrek avatar Dec 19 '17 14:12 stutrek

+1 It would be very helpful!

jamesblasco avatar Apr 29 '18 17:04 jamesblasco