Skip to content

Commit

Permalink
Fixup line layout example in README (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanderkamp authored May 3, 2023
1 parent 223cd29 commit 17354fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@ const { line } = WAMS.predefined.layouts;
const overlap = 200; // 200px overlap between screens
const setLineLayout = line(overlap);

function handleConnect(view, device) {
function handleConnect({ view, device }) { // note the {} brackets to destructure the event object
setLineLayout(view, device);
}

app.onconnect = handleConnect;
app.on('connect', handleConnect);
```

To see this layout in action with multi-screen gestures, check out the `shared-polygons.js` example.
Expand Down

0 comments on commit 17354fb

Please sign in to comment.