Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2300
in
a recent build.
-
Sencha User
Disable touch gesture recognizers
I'm trying to disable unused touch gesture recognizers. I use the eventPublishers configuration in Ext.application like described in the documentation, setting properties like doubleTap or swipe to null:
Code:
Ext.application({
eventPublishers: {
touchGesture: {
recognizers: {
doubleTap: null,
longPress: null,
swipe: null,
pinch: null,
rotate: null
}
}
},
// …
});
But i only get the following error in Ext.event.publisher.TouchGesture#registerRecognizer:
Uncaught TypeError: Cannot call method 'getHandledEvents' of null
It simply doesn't seem to be possible right now to disable recognizers.
-
Thank you for the report.
-
This should resolve your issue, it will be included in the next release. Please let me know if you still have the issue:
Code:
Ext.define('Ext.override.Recognizer', {
override: 'Ext.event.publisher.TouchGesture',
applyRecognizers: function(recognizers) {
var i, recognizer;
for (i in recognizers) {
if (recognizers.hasOwnProperty(i)) {
recognizer = recognizers[i];
if (recognizer) {
this.registerRecognizer(recognizer);
}
}
}
return recognizers;
}
});
Last edited by Jamie Avins; 2 Mar 2012 at 4:47 PM.
Reason: Actually put in the fix...
-
Sencha User
That's working for me, thank you.
-
Sencha User
Where to put this code?
Where to put this code? If i put in app.js or application.js, while building I am getting "Override target not found". What would be the solution?