lukesnowden / FSVS

Full Screen Vertical Scroll
https://www.lukesnowden.co.uk/full-screen-vertical-scroll/
722 stars 145 forks source link

API or event preventDefault to cancel slide #11

Closed interactivellama closed 9 years ago

interactivellama commented 9 years ago

First, thanks Luke for creating this.

I'm working on a demo for my company's Fuel UX controls and am using your plugin. There's a lot of scrolling <pre><code> in the project. The scrolling of the <pre> triggers the scrolling of the FSVS slides.

I looked for a way to disable slide and couldn't find one. I wrote a hack to disable FSVS on mouseover of <pre> with a global flag, but had to edit mouseWheelHandler(). Do you have a suggestion for implementing this? I don't mind creating a pull request, but would be interested in knowing the architecture you'd want.

My suggestion would be to be able to disable slide from within beforeSlide. Something like a return false that would allow my app to decide whether the animation occurs. Any thoughts?

lukesnowden commented 9 years ago

Hi Stephen,

Im out and about at the minute but i did implement this into the FSVS2 Demo: https://github.com/lukesnowden/FSVS/blob/development/assets/js/bundle.js#L253 You might be able to use some of the code here.

Will try take a look later

regards

Luke Snowden Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday, 2 February 2015 at 16:36, Stephen James wrote:

First, thanks Luke for creating this. I'm working on a demo for my company's Fuel UX controls (http://fuelux-tutorials.herokuapp.com/repeater) and am using your plugin. There's a lot of scrolling

 in the project. The scrolling of the 
 triggers the scrolling of the FSVS slides.
I looked for a way to disable slide and couldn't find one. I wrote a hack to disable FSVS on mouseover of 
 with a global flag, but had to edit mouseWheelHandler(). Do you have a suggestion for implementing this. I don't mind creating a pull request, but would be interested in knowing the architecture you'd want.
My suggestion would be to be able to disable slide from within beforeSlide. Something like a return false that would allow my app to decide whether the animation occurs. Any thoughts?

— Reply to this email directly or view it on GitHub (https://github.com/lukesnowden/FSVS/issues/11).

interactivellama commented 9 years ago

Awesome! Will look into. Thanks for the quick response.

lukesnowden commented 9 years ago

just add the class .scrollable to the area you want to allow scrolling to