@cntrl-site/sdk-nextjs 1.0.19-alpha.8 → 1.0.19-alpha.9
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.
|
@@ -28,7 +28,7 @@ const GroupItem = ({ item, sectionId, onResize, articleHeight, interactionCtrl,
|
|
|
28
28
|
const stateParams = interactionCtrl === null || interactionCtrl === void 0 ? void 0 : interactionCtrl.getState(['opacity', 'angle']);
|
|
29
29
|
const angle = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_a = stateParams === null || stateParams === void 0 ? void 0 : stateParams.styles) === null || _a === void 0 ? void 0 : _a.angle, itemAngle);
|
|
30
30
|
const opacity = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_b = stateParams === null || stateParams === void 0 ? void 0 : stateParams.styles) === null || _b === void 0 ? void 0 : _b.opacity, itemOpacity);
|
|
31
|
-
const isInteractive = opacity !== 0;
|
|
31
|
+
const isInteractive = opacity !== 0 && opacity !== undefined;
|
|
32
32
|
(0, react_1.useEffect)(() => {
|
|
33
33
|
onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
|
|
34
34
|
}, [isInteractive, onVisibilityChange]);
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export const GroupItem: FC<ItemProps<TGroupItem>> = ({ item, sectionId, onResize
|
|
|
21
21
|
const stateParams = interactionCtrl?.getState(['opacity', 'angle']);
|
|
22
22
|
const angle = getStyleFromItemStateAndParams(stateParams?.styles?.angle, itemAngle);
|
|
23
23
|
const opacity = getStyleFromItemStateAndParams(stateParams?.styles?.opacity, itemOpacity);
|
|
24
|
-
const isInteractive = opacity !== 0;
|
|
24
|
+
const isInteractive = opacity !== 0 && opacity !== undefined;
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
onVisibilityChange?.(isInteractive);
|
|
27
27
|
}, [isInteractive, onVisibilityChange]);
|