Skip to content

Artboard grab scale#1

Open
JRNukala wants to merge 3 commits intomasterfrom
artboard-grab-scale
Open

Artboard grab scale#1
JRNukala wants to merge 3 commits intomasterfrom
artboard-grab-scale

Conversation

@JRNukala
Copy link
Copy Markdown
Collaborator

@JRNukala JRNukala commented Apr 25, 2026

Summary

Closes GraphiteEditor#4026
When the Artboard tool is selected, pressing G (grab) or S (scale) now triggers the same keyboard-driven transformation that the Select and Path tools already support. This reuses the existing GRS infrastructure inTransformLayerMessageHandler — no new transformation logic was added.

Changes

  • transformation.rs: Include ToolType::Artboard in the OriginalTransforms::Layer gate so the GRS system snapshots artboard layer transforms. Also bypass the artboard filter in Selected::bounding_box() when the Artboard tool is active.
  • pivot.rs: Thread active_tool_type through recalculate_pivot() and recalculate_transform() so the pivot includes artboards when the Artboard tool is active.
  • select_tool.rs: Thread active_tool_type through create_bounding_box_transform() so GRS computes correct local axes for artboards. Existing Select tool call sites pass ToolType::Select to preserve current behavior.
  • transform_layer_message_handler.rs: Pass the active tool type to the updated pivot and bounding-box functions. Block Rotate (R) for artboards since their bounds are axis-aligned integer rectangles.
  • artboard_tool.rs: Add G/S keyboard hint to the Ready state so users can discover the shortcuts.

Test plan

  • Select the Artboard tool, click an artboard, press G, move mouse, confirm with Enter — artboard should move
  • Same flow with S — artboard should scale from the pivot
  • Press Escape during G or S — artboard should revert to original position/size
  • Press R with the Artboard tool — should be a no-op (no rotation)
  • Verify that G/R/S on the Select tool and Path tool still work as before
  • Check that the hint bar shows "G / S Grab/Scale Selected" in the Artboard tool's Ready state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Artboard tool needs to support G/S (grab and scale) transformation

4 participants