@lad-sapienza/scms-core 0.1.0-alpha.4 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -326,12 +326,13 @@ export class LayerControlClass implements IControl {
326
326
 
327
327
  if (hasChanged) {
328
328
  this.props = newProps;
329
- // Use requestAnimationFrame to ensure the update happens after current execution
330
- requestAnimationFrame(() => {
331
- if (this.root && this.isAddedToMap) {
332
- this.root.render(<LayerControlUI {...this.props} />);
333
- }
334
- });
329
+ // Render immediately — this is already called from a useEffect (well
330
+ // after React's render phase), so there's no synchronous-update
331
+ // hazard to defer for. Deferring via requestAnimationFrame instead
332
+ // left a window where the DOM (e.g. a basemap radio's checked state)
333
+ // visibly lagged behind the already-updated React state, sometimes
334
+ // indefinitely if the tab wasn't actively painting frames.
335
+ this.root.render(<LayerControlUI {...this.props} />);
335
336
  }
336
337
  }
337
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lad-sapienza/scms-core",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "Framework components and Astro integrations for s:CMS — DataTb, Gallery, Map, ZoteroGeoViewer, Record.",
5
5
  "type": "module",
6
6
  "license": "BSD-0-Clause",