mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-10 14:34:20 +00:00
Log errors with console.error instead of console.log
This commit is contained in:
parent
49671de0b2
commit
e75a7d34aa
3 changed files with 8 additions and 7 deletions
|
@ -56,7 +56,7 @@
|
|||
continueLine(x,y);
|
||||
}
|
||||
|
||||
function continueLine (x,y){
|
||||
function continueLine (x,y, evt){
|
||||
/*Wait 70ms before adding any point to the currently drawing line.
|
||||
This allows the animation to be smother*/
|
||||
if (curLineId !== "" &&
|
||||
|
@ -65,6 +65,7 @@
|
|||
Tools.drawAndSend(curPoint);
|
||||
lastTime = performance.now();
|
||||
}
|
||||
if (evt) evt.preventDefault();
|
||||
}
|
||||
|
||||
function stopLine (x,y){
|
||||
|
@ -82,7 +83,7 @@
|
|||
case "point":
|
||||
var line = (renderingLine.id == data.line) ? renderingLine : svg.getElementById(data.line);
|
||||
if (!line) {
|
||||
console.log("Pencil: Hmmm... I received a point of a line I don't know...");
|
||||
console.error("Pencil: Hmmm... I received a point of a line I don't know...");
|
||||
line = renderingLine = createLine(data.id);
|
||||
}
|
||||
addPoint(line, data.x, data.y);
|
||||
|
@ -91,7 +92,7 @@
|
|||
//TODO?
|
||||
break;
|
||||
default:
|
||||
console.log("Pencil: Draw instruction with unknown type. ", data);
|
||||
console.error("Pencil: Draw instruction with unknown type. ", data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,15 +97,15 @@
|
|||
createTextField(data);
|
||||
break;
|
||||
case "update":
|
||||
var textField = document.getElementById(data.field);
|
||||
var textField = document.getElementById(data.id);
|
||||
if (textField===null) {
|
||||
console.log("Text: Hmmm... I received text that belongs to an unknown text field");
|
||||
console.error("Text: Hmmm... I received text that belongs to an unknown text field");
|
||||
return false;
|
||||
}
|
||||
updateText(textField, data.txt);
|
||||
break;
|
||||
default:
|
||||
console.log("Text: Draw instruction with unknown type. ", data);
|
||||
console.error("Text: Draw instruction with unknown type. ", data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"collaborative",
|
||||
"whiteboard"
|
||||
],
|
||||
"version": "0.1.0-44",
|
||||
"version": "0.1.0-49",
|
||||
"dependencies": {
|
||||
"node-static": "0.7.x",
|
||||
"socket.io": "0.9.x",
|
||||
|
|
Loading…
Reference in a new issue