mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Merge c3b46d383c
into 192c4e7658
This commit is contained in:
commit
496cdd34b9
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ You'll need to supply `onSelect()` to handle opening of your collaboration dialo
|
||||||
|
|
||||||
```tsx live
|
```tsx live
|
||||||
function App() {
|
function App() {
|
||||||
const [excalidrawAPI, setExcalidrawAPI] = useState(null);
|
const [excalidrawAPI, setExcalidrawAPI] = useState<ExcalidrawImperativeAPI>();
|
||||||
const [isCollaborating, setIsCollaborating] = useState(false);
|
const [isCollaborating, setIsCollaborating] = useState(false);
|
||||||
return (
|
return (
|
||||||
<div style={{ height: "500px" }}>
|
<div style={{ height: "500px" }}>
|
||||||
|
@ -33,9 +33,9 @@ function App() {
|
||||||
username: "Pika",
|
username: "Pika",
|
||||||
avatarUrl: "../../../../img/pika.jpeg",
|
avatarUrl: "../../../../img/pika.jpeg",
|
||||||
});
|
});
|
||||||
excalidrawAPI.updateScene({ collaborators });
|
excalidrawAPI?.updateScene({ collaborators });
|
||||||
} else {
|
} else {
|
||||||
excalidrawAPI.updateScene({
|
excalidrawAPI?.updateScene({
|
||||||
collaborators: new Map(),
|
collaborators: new Map(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ function App() {
|
||||||
Show Collaborators
|
Show Collaborators
|
||||||
</label>
|
</label>
|
||||||
<Excalidraw
|
<Excalidraw
|
||||||
ref={(api) => setExcalidrawAPI(api)}
|
excalidrawAPI={(api) => setExcalidrawAPI(api)}
|
||||||
renderTopRightUI={() => (
|
renderTopRightUI={() => (
|
||||||
<LiveCollaborationTrigger
|
<LiveCollaborationTrigger
|
||||||
isCollaborating={isCollaborating}
|
isCollaborating={isCollaborating}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue