From d0be24bd6aad0cf45f9f078f45e2747a22390d10 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Wed, 7 May 2025 22:59:58 +0200 Subject: [PATCH] tweak point rendering inside line editor --- .../excalidraw/renderer/interactiveScene.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/excalidraw/renderer/interactiveScene.ts b/packages/excalidraw/renderer/interactiveScene.ts index a2d0fe675..5d84a150d 100644 --- a/packages/excalidraw/renderer/interactiveScene.ts +++ b/packages/excalidraw/renderer/interactiveScene.ts @@ -235,9 +235,11 @@ const renderSingleLinearPoint = ( context, point[0], point[1], - (isOverlappingPoint ? radius * 2 : radius) / appState.zoom.value, + (isOverlappingPoint + ? radius * (appState.editingLinearElement ? 1.5 : 2) + : radius) / appState.zoom.value, !isPhantomPoint, - !isOverlappingPoint, + !isOverlappingPoint || isSelected, ); }; @@ -545,18 +547,21 @@ const renderLinearPointHandles = ( return; } - const isSelected = - !!appState.editingLinearElement?.selectedPointsIndices?.includes(idx); - const isOverlappingPoint = idx > 0 && - (idx !== points.length - 1 || !_isLineElement || !element.loopLock) && + (idx !== points.length - 1 || + appState.editingLinearElement || + !_isLineElement || + !element.loopLock) && pointsEqual( point, idx === points.length - 1 ? points[0] : points[idx - 1], 2 / appState.zoom.value, ); + const isSelected = + !!appState.editingLinearElement?.selectedPointsIndices?.includes(idx); + renderSingleLinearPoint( context, appState,