File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
ts/output/common/Wrappers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -701,14 +701,13 @@ export function CommonMtableMixin<
701701 }
702702 }
703703 const count = stretchy . length ;
704- const nodeCount = this . childNodes . length ;
705- if ( count && nodeCount > 1 && W === null ) {
704+ if ( count && W === null ) {
706705 W = 0 ;
707706 //
708707 // If all the children are stretchy, find the largest one,
709708 // otherwise, find the width of the non-stretchy children.
710709 //
711- const all = count > 1 && count === nodeCount ;
710+ const all = count === this . childNodes . length ;
712711 for ( const row of this . tableRows ) {
713712 const cell = row . getChild ( i ) ;
714713 if ( cell ) {
@@ -727,12 +726,17 @@ export function CommonMtableMixin<
727726 //
728727 // Stretch the stretchable children
729728 //
729+ const TW = this . getTableData ( ) . W ;
730730 for ( const child of stretchy ) {
731731 child
732732 . coreMO ( )
733733 . getStretchedVariant ( [
734734 Math . max ( W , child . getBBox ( ) . w ) / child . coreRScale ( ) ,
735735 ] ) ;
736+ const w = child . getBBox ( ) . w ;
737+ if ( w > TW [ i ] ) {
738+ TW [ i ] = w ;
739+ }
736740 }
737741 }
738742 }
You can’t perform that action at this time.
0 commit comments