|
|
|
@ -1380,17 +1380,18 @@ pwlib.gui = function (app) {
|
|
|
|
|
*
|
|
|
|
|
* @see PaintWeb#commandRegister to register a new command.
|
|
|
|
|
*/
|
|
|
|
|
this.commandClick = function (ev) {
|
|
|
|
|
var cmd = this.parentNode.getAttribute('data-pwCommand');
|
|
|
|
|
if (cmd && cmd in app.commands) {
|
|
|
|
|
app.commands[cmd].call(this, ev);
|
|
|
|
|
}
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
this.focus();
|
|
|
|
|
} catch (err) { }
|
|
|
|
|
};
|
|
|
|
|
this.commandClick = function (ev) {
|
|
|
|
|
var cmd = this.parentNode.getAttribute('data-pwCommand');
|
|
|
|
|
if (cmd && cmd in app.commands) {
|
|
|
|
|
app.commands[cmd].call(this, ev);
|
|
|
|
|
}
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
$(this).blur();
|
|
|
|
|
$(config.guiPlaceholder).focus();
|
|
|
|
|
} catch (err) { }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The <code>commandRegister</code> application event handler. GUI elements
|
|
|
|
|