refacto(src): a bit of cleaning

This commit is contained in:
Florent Chehab
2020-04-19 16:32:30 +02:00
parent 0a32a73742
commit 84b4ff019f
6 changed files with 51 additions and 61 deletions

View File

@@ -1,4 +1,10 @@
import keymage from "keymage";
import io from 'socket.io-client';
import whiteboard from "./whiteboard";
import keybinds from "./keybinds";
import Picker from "vanilla-picker";
function main(){
var whiteboardId = getQueryVariable("whiteboardid");
var randomid = getQueryVariable("randomid");
@@ -141,27 +147,22 @@ $(document).ready(function () {
setDrawColorBlack: function () {
whiteboard.setDrawColor("black");
whiteboard.redrawMouseCursor();
$("#whiteboardColorpicker").css({ "background": "black" });
},
setDrawColorRed: function () {
whiteboard.setDrawColor("red");
whiteboard.redrawMouseCursor();
$("#whiteboardColorpicker").css({ "background": "red" });
},
setDrawColorGreen: function () {
whiteboard.setDrawColor("green");
whiteboard.redrawMouseCursor();
$("#whiteboardColorpicker").css({ "background": "green" });
},
setDrawColorBlue: function () {
whiteboard.setDrawColor("blue");
whiteboard.redrawMouseCursor();
$("#whiteboardColorpicker").css({ "background": "blue" });
},
setDrawColorYellow: function () {
whiteboard.setDrawColor("yellow");
whiteboard.redrawMouseCursor();
$("#whiteboardColorpicker").css({ "background": "yellow" });
},
toggleLineRecCircle: function () {
@@ -682,4 +683,8 @@ function getQueryVariable(variable) {
}
}
return false;
}
}
}
export default main;