Closed danielbwa closed 12 years ago
Assuming you are using the SwipeView from here: http://cubiq.org/swipeview
You have to change the SwipeView class to cancel the default actions on the start event. I just added three lines in swipeview.js. Inside of the handleEvent function, I added "preventDefault()", "stopPropagation" and "return fale" in the startEvent case:
case startEvent: this.__start(e); e.preventDefault(); e.stopPropagation(); return false; break;
Here's an example showing it in action: http://triceam.github.com/app-UI/examples/samples/03%20-%20slidingView/03%20-%20swipeview/
and the source is here: https://github.com/triceam/app-UI/tree/master/samples/03%20-%20slidingView/03%20-%20swipeview
That fix prevents the touch/mousedown events from swipeview from propagating to the sliding view container
Thank you Andrew!
This is exactly what i needed!
2012/8/28 Andrew Trice notifications@github.com
That fix prevents the touch/mousedown events from swipeview from propagating to the sliding view container
— Reply to this email directly or view it on GitHubhttps://github.com/triceam/app-UI/issues/26#issuecomment-8076015.
Hey Andrew
Is it possible to open the SlidingView menu when i click on a button?
Hey Andrew,
I'm working on a small app and i used App UI "sliding view" as a start to have a fb style side menu. While working on this i have a small issue: I have a gallery (swipeview) in the #body div. The touchstart event from app UI is observing a swipe in the #body div so now when i swipe in my img gallery the side menu gets triggerd..
Any idea on how i can make the slidingview.js a bit smarter so it doesn't show the menu on a swipe in the gallery (swipe in the div#slider)? the div #slider is in the #body div so its good that the swipe event gets triggerd but i would like to disable it for the #slider div.