feat(frontend): default to mouse and don't emit cursor while drawing
This commit is contained in:
parent
8a1f1b4210
commit
b0501824cf
@ -77,6 +77,9 @@ function main() {
|
||||
whiteboardId: whiteboardId,
|
||||
username: btoa(myUsername),
|
||||
sendFunction: function (content) {
|
||||
if (content.t === 'cursor') {
|
||||
if (whiteboard.drawFlag) return;
|
||||
}
|
||||
content["at"] = accessToken;
|
||||
signaling_socket.emit('drawToWhiteboard', content);
|
||||
$('#messageSentCount')[0].innerText = String(messageSentCount++);
|
||||
@ -631,6 +634,9 @@ function main() {
|
||||
whiteboard.setDrawColor(color.rgbaString);
|
||||
}
|
||||
});
|
||||
|
||||
// on startup select mouse
|
||||
shortcutFunctions.setTool_mouse();
|
||||
});
|
||||
|
||||
//Prevent site from changing tab on drag&drop
|
||||
|
@ -4,7 +4,7 @@ const whiteboard = {
|
||||
canvas: null,
|
||||
ctx: null,
|
||||
drawcolor: "black",
|
||||
tool: "pen",
|
||||
tool: "mouse",
|
||||
thickness: 4,
|
||||
prevX: null, //prev Mouse position
|
||||
prevY: null,
|
||||
|
Loading…
Reference in New Issue
Block a user