@@ -363,6 +363,15 @@ function renderScrollbarKit(tableControlView, gd, bypassVisibleBar) {
363
363
. attr ( 'y2' , function ( d ) {
364
364
return d . scrollbarState . scrollableAreaHeight ;
365
365
} ) ;
366
+
367
+ // Remove scroll glyph and capture zone on static plots
368
+ // as they don't render properly when converted to PDF
369
+ // in the Chrome PDF viewer
370
+ // https://github.com/plotly/streambed/issues/11618
371
+ if ( gd . _context . staticPlot ) {
372
+ scrollbarGlyph . remove ( ) ;
373
+ scrollbarCaptureZone . remove ( ) ;
374
+ }
366
375
}
367
376
368
377
function renderColumnCellTree ( gd , tableControlView , columnBlock , allColumnBlock ) {
@@ -720,7 +729,7 @@ function conditionalPanelRerender(gd, tableControlView, cellsColumnBlock, pages,
720
729
}
721
730
}
722
731
723
- function wrapTextMaker ( columnBlock , element , tableControlView ) {
732
+ function wrapTextMaker ( columnBlock , element , tableControlView , gd ) {
724
733
return function wrapText ( ) {
725
734
var cellTextHolder = d3 . select ( element . parentNode ) ;
726
735
cellTextHolder
@@ -758,7 +767,7 @@ function wrapTextMaker(columnBlock, element, tableControlView) {
758
767
cellTextHolder . selectAll ( 'tspan.line' ) . remove ( ) ;
759
768
760
769
// resupply text, now wrapped
761
- populateCellText ( cellTextHolder . select ( '.' + c . cn . cellText ) , tableControlView , columnBlock ) ;
770
+ populateCellText ( cellTextHolder . select ( '.' + c . cn . cellText ) , tableControlView , columnBlock , gd ) ;
762
771
d3 . select ( element . parentNode . parentNode ) . call ( setCellHeightAndPositionY ) ;
763
772
} ;
764
773
}
0 commit comments