mirror of
https://github.com/rio-labs/rio.git
synced 2026-05-07 20:09:40 -05:00
fix margin not making layout dirty
This commit is contained in:
@@ -24,7 +24,12 @@ export class AlignComponent extends ComponentBase {
|
||||
): void {
|
||||
this.replaceOnlyChild(latentComponents, deltaState.content);
|
||||
|
||||
this.makeLayoutDirty();
|
||||
if (
|
||||
deltaState.align_x !== undefined ||
|
||||
deltaState.align_y !== undefined
|
||||
) {
|
||||
this.makeLayoutDirty();
|
||||
}
|
||||
}
|
||||
|
||||
updateNaturalWidth(ctx: LayoutContext): void {
|
||||
|
||||
@@ -25,6 +25,15 @@ export class MarginComponent extends ComponentBase {
|
||||
latentComponents: Set<ComponentBase>
|
||||
): void {
|
||||
this.replaceOnlyChild(latentComponents, deltaState.content);
|
||||
|
||||
if (
|
||||
deltaState.margin_left !== undefined ||
|
||||
deltaState.margin_top !== undefined ||
|
||||
deltaState.margin_right !== undefined ||
|
||||
deltaState.margin_bottom !== undefined
|
||||
) {
|
||||
this.makeLayoutDirty();
|
||||
}
|
||||
}
|
||||
|
||||
updateNaturalWidth(ctx: LayoutContext): void {
|
||||
|
||||
Reference in New Issue
Block a user