@@ -357,7 +357,7 @@ function renderColumnCellTree(gd, tableControlView, columnBlock, allColumnBlock)
357
357
358
358
var columnCell = renderColumnCell ( columnCells ) ;
359
359
360
- setFont ( columnCell ) ;
360
+ supplyStylingValues ( columnCell ) ;
361
361
362
362
var cellRect = renderCellRect ( columnCell ) ;
363
363
@@ -367,6 +367,7 @@ function renderColumnCellTree(gd, tableControlView, columnBlock, allColumnBlock)
367
367
368
368
var cellText = renderCellText ( cellTextHolder ) ;
369
369
370
+ setFont ( cellText ) ;
370
371
populateCellText ( cellText , tableControlView , allColumnBlock , gd ) ;
371
372
372
373
// doing this at the end when text, and text stlying are set
@@ -440,7 +441,7 @@ function renderCellTextHolder(columnCell) {
440
441
return cellTextHolder ;
441
442
}
442
443
443
- function setFont ( columnCell ) {
444
+ function supplyStylingValues ( columnCell ) {
444
445
columnCell
445
446
. each ( function ( d , i ) {
446
447
var spec = d . calcdata . cells . font ;
@@ -450,15 +451,20 @@ function setFont(columnCell) {
450
451
color : gridPick ( spec . color , col , i ) ,
451
452
family : gridPick ( spec . family , col , i )
452
453
} ;
453
- Drawing . font ( d3 . select ( this ) , font ) ;
454
-
455
454
d . rowNumber = d . key ;
456
455
d . align = gridPick ( d . calcdata . cells . align , col , i ) ;
457
456
d . cellBorderWidth = gridPick ( d . calcdata . cells . line . width , col , i ) ;
458
457
d . font = font ;
459
458
} ) ;
460
459
}
461
460
461
+ function setFont ( cellText ) {
462
+ cellText
463
+ . each ( function ( d ) {
464
+ Drawing . font ( d3 . select ( this ) , d . font ) ;
465
+ } ) ;
466
+ }
467
+
462
468
function sizeAndStyleRect ( cellRect ) {
463
469
cellRect
464
470
. attr ( 'width' , function ( d ) { return d . column . columnWidth ; } )
@@ -781,11 +787,6 @@ function updateYPositionMaker(columnBlock, element, tableControlView, gd, d) {
781
787
return 'translate(' + xPosition ( d , d3 . select ( element . parentNode ) . select ( '.cellTextHolder' ) . node ( ) . getBoundingClientRect ( ) . width ) + ' ' + yPosition + ')' ;
782
788
} ) ;
783
789
784
- // MathJax styling has to be killed for HTML DOM color specifications to seep through
785
- cellTextHolder . selectAll ( 'svg' ) . selectAll ( '*' )
786
- . attr ( 'fill' , null )
787
- . attr ( 'stroke' , null ) ;
788
-
789
790
d . settledY = true ;
790
791
} ;
791
792
}
0 commit comments