@@ -363,6 +363,15 @@ function renderScrollbarKit(tableControlView, gd, bypassVisibleBar) {
363363 . attr ( 'y2' , function ( d ) {
364364 return d . scrollbarState . scrollableAreaHeight ;
365365 } ) ;
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+ }
366375}
367376
368377function renderColumnCellTree ( gd , tableControlView , columnBlock , allColumnBlock ) {
@@ -720,7 +729,7 @@ function conditionalPanelRerender(gd, tableControlView, cellsColumnBlock, pages,
720729 }
721730}
722731
723- function wrapTextMaker ( columnBlock , element , tableControlView ) {
732+ function wrapTextMaker ( columnBlock , element , tableControlView , gd ) {
724733 return function wrapText ( ) {
725734 var cellTextHolder = d3 . select ( element . parentNode ) ;
726735 cellTextHolder
@@ -758,7 +767,7 @@ function wrapTextMaker(columnBlock, element, tableControlView) {
758767 cellTextHolder . selectAll ( 'tspan.line' ) . remove ( ) ;
759768
760769 // resupply text, now wrapped
761- populateCellText ( cellTextHolder . select ( '.' + c . cn . cellText ) , tableControlView , columnBlock ) ;
770+ populateCellText ( cellTextHolder . select ( '.' + c . cn . cellText ) , tableControlView , columnBlock , gd ) ;
762771 d3 . select ( element . parentNode . parentNode ) . call ( setCellHeightAndPositionY ) ;
763772 } ;
764773}
0 commit comments