Skip to content

Commit 1bd86f0

Browse files
committed
turn updateTiles and arrayOfTileRoots into a method and property instead of consts
1 parent a71a571 commit 1bd86f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/crystal-toolkit/CrystalToolkitScene/CrystalToolkitScene.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export interface CrystalToolkitSceneProps {
110110
/**
111111
* the dynamic tiling, to be updated in scene.
112112
*/
113-
tiling?: number;
113+
tiling?: number[];
114114
/**
115115
* the maximum size of the tiling, controls render size
116116
*/
@@ -418,6 +418,9 @@ export const CrystalToolkitScene: React.FC<CrystalToolkitSceneProps> = ({
418418
() => scene.current!.updateInsetSettings(props.inletSize!, props.inletPadding!, props.axisView),
419419
[props.inletSize, props.inletPadding, props.axisView]
420420
);
421+
useEffect(() => {
422+
scene.current!.updateTiles(props.tiling);
423+
}, [props.tiling]);
421424

422425
useEffect(() => {
423426
scene.current!.resizeRendererToDisplaySize();

0 commit comments

Comments
 (0)