mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-10 14:34:20 +00:00
Put the GUI change in Tools.change in a try {...} statement.
This circumvents a bug in IE9, where classList is not implemented.
This commit is contained in:
parent
beddafedcd
commit
0ed94cb1d2
1 changed files with 5 additions and 1 deletions
|
@ -105,7 +105,11 @@ Tools.change = function (toolName){
|
|||
|
||||
//Update the GUI
|
||||
var curToolName = (Tools.curTool) ? Tools.curTool.name : "";
|
||||
Tools.HTML.changeTool(curToolName, toolName);
|
||||
try {
|
||||
Tools.HTML.changeTool(curToolName, toolName);
|
||||
} catch (e) {
|
||||
console.error("Unable to update the GUI with the new tool. "+e);
|
||||
}
|
||||
Tools.svg.style.cursor = newtool.mouseCursor || "auto";
|
||||
|
||||
//There is not necessarily already a curTool
|
||||
|
|
Loading…
Reference in a new issue