File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
ts/output/common/Wrappers Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -690,14 +690,13 @@ export function CommonMtableMixin<
690690 }
691691 }
692692 const count = stretchy . length ;
693- const nodeCount = this . childNodes . length ;
694- if ( count && nodeCount > 1 && W === null ) {
693+ if ( count && W === null ) {
695694 W = 0 ;
696695 //
697696 // If all the children are stretchy, find the largest one,
698697 // otherwise, find the width of the non-stretchy children.
699698 //
700- const all = count > 1 && count === nodeCount ;
699+ const all = count === this . childNodes . length ;
701700 for ( const row of this . tableRows ) {
702701 const cell = row . getChild ( i ) ;
703702 if ( cell ) {
@@ -716,12 +715,15 @@ export function CommonMtableMixin<
716715 //
717716 // Stretch the stretchable children
718717 //
718+ const TW = this . getTableData ( ) . W ;
719719 for ( const child of stretchy ) {
720+ const w = child . getBBox ( ) . w ;
720721 child
721722 . coreMO ( )
722- . getStretchedVariant ( [
723- Math . max ( W , child . getBBox ( ) . w ) / child . coreRScale ( ) ,
724- ] ) ;
723+ . getStretchedVariant ( [ Math . max ( W , w ) / child . coreRScale ( ) ] ) ;
724+ if ( w > TW [ i ] ) {
725+ TW [ i ] = w ;
726+ }
725727 }
726728 }
727729 }
You can’t perform that action at this time.
0 commit comments