mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: remote pointers not accounting for offset (#2855)
This commit is contained in:
parent
0a0be839b9
commit
e75f5f20e7
2 changed files with 9 additions and 1 deletions
|
@ -418,7 +418,9 @@ export const renderScene = (
|
|||
// Paint remote pointers
|
||||
for (const clientId in sceneState.remotePointerViewportCoords) {
|
||||
let { x, y } = sceneState.remotePointerViewportCoords[clientId];
|
||||
const username = sceneState.remotePointerUsernames[clientId];
|
||||
|
||||
x -= appState.offsetLeft;
|
||||
y -= appState.offsetTop;
|
||||
|
||||
const width = 9;
|
||||
const height = 14;
|
||||
|
@ -473,6 +475,8 @@ export const renderScene = (
|
|||
context.fill();
|
||||
context.stroke();
|
||||
|
||||
const username = sceneState.remotePointerUsernames[clientId];
|
||||
|
||||
if (!isOutOfBounds && username) {
|
||||
const offsetX = x + width;
|
||||
const offsetY = y + height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue