mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Cache received changes, ignore snapshot cache for durable changes, revert StoreAction, history fix, indices fix
This commit is contained in:
parent
310a9ae4e0
commit
7e0f5b6369
50 changed files with 437 additions and 338 deletions
|
@ -15,7 +15,7 @@ import type {
|
|||
OrderedExcalidrawElement,
|
||||
} from "../../packages/excalidraw/element/types";
|
||||
import {
|
||||
SnapshotAction,
|
||||
StoreAction,
|
||||
getSceneVersion,
|
||||
restoreElements,
|
||||
zoomToFitBounds,
|
||||
|
@ -393,7 +393,7 @@ class Collab extends PureComponent<CollabProps, CollabState> {
|
|||
|
||||
this.excalidrawAPI.updateScene({
|
||||
elements,
|
||||
snapshotAction: SnapshotAction.UPDATE,
|
||||
storeAction: StoreAction.UPDATE,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -544,7 +544,7 @@ class Collab extends PureComponent<CollabProps, CollabState> {
|
|||
// to database even if deleted before creating the room.
|
||||
this.excalidrawAPI.updateScene({
|
||||
elements,
|
||||
snapshotAction: SnapshotAction.UPDATE,
|
||||
storeAction: StoreAction.UPDATE,
|
||||
});
|
||||
|
||||
this.saveCollabRoomToFirebase(getSyncableElements(elements));
|
||||
|
@ -782,7 +782,7 @@ class Collab extends PureComponent<CollabProps, CollabState> {
|
|||
) => {
|
||||
this.excalidrawAPI.updateScene({
|
||||
elements,
|
||||
snapshotAction: SnapshotAction.UPDATE,
|
||||
storeAction: StoreAction.UPDATE,
|
||||
});
|
||||
|
||||
this.loadImageFiles();
|
||||
|
|
|
@ -19,7 +19,7 @@ import throttle from "lodash.throttle";
|
|||
import { newElementWith } from "../../packages/excalidraw/element/mutateElement";
|
||||
import { encryptData } from "../../packages/excalidraw/data/encryption";
|
||||
import type { Socket } from "socket.io-client";
|
||||
import { SnapshotAction } from "../../packages/excalidraw";
|
||||
import { StoreAction } from "../../packages/excalidraw";
|
||||
|
||||
class Portal {
|
||||
collab: TCollabClass;
|
||||
|
@ -133,7 +133,7 @@ class Portal {
|
|||
if (isChanged) {
|
||||
this.collab.excalidrawAPI.updateScene({
|
||||
elements: newElements,
|
||||
snapshotAction: SnapshotAction.UPDATE,
|
||||
storeAction: StoreAction.UPDATE,
|
||||
});
|
||||
}
|
||||
}, FILE_UPLOAD_TIMEOUT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue