Commit Graph
13 Commits
Author SHA1 Message Date
dotCooCoo 8f5eb5435f Tests: assert exact columns, padding and corner span in js and tools tests
Five assertions accepted any positive value, so a wrong result could pass:

- host_tests: the evaluator site column and the thrown error's column are
  now 3, where the indented call and throw start.
- promise_tests: rejections relayed through Promise.all, Promise.race and
  a catch handler report column 3, not any column above 0.
- xmp_tests: the sample packet's padding is exactly 1.
- corners tests: a 10 pt radius at a 120 degree polygon corner spans
  10 pt, within 1e-6, instead of anything in (5, 10.5].
2026-12-01 02:13:46 -08:00
dotCooCoo 87456c5b35 Merge main into fix/issue-1232 2026-11-28 20:00:34 -08:00
dotCooCoo b187e886d7 Merge main into fix/issue-1232 2026-11-24 20:35:20 -08:00
dotCooCoo a061629a15 Merge main into feat/corner-widget-hover 2026-11-24 20:33:41 -08:00
dotCooCoo 959332840c Live Corners: hovering a corner widget highlights the corner it controls
While the pointer is within 5 px of a Live Corners widget (the distance
within which a press picks the widget), the canvas draws the cut of the
corner that widget controls in a 2 px line of the layer color, under the
widgets. It works with every tool that shows the widgets: Selection,
Direct Selection and the shape tools. Round, inverted round and chamfer
corners are highlighted; a square corner has no cut, so nothing is drawn.
No line is drawn while a mouse button is down (a press on the widget or
a pan), or where a widget is hidden.

CornerWidgets::hovered_cut finds the widget under the pointer and takes
its corner's segment from the path as drawn, through the corner sources
LiveCorners keeps, so a live rectangle, a live polygon and a plain path
with Live Corners all highlight the segment they draw.

Docs: docs/mcp.md (Live Corners) and the docs/target-app-parity.md
evidence list.

Part of #1232, reported by XTRECY-BD.
2026-11-20 02:18:48 -08:00
dotCooCoo 894fc64b8e Live Corners: a path with hidden widgets keeps its picks
The check for every corner being picked now counts every selected path
with corners, including one whose widgets are hidden because its sides
are too short on screen. A click or Shift-click on another path's
widget then keeps or toggles as usual instead of picking that corner
alone and dropping the hidden path's picks.

The docs now state the all-picked exception for a plain click and the
multi-path case for a Shift-click.
2026-11-20 01:15:23 -08:00
dotCooCoo 054d183842 Live Corners: pick any corner widget with Direct Selection
Part of #1232. With Direct Selection and some corners picked, the widgets
of the other corners used to hide, so a Shift-click could remove a picked
corner but not add another one. Now every eligible widget shows: a
picked corner's widget has a dot at its center and the others are
hollow.

- A click on a widget that is not picked picks its corner alone. A click
  on a picked widget keeps the picks, so Shift-clicking several corners
  and then double-clicking one of them opens Corners for all of them. A
  Shift-click adds or removes a corner on any selected path and keeps
  the other picks; on a path selected whole beside a path with picked
  corners it removes that corner (select.anchorsMany, mode toggle).
  While every corner of every path is picked, a click or Shift-click
  still picks that corner alone, as #6106 made it.
- A drag or Alt-click on a widget that is not picked edits its corner
  together with the picked ones, as one undo step, and does not pick it.
  A drag on a picked widget edits the picked corners alone.
- Over a widget that is not picked, the end of a selected anchor's
  direction handle, or an anchor at least as near to the pointer as
  the widget's center, takes the press, the cursor and the
  double-click.
  Hollow widgets are drawn below the anchors and handles.
- A Shift-click on a rounded corner picked by one of its two anchors
  removes the corner instead of swapping that anchor for the other.
- The Selection tool and the shape tools still show and edit the picked
  corners' widgets alone, drawn as before. The angle, side length and
  Hide Corner Widget rules are unchanged.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md,
docs/ui-parity.md.
2026-11-20 00:27:08 -08:00
dotCooCoo fd33180c84 Live Corners: a Selection tool double-click on a corner widget shows the Transform panel
With the Selection tool, a double-click on a visible corner widget of a
selected live rectangle or polygon now shows and selects the Transform
panel, where the shape's corner radius fields are, as the Rectangle,
Rounded Rectangle, Ellipse, Polygon and Star tools already do. It used to
open the Corners dialog. The tool, the selection, the document and the
undo history stay as they were. Direct Selection's double-click still
opens Corners.

Docs: docs/mcp.md (Live Corners), the ui.corners params text,
docs/ui-parity.md and docs/target-app-parity.md.

Part of #1232
2026-11-19 22:17:01 -08:00
dotCooCoo 0904472ffc Control bar: Hide Shape Widgets hides the selected live shapes' widgets
With the Rectangle, Rounded Rectangle, Ellipse, Polygon or Star tool, the
Control bar starts the tool's options with a Hide Shape Widgets button,
which reads Show Shape Widgets while the widgets are hidden
(`view.shapeWidgets {on?}`). Hidden, a selected live rectangle's or
polygon's corner widgets, a live ellipse's pie widgets and a live
polygon's side widget are not drawn, and the Selection tool and the shape
tools do not answer a press, a double-click or the cursor on them. The
bounding box and its handles, the center point and Direct Selection's
corner widgets (View › Hide Corner Widget) stay as they are.

The setting is on by default, saved with the interface state and kept
across tool switches; it adds no undo step. Its scope beyond the shape
tools, its default and what it leaves shown are VectorCraft's own rules.

The help page describes the button:
https://helpx.adobe.com/illustrator/using/live-shapes.html
2026-11-16 15:45:34 -08:00
Sven Lafebre c2c92b7d49 Fix #5188: selected anchors that are no corner keep Shift-click adding 2026-11-09 02:03:04 +07:00
Sven Lafebre a571e242af Fix #5188: a Shift-click on a corner widget of a whole path picks its corner
With Direct Selection, a Shift-click on a corner widget toggled its
corner. With the path selected whole every corner already is, so the
first Shift-click deselected the corner clicked and hid its widget,
leaving the others. While every corner is selected, a Shift-click now
picks that corner alone, as the first click of "click one widget, then
Shift-click the others" does; with some corners picked it still toggles.
2026-11-09 02:03:04 +07:00
aiongg f1d427762b style: cargo fmt on files moved without formatting 2026-10-26 19:32:10 +00:00
aiongg dc5888c243 refactor(tools): move corners.rs tests to corners/tests.rs 2026-10-26 18:18:17 +00:00