Skip to content

Commit d67de6d

Browse files
committed
Merge branch 'sy-3833-2' into sy-3833-3
2 parents da9e516 + 3ab7395 commit d67de6d

5 files changed

Lines changed: 1035 additions & 194 deletions

File tree

core/pkg/service/schematic/actions.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ func (a SetNodePosition) Handle(state Schematic) (Schematic, error) {
3535
return state, nil
3636
}
3737

38+
// Handle records the rendered pixel size of the named node. No-op if no node
39+
// matches.
40+
func (a SetNodeMeasured) Handle(state Schematic) (Schematic, error) {
41+
for i := range state.Nodes {
42+
if state.Nodes[i].Key == a.Key {
43+
state.Nodes[i].Measured = a.Measured
44+
break
45+
}
46+
}
47+
return state, nil
48+
}
49+
3850
// Handle inserts the node if no node with the same key exists, otherwise
3951
// replaces the existing node in place. If Config is non-nil, it is stored
4052
// under the node's key.

0 commit comments

Comments
 (0)