From d661a4e4a9dfa6c9c73b5e24a3edcf56e1bbf48c Mon Sep 17 00:00:00 2001 From: release-bot Date: Sun, 8 Feb 2026 23:59:39 +0100 Subject: [PATCH] feat(ui): improve InputShape ux Allow interactions in mirrored side aswell. Use rightclick to delete circles. --- nodes/max/plantarium/shape/src/input.json | 1 + packages/ui/src/lib/inputs/InputShape.svelte | 255 ++++++++++--------- 2 files changed, 131 insertions(+), 125 deletions(-) diff --git a/nodes/max/plantarium/shape/src/input.json b/nodes/max/plantarium/shape/src/input.json index 40fae13..2b27295 100644 --- a/nodes/max/plantarium/shape/src/input.json +++ b/nodes/max/plantarium/shape/src/input.json @@ -6,6 +6,7 @@ "inputs": { "shape": { "type": "shape", + "internal": true, "value": [ 47.8, 100, diff --git a/packages/ui/src/lib/inputs/InputShape.svelte b/packages/ui/src/lib/inputs/InputShape.svelte index b070445..e07f002 100644 --- a/packages/ui/src/lib/inputs/InputShape.svelte +++ b/packages/ui/src/lib/inputs/InputShape.svelte @@ -1,59 +1,103 @@ - +
@@ -179,15 +199,14 @@ aria-label="Interactive 2D Shape Editor" onmousedown={handleMouseDown} > - - + + {#if mirror} - - {#each Array(points.length / 2) as _, i (i)} - {@const x = mirrorPoints(points)[i * 2]} - {@const y = mirrorPoints(points)[i * 2 + 1]} + {#each groupedPoints as p, i (i)} + {@const x = 100 - p[0]} + {@const y = p[1]} - {#each Array(points.length / 2) as _, i (i)} - {@const x = points[i * 2]} - {@const y = points[i * 2 + 1]} + {#each groupedPoints as p, i (i)} @@ -227,15 +241,6 @@ circle { fill: var(--color-layer-2); - } - - circle.active { - stroke: var(--color-layer-3); - stroke-width: 0.5px; - } - - circle.disabled { - pointer-events: none; - z-index: -1; + cursor: pointer; }