| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7851629 commit a03065c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -604,7 +604,7 @@ export class FlexboxLayout extends FlexboxLayoutBase { | |||
| 604 | 604 | // As a result we cannot unconditionally measure with EXACTLY the current measured height | |
| 605 | 605 | const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentHeightMeasureSpec, | |
| 606 | 606 | lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop | |
| 607 | - + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight); | ||
| 607 | + + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight); | ||
| 608 | 608 | ||
| 609 | 609 | child.measure(childWidthMeasureSpec, childHeightMeasureSpec); | |
| 610 | 610 | child.effectiveMinWidth = minWidth; | |
@@ -820,7 +820,17 @@ export class FlexboxLayout extends FlexboxLayoutBase { | |||
| 820 | 820 | private _stretchViewVertically(view: View, crossSize: number) { | |
| 821 | 821 | let newHeight = crossSize - view.effectiveMarginTop - view.effectiveMarginBottom; | |
| 822 | 822 | newHeight = Math.max(newHeight, 0); | |
| 823 | - view.measure(makeMeasureSpec(view.getMeasuredWidth(), EXACTLY), makeMeasureSpec(newHeight, EXACTLY)); | ||
| 823 | + let originalMeasuredWidth = view.getMeasuredWidth(); | ||
| 824 | + let childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec, | ||
| 825 | + view.effectivePaddingLeft + view.effectivePaddingRight + view.effectiveMarginLeft | ||
| 826 | + + view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth)); | ||
| 827 | + | ||
| 828 | + view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY)); | ||
| 829 | + | ||
| 830 | + if (originalMeasuredWidth > view.getMeasuredWidth()) { | ||
| 831 | + childWidthMeasureSpec = makeMeasureSpec(originalMeasuredWidth, EXACTLY); | ||
| 832 | + view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY)); | ||
| 833 | + } | ||
| 824 | 834 | } | |
| 825 | 835 | ||
| 826 | 836 | private _stretchViewHorizontally(view: View, crossSize: number) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments