You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the use-case or motivation for changing an existing behavior?
Documentation states that max-width should be set only if the cross axis is set to stretch.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.0.2
flex-layout 7.0.0-beta.19
Is there anything else we should know?
The problem only apears when both fxLayout and fxLayoutAlign are used together; using just fxLayoutAlign generates correct css.
The problem is that LayoutAlignDirective._allowStretching is called twice, the first time with start stretch - the default setting, and only after that with center center. LayoutAlignDirective does not reset the max-width/max-height when changing away from the stretch cross axis.
The first call is triggered by ngOnChanges on LayoutDirective, which triggeres LayoutAlignDirective._onLayoutChange on a LayoutAlign directive that is not yet initialized with the input values, so it uses the defaults start stretch.
The next call is triggered by ngOnChanges on LayoutAlignDirective, and this time the align settings are initialized correctly with center center, but max-width is never reset
The text was updated successfully, but these errors were encountered:
Bug Report
What is the expected behavior?
Should generate css:
What is the current behavior?
It adds an extra css property:
max-width: 100%
What are the steps to reproduce?
https://stackblitz.com/edit/angular-7ktrke?file=src%2Fapp%2Fapp.component.ts
What is the use-case or motivation for changing an existing behavior?
Documentation states that
max-width
should be set only if the cross axis is set tostretch
.Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.0.2
flex-layout 7.0.0-beta.19
Is there anything else we should know?
The problem only apears when both
fxLayout
andfxLayoutAlign
are used together; using justfxLayoutAlign
generates correct css.The problem is that
LayoutAlignDirective._allowStretching
is called twice, the first time withstart stretch
- the default setting, and only after that withcenter center
.LayoutAlignDirective
does not reset themax-width
/max-height
when changing away from thestretch
cross axis.The first call is triggered by
ngOnChanges
onLayoutDirective
, which triggeresLayoutAlignDirective._onLayoutChange
on a LayoutAlign directive that is not yet initialized with the input values, so it uses the defaultsstart stretch
.The next call is triggered by
ngOnChanges
onLayoutAlignDirective
, and this time the align settings are initialized correctly withcenter center
, butmax-width
is never resetThe text was updated successfully, but these errors were encountered: