imports/vx/client/code/ux.js
/**
     * Determine whether a touch-friendly hotzone has been clicked on non-touch device.
     *
     * @param {object} event Event to analyze.
     * @param {string} hotzoneClass Class of hotzone to test.
     * @return {boolean} true if touch-friendly hotzone was clicked on non-touch device.
     */
Determine whether a touch-friendly hotzone has been clicked on non-touch device.
@param {object} event Event to analyze.
@param {string} hotzoneClass Class of hotzone to test.
@return {boolean} true if touch-friendly hotzone was clicked on non-touch device.
Determine whether a touch - friendly hotzone has been clicked on non - touch device . @param { object } event Event to analyze . @param { string } hotzoneClass Class of hotzone to test . @return { boolean } true if touch - friendly hotzone was clicked on non - touch device .
isHotzoneClick(event, hotzoneClass) {
        let touchDevice = UX.isTouch()
        let hotzoneEvent = $(event.currentTarget).hasClass(hotzoneClass)
        if (!touchDevice && !hotzoneEvent) {
        }
        else if (!touchDevice && hotzoneEvent) {
            return true  
        }
        else if (touchDevice && !hotzoneEvent) {
        }
        else if (touchDevice && hotzoneEvent) {
        }
        return false
    }
isHotzoneClick ( event , hotzoneClass ) { let touchDevice = UX . isTouch ( ) let hotzoneEvent = $ ( event . currentTarget ) . hasClass ( hotzoneClass ) if ( ! touchDevice && ! hotzoneEvent ) { } else if ( ! touchDevice && hotzoneEvent ) { return true } else if ( touchDevice && ! hotzoneEvent ) { } else if ( touchDevice && hotzoneEvent ) { } return false }
Determine whether a touch-friendly hotzone has been clicked on non-touch device.
Determine whether a touch - friendly hotzone has been clicked on non - touch device .
//OLog.debug("ux.js isHotzoneClick non-touch device control clicked, control classes="+$(event.currentTarget).attr("class")) //OLog.debug("ux.js isHotzoneClick non-touch device hotzone near control clicked, control classes="+$(event.currentTarget).attr("class")) // This particular case should be ignored, because a desktop user clicked somewhere outside the control //OLog.debug("ux.js isHotzoneClick touch device pressed control perfectly, control classes="+$(event.currentTarget).attr("class")) //OLog.debug("ux.js isHotzoneClick touch device missed control but pressed hotzone (as designed), control classes="+$(event.currentTarget).attr("class"))