Skip to content

Commit 5a27446

Browse files
SaadArdatiBirjuVachhani
authored andcommitted
Fix bricked-size parent revealer, fix bricked-constraints sizing revealer. Fix center-position of nodes inside single placeholder nodes mid-drag. Fix constraints not relegating from single placeholder node.
1 parent 8a174fb commit 5a27446

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

lib/src/api/nodes/base_node.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,33 +476,33 @@ abstract class BaseNode with SerializableMixin, EquatableMixin {
476476
/// Whether the height of this node is at the maximum height it can be.
477477
/// This is always false if no maxHeight constraint is set.
478478
bool get isAtMaxHeight {
479-
return constraints.maxHeight != null &&
479+
return resolvedConstraints.maxHeight != null &&
480480
outerBoxLocal.height >=
481-
(constraints.maxHeight! + outerBoxLocal.verticalEdgeSpace);
481+
(resolvedConstraints.maxHeight! + outerBoxLocal.verticalEdgeSpace);
482482
}
483483

484484
/// Whether the width of this node is at the maximum width it can be.
485485
/// This is always false if no maxHeight constraint is set.
486486
bool get isAtMaxWidth {
487-
return constraints.maxWidth != null &&
487+
return resolvedConstraints.maxWidth != null &&
488488
outerBoxLocal.width >=
489-
(constraints.maxWidth! + outerBoxLocal.horizontalEdgeSpace);
489+
(resolvedConstraints.maxWidth! + outerBoxLocal.horizontalEdgeSpace);
490490
}
491491

492492
/// Whether the height of this node is at the minimum height it can be.
493493
/// This is always false if no maxHeight constraint is set.
494494
bool get isAtMinHeight {
495-
return constraints.minHeight != null &&
495+
return resolvedConstraints.minHeight != null &&
496496
outerBoxLocal.height <=
497-
(constraints.minHeight! + outerBoxLocal.verticalEdgeSpace);
497+
(resolvedConstraints.minHeight! + outerBoxLocal.verticalEdgeSpace);
498498
}
499499

500500
/// Whether the width of this node is at the minimum width it can be.
501501
/// This is always false if no maxHeight constraint is set.
502502
bool get isAtMinWidth {
503-
return constraints.minWidth != null &&
503+
return resolvedConstraints.minWidth != null &&
504504
outerBoxLocal.width <=
505-
(constraints.minWidth! + outerBoxLocal.horizontalEdgeSpace);
505+
(resolvedConstraints.minWidth! + outerBoxLocal.horizontalEdgeSpace);
506506
}
507507

508508
/// Determines whether this node relegates internal constraints to its

lib/src/api/nodes/single_placeholder_node.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class SinglePlaceholderNode extends SceneNode
2222

2323
@override
2424
BoxConstraintsModel? relegatedConstraintsToChildren(BaseNode child) {
25-
return null;
2625
final superRelegated = super.relegatedConstraintsToChildren(child);
2726
return superRelegated == null
2827
? constraints

0 commit comments

Comments
 (0)