PDA

View Full Version : CardSwipe PlugIn Overlaying Items problem



headkit
2 Mar 2012, 8:44 AM
hi there!

I use the CardSwipe Plugin for Sencha Touch (thanx for this great plugin!: https://github.com/mitchellsimoens/Ext.plugin.touch.CardSwipe) and there is one behaviour that I need to get under control:

when I swipe the panel very fast (with two fingers) I get two (or more) items of the panel overlaying each other. how could that happen and how could I prevent this?

thnx!

headkit
2 Mar 2012, 8:59 AM
o.k. I did the following:

added following params to the plugin panel:



isSliding: false,
listeners:{
beforecardswitch:function(cmp, newCard, oldCard, indx){cmp.isSliding = true;},
cardswitch:function(cmp, newCard, oldCard, indx){cmp.isSliding = false;}
}

and to the plugin itself I added


if(!cmp.isSliding) cmp.layout[func](me.anim, me.wrap);

to the "handleSwipe"-method.

thnx!