Skip to content

Commit 58af0f4

Browse files
committed
Update Rapid to v2.2.4
Signed-off-by: Taylor Smock <[email protected]>
1 parent 7307769 commit 58af0f4

File tree

3 files changed

+333
-463
lines changed

3 files changed

+333
-463
lines changed

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@mapbox/mapbox-gl-geocoder": "^5.0.1",
1515
"@mapbox/mapbox-gl-language": "^0.10.1",
1616
"@placemarkio/geo-viewport": "^1.0.1",
17-
"@rapideditor/rapid": "^2.1.1",
17+
"@rapideditor/rapid": "^2.2.4",
1818
"@sentry/react": "^7.60.1",
1919
"@tmcw/togeojson": "^4.7.0",
2020
"@tanstack/react-query": "^4.29.7",

frontend/src/components/rapidEditor.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function RapidEditor({
223223

224224
useEffect(() => {
225225
const containerRoot = document.getElementById('rapid-container-root');
226-
const editListener = () => updateDisableState(setDisable, context.systems.edits);
226+
const editListener = () => updateDisableState(setDisable, context.systems.editor);
227227
if (context && dom) {
228228
containerRoot.appendChild(dom);
229229
// init the ui or restart if it was loaded previously
@@ -240,19 +240,19 @@ function RapidEditor({
240240
/* Perform tasks after Rapid has started up */
241241
promise.then(() => {
242242
/* Keep track of edits */
243-
const editSystem = context.systems.edits;
243+
const editSystem = context.systems.editor;
244244

245-
editSystem.on('change', editListener);
245+
editSystem.on('stablechange', editListener);
246246
editSystem.on('reset', editListener);
247247
});
248248
}
249249
return () => {
250250
if (containerRoot?.childNodes && dom in containerRoot.childNodes) {
251251
document.getElementById('rapid-container-root')?.removeChild(dom);
252252
}
253-
if (context?.systems?.edits) {
254-
const editSystem = context.systems.edits;
255-
editSystem.off('change', editListener);
253+
if (context?.systems?.editor) {
254+
const editSystem = context.systems.editor;
255+
editSystem.off('stablechange', editListener);
256256
editSystem.off('reset', editListener);
257257
}
258258
};

0 commit comments

Comments
 (0)