.todo/miapp.tools.sense.js
function onWhichEvent(sense, name, nbFinger) {
        var prefix = 'Short';
        if (sense.hasPaused) prefix = 'Long';
        var onEventName = 'on' + prefix + name + nbFinger;
        if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
            return onEventName;
        }
        if (sense.options.prefixPriority) {
            // the 'Short'/'Long' prefix has priority over the number of fingers  : sense-long-tap before sense-tap-2
            onEventName = 'on' + prefix + name;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
            onEventName = 'on' + name + nbFinger;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
        } else {
            // the number of fingers has priority over the 'Short'/'Long' prefix  : sense-tap-2 before sense-long-tap
            onEventName = 'on' + name + nbFinger;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
            onEventName = 'on' + prefix + name;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
        }
        onEventName = 'on' + name;
        if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
            return onEventName;
        }
        return '';
    }
function onWhichEvent(sense, name, nbFinger) {
        var prefix = 'Short';
        if (sense.hasPaused) prefix = 'Long';
        var onEventName = 'on' + prefix + name + nbFinger;
        if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
            return onEventName;
        }
        if (sense.options.prefixPriority) {
            // the 'Short'/'Long' prefix has priority over the number of fingers  : sense-long-tap before sense-tap-2
            onEventName = 'on' + prefix + name;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
            onEventName = 'on' + name + nbFinger;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
        } else {
            // the number of fingers has priority over the 'Short'/'Long' prefix  : sense-tap-2 before sense-long-tap
            onEventName = 'on' + name + nbFinger;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
            onEventName = 'on' + prefix + name;
            if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
                return onEventName;
            }
        }
        onEventName = 'on' + name;
        if (a4p.isDefined(sense[onEventName]) && (sense[onEventName] != null)) {
            return onEventName;
        }
        return '';
    }
function onWhichEvent ( sense , name , nbFinger ) { var prefix = 'Short' ; if ( sense . hasPaused ) prefix = 'Long' ; var onEventName = 'on' + prefix + name + nbFinger ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } if ( sense . options . prefixPriority ) { // the 'Short'/'Long' prefix has priority over the number of fingers  : sense-long-tap before sense-tap-2 onEventName = 'on' + prefix + name ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } onEventName = 'on' + name + nbFinger ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } } else { // the number of fingers has priority over the 'Short'/'Long' prefix  : sense-tap-2 before sense-long-tap onEventName = 'on' + name + nbFinger ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } onEventName = 'on' + prefix + name ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } } onEventName = 'on' + name ; if ( a4p . isDefined ( sense [ onEventName ] ) && ( sense [ onEventName ] != null ) ) { return onEventName ; } return '' ; }
Gesture events utilities
Gesture events utilities