Skip to content

Commit f39b9fe

Browse files
committed
Bind a node's border weight
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147gqWiq3xoEdAGwWSpq9JK
1 parent fd4db84 commit f39b9fe

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Unreleased
22

3+
- `strokeWeight` is a bindable style property of every node with strokes.
34
- A navigate-back (`pop`) action reads from JSON without `destinationId`,
45
which it has no use for. It is still written, as `''`, for readers that
56
require it.

‎lib/src/api/mixins.dart‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,8 @@ mixin PropertyVariableMixin on BaseNode {
10451045
/// Properties of the node that can be used in actions or can be changed by
10461046
/// an action.
10471047
///
1048-
/// Style properties (fill, stroke, opacity, width, height, flex; a text's
1049-
/// fill is its color) can be set by
1048+
/// Style properties (fill, stroke, strokeWeight, opacity, width, height,
1049+
/// flex; a text's fill is its color) can be set by
10501050
/// conditions, bound to variables or formulas, or changed by a set value
10511051
/// action, on any node that has them.
10521052
late final List<ValueModel> propertyVariables = [
@@ -1055,6 +1055,8 @@ mixin PropertyVariableMixin on BaseNode {
10551055
if (this case final GeometryMixin geometry) ...[
10561056
PaintValue(name: 'fill', value: geometry.fills.firstOrNull),
10571057
PaintValue(name: 'stroke', value: geometry.strokes.firstOrNull),
1058+
// A border that thickens when selected or hovered.
1059+
DoubleValue(name: 'strokeWeight', value: geometry.strokeWeight),
10581060
],
10591061
if (this case final TextNode text)
10601062
PaintValue(

0 commit comments

Comments
 (0)