tweak point rendering inside line editor
This commit is contained in:
parent
6d6b958f27
commit
d0be24bd6a
@ -235,9 +235,11 @@ const renderSingleLinearPoint = <Point extends GlobalPoint | LocalPoint>(
|
|||||||
context,
|
context,
|
||||||
point[0],
|
point[0],
|
||||||
point[1],
|
point[1],
|
||||||
(isOverlappingPoint ? radius * 2 : radius) / appState.zoom.value,
|
(isOverlappingPoint
|
||||||
|
? radius * (appState.editingLinearElement ? 1.5 : 2)
|
||||||
|
: radius) / appState.zoom.value,
|
||||||
!isPhantomPoint,
|
!isPhantomPoint,
|
||||||
!isOverlappingPoint,
|
!isOverlappingPoint || isSelected,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -545,18 +547,21 @@ const renderLinearPointHandles = (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isSelected =
|
|
||||||
!!appState.editingLinearElement?.selectedPointsIndices?.includes(idx);
|
|
||||||
|
|
||||||
const isOverlappingPoint =
|
const isOverlappingPoint =
|
||||||
idx > 0 &&
|
idx > 0 &&
|
||||||
(idx !== points.length - 1 || !_isLineElement || !element.loopLock) &&
|
(idx !== points.length - 1 ||
|
||||||
|
appState.editingLinearElement ||
|
||||||
|
!_isLineElement ||
|
||||||
|
!element.loopLock) &&
|
||||||
pointsEqual(
|
pointsEqual(
|
||||||
point,
|
point,
|
||||||
idx === points.length - 1 ? points[0] : points[idx - 1],
|
idx === points.length - 1 ? points[0] : points[idx - 1],
|
||||||
2 / appState.zoom.value,
|
2 / appState.zoom.value,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isSelected =
|
||||||
|
!!appState.editingLinearElement?.selectedPointsIndices?.includes(idx);
|
||||||
|
|
||||||
renderSingleLinearPoint(
|
renderSingleLinearPoint(
|
||||||
context,
|
context,
|
||||||
appState,
|
appState,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user