var original = mxKeyHandler.prototype.keyDown;
mxKeyHandler.prototype.keyDown = function () {
alert('internal handler callback');
original.apply(this, arguments);
};
var graph = new mxGraph(container);
var handler = new mxKeyHandler(graph);
handler.bindKey('65', function () { alert('I am active'); });
handler.destroy();
Assume that mxKeyHandler.prototype.keyDown handler should be removed on destroy:
Assume that mxKeyHandler.prototype.keyDown handler should be removed on destroy:
That's not critical but if you create and destroy key handlers dynamically during page life cycle a lot of junk handlers occupy browser resources.