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