Remove coordinate update

Summary: This is no longer needed or sent by the client given our new approach to frames

Reviewed By: antonk52

Differential Revision: D44872566

fbshipit-source-id: 9ec340a5cc68605f730cf6677fb89778bf77a3a1
This commit is contained in:
Luke De Feo
2023-04-27 07:28:41 -07:00
committed by Facebook GitHub Bot
parent b8feab9a41
commit 1777cbf697
2 changed files with 0 additions and 25 deletions

View File

@@ -138,24 +138,6 @@ export function plugin(client: PluginClient<Events>) {
expandedNodes: createState<Set<Id>>(new Set()),
};
client.onMessage('coordinateUpdate', (event) => {
liveClientData = produce(liveClientData, (draft) => {
const node = draft.nodes.get(event.nodeId);
if (!node) {
console.warn(`Coordinate update for non existing node `, event);
} else {
node.bounds.x = event.coordinate.x;
node.bounds.y = event.coordinate.y;
}
});
if (uiState.isPaused.get()) {
return;
}
nodes.set(liveClientData.nodes);
});
const setPlayPause = (isPaused: boolean) => {
uiState.isPaused.set(isPaused);
if (!isPaused) {

View File

@@ -10,18 +10,11 @@
export type Events = {
init: InitEvent;
subtreeUpdate: SubtreeUpdateEvent;
coordinateUpdate: CoordinateUpdateEvent;
perfStats: PerfStatsEvent;
performanceStats: PerformanceStatsEvent;
metadataUpdate: UpdateMetadataEvent;
};
export type CoordinateUpdateEvent = {
observerType: String;
nodeId: Id;
coordinate: Coordinate;
};
export type SubtreeUpdateEvent = {
txId: number;
rootId: Id;