Ext.ux.touch.InfiniteCarousel icon indicating copy to clipboard operation
Ext.ux.touch.InfiniteCarousel copied to clipboard

onDataChange fix and tpl support

Open benbro opened this issue 15 years ago • 0 comments

Hi

Great component. In my app I need to reload the store so I changed the onDataChange to: onDataChange : function() { this.removeAll(true); if (this.items.items.length < 3) { this.createCards(-1); } }

And changed createCards to: createCards : function(index) { var numGet = 3-this.items.items.length; var currCard = this.getActiveItem(); //var currIndex = (Ext.isDefined(currCard)) ? currCard.recIndex : -1; var currIndex = (Ext.isDefined(currCard) && currCard) ? currCard.recIndex : -1; ... }

Is it possible to support a template for the cards instead of relaying on html in the record? if(this.cardTpl) { // use the tpl when creating the cmp and the record as the data for the tpl. } else { html = rec.get('html'); ... }

Thanks

benbro avatar Jan 12 '11 23:01 benbro