final textbox push

This commit is contained in:
Raphael 2022-07-07 15:17:41 +02:00
parent da6cd7e78d
commit aca566b5f4

View File

@ -1053,14 +1053,22 @@ const whiteboard = {
var textBoxPosition = textBox.position(); var textBoxPosition = textBox.position();
_this.sendFunction({ _this.sendFunction({
t: "setTextboxPosition", t: "setTextboxPosition",
d: [txId, textBoxPosition.top, textBoxPosition.left], d: [
txId,
textBoxPosition.top - _this.viewCoords.y,
textBoxPosition.left - _this.viewCoords.x,
],
}); });
}, },
drag: function () { drag: function () {
var textBoxPosition = textBox.position(); var textBoxPosition = textBox.position();
_this.sendFunction({ _this.sendFunction({
t: "setTextboxPosition", t: "setTextboxPosition",
d: [txId, textBoxPosition.top, textBoxPosition.left], d: [
txId,
textBoxPosition.top - _this.viewCoords.y,
textBoxPosition.left - _this.viewCoords.x,
],
}); });
}, },
}); });