File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Original file line number Diff line number Diff line change @@ -400,11 +400,6 @@ function setBackground(gd, bgColor) {
400
400
}
401
401
402
402
function opaqueSetBackground ( gd , bgColor ) {
403
- gd . _fullLayout . _paperdiv . style ( 'background' , 'white' ) ;
404
- setBackground ( gd , bgColor ) ;
405
- }
406
-
407
- function blendSetBackground ( gd , bgColor ) {
408
403
var blend = Color . combine ( bgColor , 'white' ) ;
409
404
setBackground ( gd , blend ) ;
410
405
}
@@ -421,12 +416,8 @@ function setPlotContext(gd, config) {
421
416
key = keys [ i ] ;
422
417
if ( key === 'editable' || key === 'edits' ) continue ;
423
418
if ( key in context ) {
424
- if ( key === 'setBackground' ) {
425
- if ( config [ key ] === 'opaque' ) {
426
- context [ key ] = opaqueSetBackground ;
427
- } else if ( config [ key ] === 'blend' ) {
428
- context [ key ] = blendSetBackground ;
429
- }
419
+ if ( key === 'setBackground' && config [ key ] === 'opaque' ) {
420
+ context [ key ] = opaqueSetBackground ;
430
421
} else {
431
422
context [ key ] = config [ key ] ;
432
423
}
Original file line number Diff line number Diff line change @@ -106,9 +106,9 @@ module.exports = {
106
106
// increase the pixel ratio for Gl plot images
107
107
plotGlPixelRatio : 2 ,
108
108
109
- // function to add the background color to a different container
110
- // or 'opaque' to ensure there's white behind it,
111
- // or 'blend' to blend bg color with white,
109
+ // background setting function
110
+ // 'transparent' sets the background `layout.paper_color`
111
+ // 'opaque' blends bg color with white ensuring an opaque background
112
112
// or any other custom function of gd
113
113
setBackground : 'transparent' ,
114
114
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ var attrs = {
47
47
'Sets the image background mode.' ,
48
48
'By default, the image background is determined by `layout.paper_bgcolor`,' ,
49
49
'the *transparent* mode.' ,
50
- 'One might consider setting `setBackground` to *opaque* or *blend* ' ,
50
+ 'One might consider setting `setBackground` to *opaque*' ,
51
51
'when exporting a *jpeg* image as JPEGs do not support opacity.'
52
52
] . join ( ' ' )
53
53
} ,
You can’t perform that action at this time.
0 commit comments