Skip to content

[G], [R], and [S] key should grab, rotate, and scale the selected layers #317

@Keavon

Description

@Keavon

This should work exactly like Blender:

Hit G and enter Grab mode. Mouse movements cause the selected layers to move around with the mouse. LMB and Enter applies the transformation while RMB and Esc cancel the transformation. Holding the Shift modifier key at any time will slow the movement down to a 1/10 rate of the mouse movement speed. (Later, when we have a grid system, Ctrl will cause movements to snap to the grid while held down, but this doesn't need to be added yet.) Subsequently hitting X or Y will constrain the movement to the X or Y axis, and then numbers typed should specify how many document units to move along that axis.

Hit R and enter Rotate mode. Mouse movements around the center point of rotation (the layer's origin, or median point of multiple layers' origins) should rotate the layer(s). Holding Shift makes the movement go at 1/10 the rate, and holding Ctrl makes it snap to 15° increments. Typing a number sets the rotation to the degrees entered by the user.

Hit S and enter Scale mode. Mouse movements towards and away from the center point of rotation (the layer's origin, or median point of multiple layers' origins) should scale the layer(s). Holding Shift makes the scaling go at 1/10 the rate, and holding Ctrl makes it snap to scale factors that are multiples of 0.1, such as 0.0, 0.1, 0.2, 0.3, and so on. Typing a number sets the scale factor to the number entered by the user (in real time as they type). Backspace allows the removal of digits that were typed, up to and including the first digit which sets it back to mouse-controlled mode.

Metadata

Metadata

Assignees

Labels

WebInvolves web programming (TypeScript, Svelte, CSS)

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions