Skip to content

Commit

Permalink
Small fixes to README
Browse files Browse the repository at this point in the history
  • Loading branch information
tomczoink committed Jul 28, 2023
1 parent 1a0b129 commit 3523ddf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The following is an example `membersUpdate` event received by listeners when a u

### Location

Member locations enable you to track where users are within an application. A location could a form field, multiple cells in a spreadsheet or a slide in a slide deck editor. Subscribe to all location updates, specific location, or locations changes for a given member.
Member locations enable you to track where users are within an application. A location could be a form field, multiple cells in a spreadsheet or a slide in a slide deck editor. Subscribe to all location updates, specific location, or locations changes for a given member.

```ts
// Register a listener to subscribe to events of when users change location
Expand All @@ -144,6 +144,7 @@ space.enter({

// Publish locationUpdate event with a client's location when they select a UI element
space.locations.set({ slide: '3', component: 'slide-title' });
```

The following is an example `locationUpdate` event received by subscribers when a user changes location:

Expand Down Expand Up @@ -209,4 +210,4 @@ The above listener will receive a `CursorUpdate` event:
"position": { "x": 864, "y": 32 },
"data": { "color": "red" }
}
```
```

0 comments on commit 3523ddf

Please sign in to comment.