Cleans event function.

This commit is contained in:
zorkow 2015-08-29 02:11:15 +01:00
parent 986ee52e8a
commit 576d6b2132

View File

@ -136,10 +136,13 @@
// Call the output jax's event handler or the zoom handler
//
Handler: function (event,type,math) {
console.log(type);
if (AJAX.loadingMathMenu) {return EVENT.False(event)}
var jax = OUTPUT[math.jaxID];
console.log(jax);
if (!event) {event = window.event}
event.isContextMenu = (type === "ContextMenu");
console.log(jax[type]);
if (jax[type]) {return jax[type](event,math)}
if (EXTENSION.MathZoom) {return EXTENSION.MathZoom.HandleEvent(event,type,math)}
},
@ -160,12 +163,8 @@
//
// Keydown event handler. Should only fire on Space key.
//
// TODO: (sorge) Fit this into the Handler function.
//
Keydown: function (event, math) {
var jax = OUTPUT[this.jaxID];
if (event.keyCode === EVENT.KEY.SPACE) {
// TODO: Put the focus on the first element.
EVENT.ContextMenu(event, this);
};
},