Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
chacha912 committed Aug 10, 2023
1 parent e521ac3 commit c3d00ac
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions examples/simultaneous-cursors/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ const App = () => {
doc.subscribe('presence', (event) => {
setClients(doc.getPresences());
});
doc.subscribe('others', (event) => {
if (event.type !== 'presence-changed') return;
});

await client.attach(doc, {
initialPresence: {
Expand All @@ -40,7 +37,6 @@ const App = () => {
yPos: 0,
},
pointerDown: false,
points: [],
},
});

Expand All @@ -67,14 +63,11 @@ const App = () => {
};
const handleMouseMove = (event) => {
doc.update((root, presence) => {
const points = doc.getMyPresence().points;
points.push([event.clientX, event.clientY]);
presence.set({
cursor: {
xPos: event.clientX,
yPos: event.clientY,
},
points,
});
});
};
Expand Down

0 comments on commit c3d00ac

Please sign in to comment.