Invert scrolling direction when dragging an enyo.scroller.

I'm looking for a way to invert the scroll direction of a scroller during drag interactions. At first I thought it'd be something simple like inverting the delta's on the drag events, but that doesn't work. Now I've been digging around the scrollMath component, but I'm having a hard time getting anything to change there as well. Does anyone know how I should approach this problem?

Comments

  • edited June 2014
    I was able to sort of do what you want by adding
    		inX = -inX;
    		inY = -inY;
    
    to the very beginning of the effectScroll() function in TouchScrollStrategy.js. It's not ideal, but it's a start.
  • Hey Dragongears,

    Thanx for the tip, I was focussing so much on the scrollMath component that I had missed the effectScroll method entirely! I'd perfer to find a solution that's ScrollStrategy agnostic, so I'll still like to see if I can get inX and inY to be flipped before the call to effectScroll, but aarontam gave me a few heads-ups on where to look for that, so I might be able to piece all this together now!
Sign In or Register to comment.