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:
committed by
Facebook GitHub Bot
parent
b8feab9a41
commit
1777cbf697
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user