diff --git a/client/src/shapes/PufferShapeUtil.tsx b/client/src/shapes/PufferShapeUtil.tsx index 4ecc9e9..3c0b10d 100644 --- a/client/src/shapes/PufferShapeUtil.tsx +++ b/client/src/shapes/PufferShapeUtil.tsx @@ -62,11 +62,14 @@ export class PufferShapeUtil extends ShapeUtil { { handle }: { handle: TLHandle } ): TLShapePartial | void { if (handle.id === 'top') { - const newH = Math.min(CFG.maxH, Math.max(CFG.minH, shape.props.h - handle.y)) + // Bottom edge stays fixed; compute new height from mouse page position + const bottom = shape.y + shape.props.h + const mouseY = this.editor.inputs.currentPagePoint.y + const newH = Math.min(CFG.maxH, Math.max(CFG.minH, bottom - mouseY)) return { id: shape.id, type: 'puffer', - y: shape.y + (shape.props.h - newH), + y: bottom - newH, props: { ...shape.props, h: newH }, } } diff --git a/client/src/shapes/shape-config.ts b/client/src/shapes/shape-config.ts index 7587d44..3caada5 100644 --- a/client/src/shapes/shape-config.ts +++ b/client/src/shapes/shape-config.ts @@ -2,17 +2,17 @@ * Zentrale Konfiguration für alle Custom Shapes. * Defaults, Minima und Maxima an einer Stelle gepflegt. */ - +// Angaben in cm export const PUFFER_CONFIG = { // Defaults - defaultW: 120, - defaultH: 60, + defaultW: 240, + defaultH: 150, // Minima - minW: 20, - minH: 20, + minW: 240, + minH: 150, // Maxima - maxW: 500, - maxH: 300, + maxW: 4000, + maxH: 20000, } export const KREISEL_CONFIG = { @@ -20,7 +20,7 @@ export const KREISEL_CONFIG = { defaultAbstand: 200, defaultRadius: 80, // Minima - minAbstand: 20, + minAbstand: 180, // Maxima maxAbstand: 4000, }