mardi 3 juin 2014

Is Sencha Touch supporting touchcancel and touchleave events for a component

hi,

I see only touchstart, touchmove and touchend events for a component in sencha touch kitchen sink example.

I tried implementing touchcancel and touchleave actions for a html5 canvas control extending Ext.Component but did not see those are firing. Is sencha touch really supporting these?



Code:



Ext.define('Forms.MobileControls.Standard.Canvas', {
extend: 'Ext.Component',
xtype: 'canvas',
getElementConfig: function () {
return {
reference: 'element',
classList: ['x-unsized'],
children: this.getTemplate(),
tag: 'canvas'
};
},
config: {
eventConfigArray: [],
ctx: null, // is set when rendered
canvas: null, // is set when rendered
applyStyle: false,
styleSettings: null,
border: 0,
borderColor: '',
backGroundColour: '',
listeners: {
element: 'element',
touchstart: function () {
this.fireEvent('touchstart', this, null);
},
touchmove: function () {
this.fireEvent('touchmove', this, null);
},
touchend: function () {
this.fireEvent('touchend', this, null);
},
touchcancel: function () {
this.fireEvent('touchcancel', this, null);
},
touchleave: function () {
this.fireEvent('touchleave', this, null);
},
}
}
..
}

Thanks,

Naresh


Aucun commentaire:

Enregistrer un commentaire