Forum /
Sencha Touch 1.x Forums /
Sencha Touch 1.x: Discussion /
Cancel Carousel Scroll
Cancel Carousel Scroll
I have a carousel with images. I would like to cancel the scroll when I pinch one of the images. It seems both events are fired. Basically I would like it to be more accurate, if it detects pinch, cancel swipe and the other way around.
Any ideas how to do that?
with 1.0 this became even worse. Now, when I pinch, the carousel first switches cards and then does a pinch and on the image before.
Yes, I also met this problem, have you solved the problem,waiting you message...
Here you go. Override the Carousel and add these functions.
// Check for Pinch Conflict
onDragStart: function(e) {
if(e.targetTouches.length == 1)
Flipbook.Flipbook.superclass.onDragStart.call(this,e);
},
// Check for Pinch Conflict
onDrag: function(e){
if(e.targetTouches.length == 1)
Flipbook.Flipbook.superclass.onDrag.call(this,e);
},
// Check for Pinch Conflict
onDragEnd: function(e) {)
if(e.targetTouches.length < 2)
Flipbook.Flipbook.superclass.onDragEnd.call(this,e);
},
Similar Threads
By ankuravlani in forum Sencha Touch 1.x: Bugs
Replies: 1
Last Post: 4 Nov 2010, 10:58 AM
By jodimas in forum Sencha Touch 1.x: Discussion
Replies: 4
Last Post: 4 Oct 2010, 12:20 AM
By omulriain in forum Sencha Touch 1.x: Discussion
Replies: 1
Last Post: 27 Sep 2010, 2:28 PM
By r00bal in forum Sencha Touch 1.x: Discussion
Replies: 0
Last Post: 13 Sep 2010, 4:10 AM
By orangechicken in forum Sencha Touch 1.x: Discussion
Replies: 1
Last Post: 30 Jun 2010, 5:31 PM
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us