@ngenux/ngage-whiteboarding 1.0.5 → 1.0.6

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.
package/dist/index.esm.js CHANGED
@@ -37149,13 +37149,15 @@ const LeftSidebar = ({ queueAction, hasToolAccess = false, shouldBeOpenByDefault
37149
37149
  setIsInitialized(true);
37150
37150
  }
37151
37151
  }, [state]);
37152
- // Set white as default stroke color when video background is active
37152
+ // Set white as default stroke color when video background is first activated (only once)
37153
+ const hasVideoBackgroundRef = React__default.useRef(false);
37153
37154
  useEffect(() => {
37154
- if (hasVideoBackground && state.color === '#000000') {
37155
- // Only change if currently black, to avoid overriding user's choice
37155
+ // Only auto-switch to white on first video activation, and only if currently black
37156
+ if (hasVideoBackground && !hasVideoBackgroundRef.current && state.color === '#000000') {
37156
37157
  dispatch({ type: 'SET_COLOR', payload: '#FFFFFF' });
37157
37158
  }
37158
- }, [hasVideoBackground, state.color, dispatch]);
37159
+ hasVideoBackgroundRef.current = hasVideoBackground;
37160
+ }, [hasVideoBackground, dispatch]);
37159
37161
  // Track initial access grant
37160
37162
  useEffect(() => {
37161
37163
  if (hasToolAccess && !hasEverHadAccess) {