assets/elearnjs/extensions/quiz/assets/js/quiz.js
function ev_canvas(ev) {
        if(!root.is('.blocked')) {
            if(ev.layerX || ev.layerX == 0) { // Firefox
                ev._x = ev.layerX;
                ev._y = ev.layerY;
            } else if(ev.offsetX || ev.offsetX == 0) { // Opera
                ev._x = ev.offsetX;
                ev._y = ev.offsetY;
            }

            // Call the event handler of the tool.
            var func = tool[ev.type];
            if(func) {
                func(ev);
            }
        }
    }
function ev_canvas(ev) {
        if(!root.is('.blocked')) {
            if(ev.layerX || ev.layerX == 0) { // Firefox
                ev._x = ev.layerX;
                ev._y = ev.layerY;
            } else if(ev.offsetX || ev.offsetX == 0) { // Opera
                ev._x = ev.offsetX;
                ev._y = ev.offsetY;
            }

            // Call the event handler of the tool.
            var func = tool[ev.type];
            if(func) {
                func(ev);
            }
        }
    }
function ev_canvas ( ev ) { if ( ! root . is ( '.blocked' ) ) { if ( ev . layerX || ev . layerX == 0 ) { // Firefox ev . _x = ev . layerX ; ev . _y = ev . layerY ; } else if ( ev . offsetX || ev . offsetX == 0 ) { // Opera ev . _x = ev . offsetX ; ev . _y = ev . offsetY ; } // Call the event handler of the tool. var func = tool [ ev . type ] ; if ( func ) { func ( ev ) ; } } }
The general-purpose event handler. This function just determines the mouse position relative to the canvas element.
The general - purpose event handler . This function just determines the mouse position relative to the canvas element .