refactor: move getSyncableElements to CollabWrapper & expose isInvisiblySmallElement helper (#3471)

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
David Luzar
2021-04-21 23:37:44 +02:00
committed by GitHub
parent 37d513ad59
commit 3a0b6fb41b
6 changed files with 27 additions and 19 deletions

View File

@@ -6,7 +6,6 @@ import {
import CollabWrapper from "./CollabWrapper";
import { getSyncableElements } from "../../packages/excalidraw/index";
import { ExcalidrawElement } from "../../element/types";
import { BROADCAST, SCENE } from "../app_constants";
import { UserIdleState } from "../../types";
@@ -39,7 +38,9 @@ class Portal {
this.socket.on("new-user", async (_socketId: string) => {
this.broadcastScene(
SCENE.INIT,
getSyncableElements(this.collab.getSceneElementsIncludingDeleted()),
this.collab.getSyncableElements(
this.collab.getSceneElementsIncludingDeleted(),
),
/* syncAll */ true,
);
});