Skip to content

Commit

Permalink
fix bug that prevented live drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Oct 12, 2024
1 parent 17efe27 commit 778c3b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions client-data/js/board.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,8 @@ Tools.removeToolListeners = function removeToolListeners(tool) {
})();

Tools.send = function (data, toolName) {
if (data.type !== "child") {
toolName = toolName || Tools.curTool.name;
data.tool = toolName;
}
toolName = toolName || Tools.curTool.name;
data.tool = toolName;
Tools.applyHooks(Tools.messageHooks, data);
var message = {
board: Tools.boardName,
Expand Down
2 changes: 1 addition & 1 deletion server/boardData.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class BoardData {
break;
case "child":
// We don't need to store 'type', 'parent', and 'tool' for each child. They will be rehydrated from the parent on the client side
const { parent, type, ...childData } = message;
const { parent, type, tool, ...childData } = message;
this.addChild(parent, childData);
break;
case "clear":
Expand Down

0 comments on commit 778c3b5

Please sign in to comment.