diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js index 0d493fde..23602d5a 100644 --- a/src/hooks/surface/usePlacementShapeDrawing.js +++ b/src/hooks/surface/usePlacementShapeDrawing.js @@ -63,6 +63,7 @@ export function usePlacementShapeDrawing(id) { const verticalHorizontalMode = useRecoilValue(verticalHorizontalModeState) const adsorptionRange = useRecoilValue(adsorptionRangeState) + const adsorptionPointMode = useRecoilValue(adsorptionPointModeState) const length1Ref = useRef(null) const length2Ref = useRef(null) @@ -100,7 +101,7 @@ export function usePlacementShapeDrawing(id) { initEvent() handleSelectableObjects(['lineGrid', 'tempGrid', 'adsorptionPoint'], true) } - }, [verticalHorizontalMode, points, adsorptionRange]) + }, [verticalHorizontalMode, points, adsorptionRange, adsorptionPointMode]) useEffect(() => { setPoints([])