Skip to content

Commit

Permalink
[pr] skip rendering remote cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed Oct 10, 2023
1 parent 29b03a7 commit 1efc55b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/canvases/InteractiveCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const InteractiveCanvas = (props: InteractiveCanvasProps) => {
remoteSelectedElementIds[id].push(socketId);
}
}
if (!user.pointer) {
if (!user.pointer || user.pointer.renderCursor === false) {
return;
}
if (user.username) {
Expand Down
7 changes: 7 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ export type CollaboratorPointer = {
x: number;
y: number;
tool: "pointer" | "laser";
/**
* Whether to render cursor + username. Useful when you only want to render
* laser trail.
*
* @default true
*/
renderCursor?: boolean;
};

export type DataURL = string & { _brand: "DataURL" };
Expand Down

0 comments on commit 1efc55b

Please sign in to comment.