Closed alvarotrigo closed 8 years ago
Any feedback on this?
I've been trying the following, but it seems the refresh it is not intended for this purpose?
$('button').click(function(){
myScroll.options.mouseWheel = false;
setTimeout(function () {
myScroll.refresh();
}, 0);
});
I got the idea from: https://groups.google.com/forum/#!topic/iscroll/LEvagkZqu_I
yes this is perfectly legit. be careful though because some options are used at startup so it might not be possible to change them on the fly. I'd say you should be safe with 99% of them
But the example link provided shows it is not working in my case with the mouseWheel
option ?
Is it possible in that case?
I told ya :)
So... should I assume from that answer that this method doesn't work for the mouseWheel
option?
Any workaround?
unfortunately, yes... BUT it would be easy to disable wheel on the fly.
All you have to do is to remove (or add) the following events from the this.wrapper element: 'wheel', 'mousewheel', 'DOMMouseScroll'
Thanks for it, I'll take a look at it.
very untested but should get you started
Thanks! Should I assume it doesn't support IE 8?
The docs are not very clear about it:
Out of the box multi-platform support. From older Android devices to the latest iPhone, from Chrome to Internet Explorer.
But it seems in the code it is missing the attachEvent
event for IE < 9:
//add
this.wrapper.attachEvent('onmousewheel', this); //IE 6/7/8
//remove
this.wrapper.detachEvent('onmousewheel', this); //IE 6/7/8
IE8 is not supported, the latest commit adds some kind of IE8 compatibility @sculove can help you with that. IE8 should burn in hell!
Yeah, not such a big deal anyways. Just wondering.
i am trying to remove snap once the scroll reaches the first snap so it can scroll normal after. I managed to set snap = false and refreshed but it throws this error which causes the animation to pause
Cannot read property 'length' of undefined
whats the best way to remove snap and bring it back in as needed or achieve what i am trying to do
@eliteproxy7 try myScroll.options.snap = false; worked for me
Is there a way to change iScroll options dynamically without having to destroy and initialize it again?
In my case I would like to set
mouseWheel
value depending on some events. I didn't see anything in the docs about it, but I might have missed it...