mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-13 22:02:38 +00:00
M8: Scale tool drags pivot on the opposite handle, and its origin starts at the centre
Measured in Figma's web app (2026-11-09): a handle drag ignores the origin grid and pivots on the opposite handle's point (Alt: the centre); only the numeric Scale field uses the origin, which starts at the centre. scale_factor drops the anchor, tool.scaleAnchor defaults to c, and K, 2, Enter now scales about the centre. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
This commit is contained in:
1 parent
10e9686d03
commit
f0d39197be
8 files changed
+67
-46
No files matched your search
@@ -586,8 +586,9 @@ pub struct ToolState {
|
||||
/// Vector edit mode's pen: where the last press that started something new (no path being
|
||||
/// drawn) was, and the undo depth before it, so a double-click there takes that edit back.
|
||||
pub(crate) pen_press: Option<(Point, usize)>,
|
||||
/// The Scale tool's anchor: column and row (0 start, 1 middle, 2 end) of the point of the
|
||||
/// selection box that stays put (`tool.scaleAnchor`).
|
||||
/// The Scale tool's origin: column and row (0 start, 1 middle, 2 end) of the point of the
|
||||
/// selection box that stays put when the Scale field sets a factor (`tool.scaleAnchor`; the
|
||||
/// centre, `(1, 1)`, until set). Handle drags ignore it and pivot on the opposite handle.
|
||||
pub scale_anchor: (u8, u8),
|
||||
/// The last drag move handled (a held button repeats it every frame).
|
||||
pub(crate) last_move: Option<PointerEvent>,
|
||||
|
||||
@@ -640,7 +640,7 @@ impl Session {
|
||||
/// text included, children by the same factor whatever their constraints.
|
||||
fn scale_drag(&mut self, ev: &PointerEvent, r: &ResizeStart, q: Point, guides: Vec<Guide>) -> Result<()> {
|
||||
let (frame, w0, h0) = r.frame;
|
||||
let Some((k, pivot)) = scale_factor(r.handle, q, w0, h0, self.tool.scale_anchor, ev.alt) else { return Ok(()) };
|
||||
let Some((k, pivot)) = scale_factor(r.handle, q, w0, h0, ev.alt) else { return Ok(()) };
|
||||
let nodes = r.nodes.clone();
|
||||
let inv = frame.inverse();
|
||||
// A layer's place in the box scales about the pivot; a negative factor turns it over.
|
||||
|
||||
@@ -387,30 +387,22 @@ fn opposite(h: Handle) -> Handle {
|
||||
}
|
||||
|
||||
/// The Scale tool's factor and pivot (in the box's axes) for dragging `handle` of a `w0`×`h0` box
|
||||
/// to `q`. The pivot is the anchor point (`anchor`: column, row), or the opposite handle when the
|
||||
/// anchor lies on the side being dragged, or the centre (`from_center`). Corners follow the axis
|
||||
/// that moved the most; a negative factor flips. None when the box has no size to scale by.
|
||||
pub(crate) fn scale_factor(handle: Handle, q: Point, w0: f64, h0: f64, anchor: (u8, u8), from_center: bool) -> Option<(f64, Point)> {
|
||||
/// to `q`. The pivot is the opposite handle's point, or the centre (`from_center`); the origin grid
|
||||
/// never decides it (measured in Figma's web app, 2026-11-09). Corners follow the axis that moved
|
||||
/// the most; a negative factor flips. None when the box has no size to scale by.
|
||||
pub(crate) fn scale_factor(handle: Handle, q: Point, w0: f64, h0: f64, from_center: bool) -> Option<(f64, Point)> {
|
||||
const EPS: f64 = 1e-9;
|
||||
if !(q.x.is_finite() && q.y.is_finite() && w0.is_finite() && h0.is_finite()) || matches!(handle, Handle::Rotate(_)) {
|
||||
return None;
|
||||
}
|
||||
let h = handle_point(handle, w0, h0);
|
||||
let anchor_pt = anchor_in_box(anchor, w0, h0);
|
||||
// The axes the handle moves along.
|
||||
let (ax_x, ax_y) = match handle {
|
||||
Handle::Edge(0) | Handle::Edge(2) => (false, true),
|
||||
Handle::Edge(_) => (true, false),
|
||||
_ => (true, true),
|
||||
};
|
||||
let on_side = (ax_x && (anchor_pt.x - h.x).abs() < EPS) || (ax_y && (anchor_pt.y - h.y).abs() < EPS);
|
||||
let pivot = if from_center {
|
||||
Point::new(w0 / 2.0, h0 / 2.0)
|
||||
} else if on_side {
|
||||
handle_point(opposite(handle), w0, h0)
|
||||
} else {
|
||||
anchor_pt
|
||||
};
|
||||
let pivot = if from_center { Point::new(w0 / 2.0, h0 / 2.0) } else { handle_point(opposite(handle), w0, h0) };
|
||||
let ratio = |on: bool, to: f64, from: f64, p: f64| (on && (from - p).abs() > EPS).then(|| (to - p) / (from - p));
|
||||
let kx = ratio(ax_x, q.x, h.x, pivot.x);
|
||||
let ky = ratio(ax_y, q.y, h.y, pivot.y);
|
||||
|
||||
@@ -641,7 +641,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
spec!(
|
||||
"tool.scaleAnchor",
|
||||
"Scale anchor",
|
||||
"{anchor?: tl|t|tr|l|c|r|bl|b|br} (the point of the selection that stays put when the Scale tool scales; omit to read it)",
|
||||
"{anchor?: tl|t|tr|l|c|r|bl|b|br} (the origin of the Scale tool's factor field: the point of the selection that stays put; defaults to c, handle drags pivot on the opposite handle whatever it is; omit to read it)",
|
||||
false,
|
||||
|s, p| {
|
||||
if let Some(a) = string(p, "anchor") {
|
||||
|
||||
@@ -57,29 +57,54 @@ fn anchors_round_trip() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_pivot_is_the_anchor_unless_it_is_on_the_dragged_side() {
|
||||
fn the_pivot_is_the_opposite_handle_or_the_centre_with_alt() {
|
||||
let (w, h) = (100.0, 50.0);
|
||||
let tl = (0, 0);
|
||||
// Bottom-right corner from the top-left anchor: classic, by the axis that moved the most.
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(200.0, 60.0), w, h, tl, false), Some((2.0, Point::new(0.0, 0.0))));
|
||||
// Top-right corner: the anchor is on its top side, so the opposite corner stays put.
|
||||
assert_eq!(scale_factor(Handle::Corner(1), Point::new(150.0, -25.0), w, h, tl, false), Some((1.5, Point::new(0.0, 50.0))));
|
||||
// Right edge: from the anchor; left edge: the anchor is on it, so from the right edge.
|
||||
assert_eq!(scale_factor(Handle::Edge(1), Point::new(50.0, 999.0), w, h, tl, false), Some((0.5, Point::new(0.0, 0.0))));
|
||||
assert_eq!(scale_factor(Handle::Edge(3), Point::new(-100.0, 0.0), w, h, tl, false), Some((2.0, Point::new(100.0, 25.0))));
|
||||
// A centre anchor, or Alt, scales about the centre.
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(150.0, 75.0), w, h, (1, 1), false), Some((2.0, Point::new(50.0, 25.0))));
|
||||
assert_eq!(scale_factor(Handle::Edge(2), Point::new(0.0, 75.0), w, h, tl, true), Some((2.0, Point::new(50.0, 25.0))));
|
||||
// Bottom-right corner: the top-left corner stays put, by the axis that moved the most.
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(200.0, 60.0), w, h, false), Some((2.0, Point::new(0.0, 0.0))));
|
||||
// Top-right corner: the bottom-left corner stays put.
|
||||
assert_eq!(scale_factor(Handle::Corner(1), Point::new(150.0, -25.0), w, h, false), Some((1.5, Point::new(0.0, 50.0))));
|
||||
// Right edge: the left edge's middle; left edge: the right edge's middle.
|
||||
assert_eq!(scale_factor(Handle::Edge(1), Point::new(50.0, 999.0), w, h, false), Some((0.5, Point::new(0.0, 25.0))));
|
||||
assert_eq!(scale_factor(Handle::Edge(3), Point::new(-100.0, 0.0), w, h, false), Some((2.0, Point::new(100.0, 25.0))));
|
||||
// Alt scales about the centre.
|
||||
assert_eq!(scale_factor(Handle::Edge(2), Point::new(0.0, 75.0), w, h, true), Some((2.0, Point::new(50.0, 25.0))));
|
||||
// Past the pivot flips; it never collapses to nothing.
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(-100.0, -50.0), w, h, tl, false).map(|k| k.0), Some(-1.0));
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(0.0, 0.0), w, h, tl, false).map(|k| k.0), Some(0.01));
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(-100.0, -50.0), w, h, false).map(|k| k.0), Some(-1.0));
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(0.0, 0.0), w, h, false).map(|k| k.0), Some(0.01));
|
||||
// Lines (no height) scale along their length.
|
||||
assert_eq!(scale_factor(Handle::Corner(1), Point::new(300.0, 7.0), 100.0, 0.0, tl, false).map(|k| k.0), Some(3.0));
|
||||
assert_eq!(scale_factor(Handle::Corner(1), Point::new(300.0, 7.0), 100.0, 0.0, false).map(|k| k.0), Some(3.0));
|
||||
for bad in [f64::NAN, f64::INFINITY] {
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(bad, 0.0), w, h, tl, false), None);
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(bad, 0.0), w, h, false), None);
|
||||
}
|
||||
assert_eq!(scale_factor(Handle::Rotate(0), Point::new(1.0, 1.0), w, h, tl, false), None);
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(5.0, 5.0), 0.0, 0.0, tl, false), None);
|
||||
assert_eq!(scale_factor(Handle::Rotate(0), Point::new(1.0, 1.0), w, h, false), None);
|
||||
assert_eq!(scale_factor(Handle::Corner(2), Point::new(5.0, 5.0), 0.0, 0.0, false), None);
|
||||
}
|
||||
|
||||
/// Measured in Figma's web app, 2026-11-09: a drag ignores the origin grid and pivots on the
|
||||
/// opposite handle (a 100 x 100 layer at 9000, 5000: the bottom-right corner keeps the top left;
|
||||
/// the right edge keeps the left edge's middle and scales both ways).
|
||||
#[test]
|
||||
fn a_scale_handle_drag_pivots_on_the_opposite_handle_whatever_the_origin() {
|
||||
for origin in ["c", "tl"] {
|
||||
let mut s = Session::new();
|
||||
let r = rect(&mut s, 9000.0, 5000.0, 100.0, 100.0);
|
||||
ex(&mut s, "select.set", json!({"ids": [r]}));
|
||||
ex(&mut s, "tool.scale", json!({}));
|
||||
ex(&mut s, "tool.scaleAnchor", json!({"anchor": origin}));
|
||||
drag(&mut s, (9100.0, 5100.0), (9144.0, 5144.0), false);
|
||||
assert_rect(bounds(&s, r), [9000.0, 5000.0, 9144.0, 5144.0]);
|
||||
s.undo().unwrap();
|
||||
// The right edge's middle: the left edge's middle stays, the layer scales evenly.
|
||||
drag(&mut s, (9100.0, 5050.0), (9150.0, 5050.0), false);
|
||||
assert_rect(bounds(&s, r), [9000.0, 4975.0, 9150.0, 5125.0]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_scale_origin_starts_at_the_centre() {
|
||||
let mut s = Session::new();
|
||||
assert_eq!(ex(&mut s, "tool.scaleAnchor", json!({}))["anchor"], json!("c"));
|
||||
assert_eq!(s.tool.scale_anchor, (1, 1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -118,7 +143,7 @@ fn the_live_readout_shows_the_factor_and_pivot() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_anchor_and_alt_choose_what_stays_put() {
|
||||
fn the_anchor_is_read_back_and_alt_scales_from_the_centre() {
|
||||
let mut s = Session::new();
|
||||
let r = rect(&mut s, 0.0, 0.0, 100.0, 50.0);
|
||||
ex(&mut s, "select.set", json!({"ids": [r]}));
|
||||
@@ -126,12 +151,13 @@ fn the_anchor_and_alt_choose_what_stays_put() {
|
||||
assert_eq!(ex(&mut s, "tool.scaleAnchor", json!({"anchor": "c"}))["anchor"], json!("c"));
|
||||
assert_eq!(ex(&mut s, "tool.scaleAnchor", json!({}))["anchor"], json!("c"), "reads it back");
|
||||
assert!(s.execute("tool.scaleAnchor", &json!({"anchor": "nowhere"})).is_err());
|
||||
// A drag pivots on the opposite corner whatever the anchor.
|
||||
drag(&mut s, (100.0, 50.0), (150.0, 75.0), false);
|
||||
assert_rect(bounds(&s, r), [-50.0, -25.0, 150.0, 75.0]);
|
||||
assert_rect(bounds(&s, r), [0.0, 0.0, 150.0, 75.0]);
|
||||
// Alt scales from the centre whatever the anchor.
|
||||
ex(&mut s, "tool.scaleAnchor", json!({"anchor": "tl"}));
|
||||
drag(&mut s, (150.0, 75.0), (125.0, 62.5), true);
|
||||
assert_rect(bounds(&s, r), [-25.0, -12.5, 125.0, 62.5]);
|
||||
assert_rect(bounds(&s, r), [25.0, 12.5, 125.0, 62.5]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -17,7 +17,7 @@ impl Session {
|
||||
default_props: Default::default(),
|
||||
prefs: Prefs::default(),
|
||||
prefs_unsaved: false,
|
||||
tool: tools::ToolState::default(),
|
||||
tool: tools::ToolState { scale_anchor: (1, 1), ..tools::ToolState::default() },
|
||||
ui_requests: Vec::new(),
|
||||
ui_dark: None,
|
||||
journal: Vec::new(),
|
||||
|
||||
@@ -879,7 +879,7 @@ fn enter_in_another_field_after_tab_keeps_the_scale_tool() {
|
||||
assert_eq!(u.app.session.tool.tool, figcraft_engine::ToolId::Scale);
|
||||
}
|
||||
|
||||
/// K, 2, Enter: 100 x 100 becomes 200 x 200 about the panel's origin, the tool is Move, one undo step.
|
||||
/// K, 2, Enter: 100 x 100 becomes 200 x 200 about the panel's origin (the centre), the tool is Move, one undo step.
|
||||
#[test]
|
||||
fn k_two_enter_scales_the_selection_by_two() {
|
||||
let (mut u, r) = scale_setup();
|
||||
@@ -889,8 +889,8 @@ fn k_two_enter_scales_the_selection_by_two() {
|
||||
u.frame(vec![Event::Text("2".to_string())]);
|
||||
key(&mut u, Key::Enter, Modifiers::NONE);
|
||||
u.frame(vec![]);
|
||||
// About the panel's origin, FigCraft's top-left default (Figma's grid starts at the centre).
|
||||
assert_eq!(geom(&u, r), (0.0, 0.0, 200.0, 200.0));
|
||||
// About the panel's origin, which starts at the centre as Figma's grid does.
|
||||
assert_eq!(geom(&u, r), (-50.0, -50.0, 200.0, 200.0));
|
||||
assert!(!scale_field_focused(&u), "the field let go of the keyboard");
|
||||
assert_eq!(u.app.session.tool.tool, figcraft_engine::ToolId::Move);
|
||||
assert_eq!(u.app.session.ds().unwrap().selection, vec![r]);
|
||||
@@ -909,7 +909,8 @@ fn the_scale_field_takes_2x_and_1_5() {
|
||||
u.frame(vec![Event::Text(text.to_string())]);
|
||||
key(&mut u, Key::Enter, Modifiers::NONE);
|
||||
u.frame(vec![]);
|
||||
assert_eq!(geom(&u, r), (0.0, 0.0, size, size), "{text}");
|
||||
let at = 50.0 - size / 2.0;
|
||||
assert_eq!(geom(&u, r), (at, at, size, size), "{text}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-10 · **Change:** minor (Preferences ▸ Invert zoom direction reverses wheel zoom, pinch unchanged (#2145); Shift while rotating lands on absolute multiples of 15°, measured in Figma; Flatten bakes a vector's point corner radius into its path (#2195); a click on a fill, stroke or effect row's grip or background highlights it, Cmd/Ctrl+C copies that paint or effect and Cmd/Ctrl+V pastes it onto the selected layers, as the help center's Copy and paste properties between layers says (#1494); wrap style per paragraph and in text styles (#1827); the Annotation tool (Shift+T, `tool.annotation {id?}`): with a layer selected (or an `id`) it asks the UI for that layer's note at once, and in the tool a press on a layer selects it and asks for its note, a press on empty canvas does nothing; the marquee follows Figma's measured rules: a partly covered frame or section gives the layers in it the marquee touches, a rotated shape is touched by its outline, a drag from inside a frame selects that frame only when the marquee also takes another top-level frame (then whole) (`marquee_behaviour_tests`); copy, cut and paste in vector edit mode act on the selected points and segments (#1875); M8, #2146: K focuses the Scale tool's factor field with its text selected, so K, 2, Enter scales the selection by two about the panel's origin (FigCraft's starts at the top left; Figma's grid starts at the centre, left for a follow-up because the origin also sets where a handle drag pivots, which is not measured) in one undo step, after which the tool returns to Move with the selection kept; Escape in the field closes it with the tool back on Move and nothing changed (measured in Figma's web app, 2026-11-09; `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`); the main menu and its submenus stay inside the window, moving up to fit and scrolling when taller (#2217); locked layers ignore the arrow keys and a locked parent's children can't be locked on their own (#1560); the left rail's and tab strip's icons are larger, 20 pt (#553); pick select: Tab while the keyboard selection box shows (or the chord again) puts a pink outline on a layer and the keys walk the layer tree from it, as Accessibility at Figma says (#1836); scrubbing a field faster or slower by the pointer's height, with a notice of the speed, as the help center's Scrub fields says (#1837); component rows in the Layers panel at AA contrast in the theme's component tint, with the rows inside a selected component in a tone of its row (#1903); Cmd/Ctrl-click on a padding field sets all four sides with the value typed, a documented auto layout shortcut; a fill per region of a vector: with regions selected in edit mode, the Fill section and the fill commands edit those regions' own fills, as Edit vector layers says (#1875); the Fill section of a text whose characters were coloured differently while editing shows mixed content, characters that all share fills the layer doesn't have show those, and a layer-level fill edit reaches every character (#1856); a number field scrubs when dragged with Alt held, as the help center's scrub section says, not only by its label; reuse visible layer selection roots (M8); ; with a shape or frame tool chosen and nothing selected, the arrows show a placement crosshair in the middle of the view and move it, and Enter places there, as Accessibility at Figma says (#1839); text direction per paragraph: Text ▸ Text direction forces a paragraph left to right or right to left, as Add right-to-left text says (#1830), with `text.direction`, `node.set textDirection`, the Type settings control once a right-to-left script is in the text, inspect, the CSS `direction` and the `.fig` lines' `sourceDirectionality`; the boolean operation menu in the Design panel leads each entry with an original icon drawn in code, a filled preview of the result (#2003); a press on the open gradient's handles or stops on the canvas keeps the colour picker open through the drag, as its own control (#1852); a click with the Bend tool on a sharp point curves it, its handles along the line between its neighbours, as Edit vector layers says (#1875); wrap style: Auto, Balance and Pretty on a text layer decide where its lines break, as Explore text properties says (#1827), with the Type settings control, `text.wrapStyle`, `node.set wrapStyle`, inspect and the CSS `text-wrap`; Backspace or Delete at the start of a list item keeps the item's indentation level, as the lists article says; max lines on auto-width text keep it auto width, hugging that many lines, as the text properties article says; superscript and subscript are synthesised where the font has no glyphs for them, from the standard glyphs shrunk and shifted by the font's OS/2 metrics, and a run mixing available and unavailable glyphs is synthesised whole, as ExpLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-12 · **Change:** minor (M8: Scale tool handle drags pivot on the opposite handle whatever the origin, and the origin starts at the centre (measured in Figma's web app, 2026-11-09); Preferences ▸ Invert zoom direction reverses wheel zoom, pinch unchanged (#2145); Shift while rotating lands on absolute multiples of 15°, measured in Figma; Flatten bakes a vector's point corner radius into its path (#2195); a click on a fill, stroke or effect row's grip or background highlights it, Cmd/Ctrl+C copies that paint or effect and Cmd/Ctrl+V pastes it onto the selected layers, as the help center's Copy and paste properties between layers says (#1494); wrap style per paragraph and in text styles (#1827); the Annotation tool (Shift+T, `tool.annotation {id?}`): with a layer selected (or an `id`) it asks the UI for that layer's note at once, and in the tool a press on a layer selects it and asks for its note, a press on empty canvas does nothing; the marquee follows Figma's measured rules: a partly covered frame or section gives the layers in it the marquee touches, a rotated shape is touched by its outline, a drag from inside a frame selects that frame only when the marquee also takes another top-level frame (then whole) (`marquee_behaviour_tests`); copy, cut and paste in vector edit mode act on the selected points and segments (#1875); M8, #2146: K focuses the Scale tool's factor field with its text selected, so K, 2, Enter scales the selection by two about the panel's origin, which starts at the centre in one undo step, after which the tool returns to Move with the selection kept; Escape in the field closes it with the tool back on Move and nothing changed (measured in Figma's web app, 2026-11-09; `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`); the main menu and its submenus stay inside the window, moving up to fit and scrolling when taller (#2217); locked layers ignore the arrow keys and a locked parent's children can't be locked on their own (#1560); the left rail's and tab strip's icons are larger, 20 pt (#553); pick select: Tab while the keyboard selection box shows (or the chord again) puts a pink outline on a layer and the keys walk the layer tree from it, as Accessibility at Figma says (#1836); scrubbing a field faster or slower by the pointer's height, with a notice of the speed, as the help center's Scrub fields says (#1837); component rows in the Layers panel at AA contrast in the theme's component tint, with the rows inside a selected component in a tone of its row (#1903); Cmd/Ctrl-click on a padding field sets all four sides with the value typed, a documented auto layout shortcut; a fill per region of a vector: with regions selected in edit mode, the Fill section and the fill commands edit those regions' own fills, as Edit vector layers says (#1875); the Fill section of a text whose characters were coloured differently while editing shows mixed content, characters that all share fills the layer doesn't have show those, and a layer-level fill edit reaches every character (#1856); a number field scrubs when dragged with Alt held, as the help center's scrub section says, not only by its label; reuse visible layer selection roots (M8); ; with a shape or frame tool chosen and nothing selected, the arrows show a placement crosshair in the middle of the view and move it, and Enter places there, as Accessibility at Figma says (#1839); text direction per paragraph: Text ▸ Text direction forces a paragraph left to right or right to left, as Add right-to-left text says (#1830), with `text.direction`, `node.set textDirection`, the Type settings control once a right-to-left script is in the text, inspect, the CSS `direction` and the `.fig` lines' `sourceDirectionality`; the boolean operation menu in the Design panel leads each entry with an original icon drawn in code, a filled preview of the result (#2003); a press on the open gradient's handles or stops on the canvas keeps the colour picker open through the drag, as its own control (#1852); a click with the Bend tool on a sharp point curves it, its handles along the line between its neighbours, as Edit vector layers says (#1875); wrap style: Auto, Balance and Pretty on a text layer decide where its lines break, as Explore text properties says (#1827), with the Type settings control, `text.wrapStyle`, `node.set wrapStyle`, inspect and the CSS `text-wrap`; Backspace or Delete at the start of a list item keeps the item's indentation level, as the lists article says; max lines on auto-width text keep it auto width, hugging that many lines, as the text properties article says; superscript and subscript are synthesised where the font has no glyphs for them, from the standard glyphs shrunk and shifted by the font's OS/2 metrics, and a run mixing available and unavailable glyphs is synthesised Line truncated
|
||||
|
||||
Fine canvas control is what Figma users feel first: handles, snapping, nudging, modifier keys,
|
||||
drag behaviour, numeric precision. This checklist covers the tools, gestures and panels. Status:
|
||||
@@ -71,7 +71,7 @@ interaction feel not yet compared.
|
||||
| Enter with a shape or frame tool chosen | done | places what a click makes (100×100, lines 100 long, sections 400×300) in the middle of the view, selected (`tool.place`); from the toolbar, Enter on the chosen tool. With nothing selected, the arrows first show a crosshair in the middle of the view and then move it by the nudge amounts (`tool.crosshair`; Shift the large one), and Enter places there; Escape or a tool change takes it away ("Use the arrow keys to activate the crosshair cursor. It will appear in the middle of the viewport indicating where the new object will be placed", Accessibility at Figma; #1839) |
|
||||
| Alt-drag duplicate | done | the copy snaps to the layer it came from too (edges, centres, equal spacing); Duplicate (Cmd+D) then repeats the copy's offset, also after a Duplicate whose copy was moved, as long as the copies stay selected (the documentation doesn't say; pinned from community answers) |
|
||||
| Drag threshold; double-click into groups and text | done | a press moves or resizes only once the pointer has travelled 3 px on screen, so a click or double-click made with an unsteady hand drags nothing; a double-click goes one level into a group and the next one edits the text under it, wherever on the text it lands, with all of it selected (a double-click in the text being edited selects the word) (`double_click_tests`); Enter on a selected text does the same (all of it selected, typing replaces it) and Escape leaves editing with the layer still selected (`text_enter_tests`) |
|
||||
| Scale tool (K): handles about an anchor, live factor, panel | done | Pressing K opens the Scale section with its factor field focused and its text selected; typing 2 (or 2x, 1.5) then Enter scales the selection by it about the panel's origin (FigCraft's starts at the top left; Figma's grid starts at the centre, left for a follow-up because the origin also sets where a handle drag pivots, which is not measured), as one undo step, then closes the section and returns to Move with the selection kept; Escape in the field closes it, back to Move, nothing changed. Measured in Figma's web app, 2026-11-09. Tests: `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`. |
|
||||
| Scale tool (K): handles about the opposite handle, live factor, panel | done | Dragging a handle ignores the origin grid and pivots on the opposite handle's point (the opposite corner, or the opposite edge's middle for an edge, which scales both ways), with Alt on the centre; the origin grid (`tool.scaleAnchor`) starts at the centre and sets only what the Scale field and the W and H fields keep fixed (W and H with a non-centre origin are unmeasured). Measured in Figma's web app, 2026-11-09. Tests: `a_scale_handle_drag_pivots_on_the_opposite_handle_whatever_the_origin`, `the_scale_origin_starts_at_the_centre`. Pressing K opens the Scale section with its factor field focused and its text selected; typing 2 (or 2x, 1.5) then Enter scales the selection by it about the panel's origin, which starts at the centre, as one undo step, then closes the section and returns to Move with the selection kept; Escape in the field closes it, back to Move, nothing changed. Measured in Figma's web app, 2026-11-09. Tests: `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`. |
|
||||
| Nudge 1 / Shift 10 (preference), Cmd+arrows resize | done | arrows reorder auto layout children |
|
||||
| Smart guides: edges, centres, equal spacing (between two layers or continuing a row's gap, labelled), spacing labels, parent, layout grid, ruler guides | done | red, `snap.rs`; a guide dragged out of a ruler or moved snaps to layer edges and centres too (Snap to Objects; Cmd/Ctrl suspends), on its own axis only; page guides see the page's top-level layers, frame guides the frame's box, layout grids and every layer in it, along a rotated frame's own axes; thresholds not yet compared with Figma's (`guide_snap_tests`) |
|
||||
| Ctrl to suspend snapping while dragging (macOS) | done | Control on macOS (Cmd keeps working), Ctrl elsewhere; moving, resizing and drawing |
|
||||
@@ -314,5 +314,6 @@ This audit records candidates for subsequent fixes; their behaviour is unchanged
|
||||
| 2026-10-11 | minor | Canvas fixes: boolean groups clicked where their result is, a layer dragged inside a group stays in it, View ▸ Frame outlines and View ▸ Slices draw |
|
||||
| 2026-10-11 | minor | Outline mode done: outlines for the selection (the selected layers draw as outlines, the rest normally) and mask outlines |
|
||||
| 2026-10-11 | minor | Design panel arc fields, live boolean editing (operands on the canvas, live results, per-operand operations), shape builder on strokes and open paths, one-sided widths (Alt-drag a width handle) |
|
||||
| 2026-11-09 | patch | M8, #2146: K focuses the Scale tool's factor field with its text selected, so K, 2, Enter scales the selection by two about the panel's origin (FigCraft's starts at the top left; Figma's grid starts at the centre, left for a follow-up because the origin also sets where a handle drag pivots, which is not measured) in one undo step, after which the tool returns to Move with the selection kept; Escape in the field closes it with the tool back on Move and nothing changed (measured in Figma's web app, 2026-11-09; `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`) |
|
||||
| 2026-11-09 | patch | M8, #2146: K focuses the Scale tool's factor field with its text selected, so K, 2, Enter scales the selection by two about the panel's origin, which starts at the centre in one undo step, after which the tool returns to Move with the selection kept; Escape in the field closes it with the tool back on Move and nothing changed (measured in Figma's web app, 2026-11-09; `pressing_k_focuses_the_scale_field_with_its_text_selected`, `k_two_enter_scales_the_selection_by_two`, `escape_in_the_scale_field_closes_it_and_changes_nothing`) |
|
||||
| 2026-11-12 | patch | M8: Scale tool handle drags pivot on the opposite handle whatever the origin, and the origin starts at the centre, so K, 2, Enter scales about the centre (measured in Figma's web app, 2026-11-09; `a_scale_handle_drag_pivots_on_the_opposite_handle_whatever_the_origin`, `the_scale_origin_starts_at_the_centre`) |
|
||||
| 2026-10-10 | major | Created from the ROADMAP's look-and-feel and interaction items, the keymap and the canvas code |
|
||||
Reference in new issue
Block a user