Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint committed Nov 20, 2023
1 parent 35dbd20 commit a575d44
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions editor/src/components/canvas/multiplayer-cursors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ const MultiplayerCursors = React.memo(() => {
const others = useOthers((list) => {
const presences = normalizeOthersList(me.id, list)
return presences.map((p) => ({
presence: p,
user: collabs[p.id],
presenceInfo: p,
userInfo: collabs[p.id],
}))
})

Expand All @@ -110,22 +110,22 @@ const MultiplayerCursors = React.memo(() => {
>
{others.map((other) => {
if (
other.presence.presence.cursor == null ||
other.presence.presence.canvasOffset == null ||
other.presence.presence.canvasScale == null
other.presenceInfo.presence.cursor == null ||
other.presenceInfo.presence.canvasOffset == null ||
other.presenceInfo.presence.canvasScale == null
) {
return null
}
const position = windowToCanvasCoordinates(
other.presence.presence.canvasScale,
other.presence.presence.canvasOffset,
other.presence.presence.cursor,
other.presenceInfo.presence.canvasScale,
other.presenceInfo.presence.canvasOffset,
other.presenceInfo.presence.cursor,
).canvasPositionRounded
return (
<MultiplayerCursor
key={`cursor-${other.presence.id}`}
name={other.user.name}
colorIndex={other.user.colorIndex}
key={`cursor-${other.presenceInfo.id}`}
name={other.userInfo.name}
colorIndex={other.userInfo.colorIndex}
position={position}
/>
)
Expand Down

0 comments on commit a575d44

Please sign in to comment.