Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -561,7 +561,7 @@ export const useModelStore = create<ModelStore>((set, get) => ({
|
||||
const points = [...state.measurePoints, p];
|
||||
if (points.length === 2) {
|
||||
const [a, b] = points;
|
||||
const modelId = state.activeModelId ?? undefined;
|
||||
const modelId = (a.modelId && a.modelId === b.modelId ? a.modelId : state.activeModelId) ?? undefined;
|
||||
const aConv = modelId ? worldToModelLocal(modelId, a) : null;
|
||||
const bConv = modelId ? worldToModelLocal(modelId, b) : null;
|
||||
const attached = !!(aConv && bConv);
|
||||
@@ -603,7 +603,7 @@ export const useModelStore = create<ModelStore>((set, get) => ({
|
||||
return { measurements: state.measurements.slice(0, -1) };
|
||||
}),
|
||||
registerHoverMeasurement: (info) => set((state) => {
|
||||
const modelId = state.activeModelId ?? undefined;
|
||||
const modelId = info.modelId ?? state.activeModelId ?? undefined;
|
||||
const modelScale = modelId ? getModelWorldScaleFactor(modelId) : 1;
|
||||
const toLocal = (p: MeasurePoint): { point: MeasurePoint; attached: boolean } => {
|
||||
const conv = modelId ? worldToModelLocal(modelId, p) : null;
|
||||
|
||||
Reference in New Issue
Block a user