excalidraw/src
Christopher Chedeau a7bd21ccf2
Avoid broadcasting what was just received (#1116)
Fixes #1115

The issue is that replaceAllElements calls a render synchronously, preventing lastBroadcastedOrReceivedSceneVersion from being set correctly.

I tried using batchUpdate but it only takes a single argument ( c5d2fc7127/packages/react-reconciler/src/ReactFiberWorkLoop.js (L1088) ) whereas the callback takes two.

Test Plan:
- Add a console.log before `this.broadcastScene("SCENE_UPDATE");` in App.tsx
- Connect a bunch of clients
- Have one move a shape
- Make sure that this client has the console logged
- Make sure the other clients don't have it
2020-03-28 21:25:40 -07:00
..
actions Change order of the fill options (#1097) 2020-03-27 19:38:03 +02:00
components Avoid broadcasting what was just received (#1116) 2020-03-28 21:25:40 -07:00
data Add SCENE_INIT broadcast type for new user (#1095) 2020-03-28 19:35:56 -07:00
element Fix corner resize for multi-point arrows (#1105) 2020-03-28 18:08:21 -07:00
locales New Crowdin translations (#1089) 2020-03-27 14:12:27 +02:00
renderer Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
scene Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
tests Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
_variables.scss Make dialogs look better on mobile (#908) 2020-03-13 20:32:47 +01:00
appState.ts Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
bug-issue-template.js make error message more user-friendly (#812) 2020-03-09 17:09:45 +01:00
clipboard.ts Bump prettier from 1.19.1 to 2.0.1 (#1060) 2020-03-23 13:05:07 +02:00
colors.ts Assign a colors to each pointers (#944) 2020-03-14 12:18:57 -07:00
constants.ts confirm arrow on doubleclick (#949) 2020-03-18 16:43:06 +01:00
gesture.ts Bump prettier from 1.19.1 to 2.0.1 (#1060) 2020-03-23 13:05:07 +02:00
global.d.ts Add loading state (#1027) 2020-03-26 18:28:26 +01:00
history.ts Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
i18n.ts New Crowdin translations (#1089) 2020-03-27 14:12:27 +02:00
index-node.ts Refactor ExcalidrawElement (#874) 2020-03-08 10:20:55 -07:00
index.tsx Bump prettier from 1.19.1 to 2.0.1 (#1060) 2020-03-23 13:05:07 +02:00
is-mobile.tsx Add touch support (#788) 2020-02-21 08:17:20 -05:00
keys.ts Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
math.ts Abstract away or eliminate most of the mutation of the Elements array (#955) 2020-03-14 21:48:51 -07:00
points.ts Bump prettier from 1.19.1 to 2.0.1 (#1060) 2020-03-23 13:05:07 +02:00
random.ts Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
react-app-env.d.ts TS, Prettier, Eslint (#39) 2020-01-02 11:03:48 -08:00
setupTests.ts Write integration tests (#719) 2020-02-11 23:19:43 +01:00
shapes.tsx Improve pasting (#723) 2020-02-07 18:42:24 +01:00
styles.scss Apply scroll-back-to-content's z-index only for mobile (#1086) 2020-03-26 13:22:15 +02:00
theme.css Use relative CSS units (#484) 2020-01-20 14:59:00 -08:00
types.ts Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
utils.ts Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
zindex.test.ts Set Trailing Cmma to (#525) 2020-01-24 12:04:54 +02:00
zindex.ts Bump prettier from 1.19.1 to 2.0.1 (#1060) 2020-03-23 13:05:07 +02:00