diff --git a/src/js/whiteboard.js b/src/js/whiteboard.js index 37fec0e..6ee6531 100644 --- a/src/js/whiteboard.js +++ b/src/js/whiteboard.js @@ -1053,14 +1053,22 @@ const whiteboard = { var textBoxPosition = textBox.position(); _this.sendFunction({ t: "setTextboxPosition", - d: [txId, textBoxPosition.top, textBoxPosition.left], + d: [ + txId, + textBoxPosition.top - _this.viewCoords.y, + textBoxPosition.left - _this.viewCoords.x, + ], }); }, drag: function () { var textBoxPosition = textBox.position(); _this.sendFunction({ t: "setTextboxPosition", - d: [txId, textBoxPosition.top, textBoxPosition.left], + d: [ + txId, + textBoxPosition.top - _this.viewCoords.y, + textBoxPosition.left - _this.viewCoords.x, + ], }); }, });