href : '',
getAutoCreate : function(){
- var cfg = {
+
+
+ var cfg = {
tag: 'div',
// item is needed for carousel - not sure if it has any effect otherwise
- cls: 'tab-pane item' + ((this.href.length) ? ' clickable ' : ''),
+ cls: 'carousel-item tab-pane item' + ((this.href.length) ? ' clickable ' : ''),
html: this.html || ''
};
cfg.tabId = this.tabId;
}
+
return cfg;
},
window.location.href = this.href;
},
+ startX : 0,
+ startY : 0,
+ endX : 0,
+ endY : 0,
swiping : false,
onTouchStart : function(e)
{
this.swiping = false;
+
+ this.startX = e.browserEvent.touches[0].clientX;
+ this.startY = e.browserEvent.touches[0].clientY;
},
onTouchMove : function(e)
{
this.swiping = true;
+
+ this.endX = e.browserEvent.touches[0].clientX;
+ this.endY = e.browserEvent.touches[0].clientY;
},
onTouchEnd : function(e)
{
- e.preventDefault();
-
if(!this.swiping){
this.onClick(e);
return;