Vector Art: mehrere gewählte Formen gemeinsam verschieben #217

Closed
opened 2026-09-23 07:05:35 +02:00 by meleki · 2 comments
Owner

Aus #187 („Bewusst nicht gebaut: … Mehrere gewählte Formen zusammen verschieben.“). Verwandt mit #190 (Gruppen), dort ist das gemeinsame Bewegen über eine Gruppe gedacht.

Befund

  • Seit #187 lassen sich mehrere Formen wählen (Strg/Cmd+Klick im Tab, Strg/Umschalt in der Liste). Delete und die COMBINE-Knöpfe wirken auf alle.
  • Ziehen wirkt nur auf eine. Ein Druck in die Füllung zieht die Form unter der Maus (drag.kind === 'shape' mit genau einer shapeId, src/editor/vectorart/VectorArtCanvas.ts:506 ff.). Die übrigen gewählten bleiben stehen.
  • Wer zwei Formen zusammen verschieben will, muss sie heute einzeln ziehen oder erst vereinigen.

Zu bauen (Vorschlag)

  • Druck in die Füllung einer gewählten Form zieht alle gewählten Formen um denselben Versatz, samt Verläufen und Texturkacheln (wie heute bei einer Form).
  • Druck auf eine nicht gewählte Form wählt sie und zieht nur sie (wie heute).
  • Eine Geste ist ein Undo-Schritt, auch bei mehreren Formen.
  • Einrasten (Magnet, #194) gilt für den gemeinsamen Versatz.
  • Tests: Unit für den Befehl über mehrere Formen samt Undo. e2e in Modul 47: zwei Formen wählen, ziehen, beide haben sich um denselben Betrag bewegt.

Offen (mit Vorschlag)

  1. Auch mit den Pfeiltasten verschieben? Vorschlag: nicht in diesem Issue.
  2. Wird das mit #190 überflüssig? Vorschlag: nein. Eine Gruppe ist dauerhaft, eine Mehrfachauswahl nur für den Moment. Beides hat seinen Platz, und der Befehl hier kann für Gruppen wiederverwendet werden.
Aus #187 („Bewusst nicht gebaut: … Mehrere gewählte Formen zusammen verschieben.“). Verwandt mit #190 (Gruppen), dort ist das gemeinsame Bewegen über eine Gruppe gedacht. ## Befund - Seit #187 lassen sich mehrere Formen wählen (Strg/Cmd+Klick im Tab, Strg/Umschalt in der Liste). Delete und die COMBINE-Knöpfe wirken auf alle. - **Ziehen wirkt nur auf eine.** Ein Druck in die Füllung zieht die Form unter der Maus (`drag.kind === 'shape'` mit genau einer `shapeId`, `src/editor/vectorart/VectorArtCanvas.ts:506` ff.). Die übrigen gewählten bleiben stehen. - Wer zwei Formen zusammen verschieben will, muss sie heute einzeln ziehen oder erst vereinigen. ## Zu bauen (Vorschlag) - Druck in die Füllung einer **gewählten** Form zieht alle gewählten Formen um denselben Versatz, samt Verläufen und Texturkacheln (wie heute bei einer Form). - Druck auf eine nicht gewählte Form wählt sie und zieht nur sie (wie heute). - Eine Geste ist ein Undo-Schritt, auch bei mehreren Formen. - Einrasten (Magnet, #194) gilt für den gemeinsamen Versatz. - Tests: Unit für den Befehl über mehrere Formen samt Undo. e2e in Modul 47: zwei Formen wählen, ziehen, beide haben sich um denselben Betrag bewegt. ## Offen (mit Vorschlag) 1. **Auch mit den Pfeiltasten verschieben?** Vorschlag: nicht in diesem Issue. 2. **Wird das mit #190 überflüssig?** Vorschlag: nein. Eine Gruppe ist dauerhaft, eine Mehrfachauswahl nur für den Moment. Beides hat seinen Platz, und der Befehl hier kann für Gruppen wiederverwendet werden.
meleki added the new label 2026-09-23 07:05:35 +02:00
  1. vorschlag passt, auch kein folge issue notwendig
  2. vorschlag passt, issue #190 offen lassen
1. vorschlag passt, auch kein folge issue notwendig 2. vorschlag passt, issue #190 offen lassen
admin added low-priority and removed new labels 2026-09-23 07:12:02 +02:00
admin added this to the Development project 2026-09-23 07:14:43 +02:00
Author
Owner

Built with #190 in 2ff3a78, so this is closed. What is left goes on in #291.

What is there

  • A press on a selected shape drags all selected shapes by the same offset, with their gradients and texture tiles. Grouped or not makes no difference.
  • A press on a shape outside the selection selects it (or its group, since #190) and drags only that.
  • One gesture is one undo step, also over several shapes (Move shapes).
  • The grid snaps the shared offset, not each shape by itself.
  • New since #190: a click on a shape of the selection that moves nothing keeps the selection, and Shift+click selects like Ctrl+click.

Tests

  • Unit, in tests/editor/vector-layers.test.ts: two selected shapes without a group are dragged, both move by the same amount and the third stays. A group dragged by one of its shapes, with its undo as one step.
  • e2e, block 47j in module 47: a group of two shapes dragged with a real mouse, both moved by the same amount, pixels read at the new place, one undo puts both back.
  • Not tested as the issue asked: there is no e2e check for two selected shapes without a group, only the unit test. Both cases run through the same code (dragShape with others). The snap of the shared offset and the gradients of the shapes dragged along have no test of their own.

Taken over into #291

  • The move of several shapes by number (position rows in the inspector) and the arrow keys. The answer here was "not in this issue, no follow-up needed"; #291 asks it again as an open question, since it has position rows anyway.
  • The two missing tests above.
Built with #190 in `2ff3a78`, so this is closed. What is left goes on in #291. **What is there** - A press on a **selected** shape drags all selected shapes by the same offset, with their gradients and texture tiles. Grouped or not makes no difference. - A press on a shape outside the selection selects it (or its group, since #190) and drags only that. - One gesture is one undo step, also over several shapes (*Move shapes*). - The grid snaps the shared offset, not each shape by itself. - New since #190: a click on a shape of the selection that moves nothing keeps the selection, and `Shift`+click selects like `Ctrl`+click. **Tests** - Unit, in `tests/editor/vector-layers.test.ts`: two selected shapes without a group are dragged, both move by the same amount and the third stays. A group dragged by one of its shapes, with its undo as one step. - e2e, block 47j in module 47: a group of two shapes dragged with a real mouse, both moved by the same amount, pixels read at the new place, one undo puts both back. - **Not tested as the issue asked:** there is no e2e check for two selected shapes *without* a group, only the unit test. Both cases run through the same code (`dragShape` with `others`). The snap of the shared offset and the gradients of the shapes dragged along have no test of their own. **Taken over into #291** - The move of several shapes by number (position rows in the inspector) and the arrow keys. The answer here was "not in this issue, no follow-up needed"; #291 asks it again as an open question, since it has position rows anyway. - The two missing tests above.
admin moved this to Done in Development on 2026-10-01 23:15:12 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: meleki/feuerwerk#217