Skip to content

Commit

Permalink
ISSUE #4911 - calibration is enabled by default during each step
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Daniel committed Aug 23, 2024
1 parent 2e265cc commit c1e68a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { DRAWINGS_ROUTE, ViewerParams } from '../../../routes.constants';
export const CalibrationHandler = () => {
const { teamspace, project, revision, containerOrFederation } = useParams<ViewerParams>();
const { setLeftPanelRatio } = useContext(ViewerCanvasesContext);
const { step, drawingId, setVector3D, setVector2D, setOrigin, setStep, setIsCalibrating3D, origin, setVerticalPlanes } = useContext(CalibrationContext);
const { step, drawingId, setVector3D, setVector2D, setOrigin, setStep, origin, setVerticalPlanes } = useContext(CalibrationContext);
const drawing = DrawingsHooksSelectors.selectDrawingById(drawingId);
const { horizontal, verticalRange } = DrawingsHooksSelectors.selectCalibration(drawingId, containerOrFederation);

Expand All @@ -42,7 +42,6 @@ export const CalibrationHandler = () => {

useEffect(() => {
setStep(0);
setIsCalibrating3D(false);
}, [selectedModel, revision, drawing]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const Calibration3DHandler = () => {

useEffect(() => {
UnityUtil.setCalibrationToolMode('Vector');
Viewer.isModelReady().then(() => setIsCalibrating3D(true));

return () => {
setIsCalibrating3D(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { VIEWER_EVENTS } from '@/v4/constants/viewer';
import { getDrawingImageSrc } from '@/v5/store/drawings/drawings.helpers';
import { CalibrationContext } from '../../calibrationContext';
import { PlaneType, Vector1D } from '../../calibration.types';
import { TreeActionsDispatchers, ViewerGuiActionsDispatchers } from '@/v5/services/actionsDispatchers';
import { TreeActionsDispatchers } from '@/v5/services/actionsDispatchers';
import { getTransformationMatrix } from '../../calibration.helpers';
import { Vector2 } from 'three';
import { isNull } from 'lodash';
Expand Down

0 comments on commit c1e68a0

Please sign in to comment.