@@ -4,7 +4,6 @@ var d3 = require('@plotly/d3');
4
4
var isNumeric = require ( 'fast-isnumeric' ) ;
5
5
6
6
var Lib = require ( '../../lib' ) ;
7
- var Color = require ( '../color' ) ;
8
7
var Icons = require ( '../../fonts/ploticon' ) ;
9
8
var version = require ( '../../version' ) . version ;
10
9
@@ -63,12 +62,6 @@ proto.update = function(graphInfo, buttons) {
63
62
Lib . addRelatedStyleRule ( modeBarId , '#' + modeBarId + ' .modebar-btn:hover .icon path' , 'fill: ' + style . activecolor ) ;
64
63
Lib . addRelatedStyleRule ( modeBarId , '#' + modeBarId + ' .modebar-btn.active .icon path' , 'fill: ' + style . activecolor ) ;
65
64
66
- // logo constrast color
67
- var logoId = modeBarId + '-logo' ;
68
- var logoSelector = context . displayModeBar === 'hover' ? '.plotlyjsicon' : '' ;
69
- Lib . deleteRelatedStyleRule ( logoId ) ;
70
- Lib . addRelatedStyleRule ( logoId , logoSelector + ' .cls-bg-contrast' , 'fill: ' + Color . contrast ( fullLayout . paper_bgcolor ) ) ;
71
-
72
65
// if buttons or logo have changed, redraw modebar interior
73
66
var needsNewButtons = ! this . hasButtons ( buttons ) ;
74
67
var needsNewLogo = ( this . hasLogo !== context . displaylogo ) ;
@@ -82,7 +75,7 @@ proto.update = function(graphInfo, buttons) {
82
75
this . updateButtons ( buttons ) ;
83
76
84
77
if ( context . watermark || context . displaylogo ) {
85
- var logoGroup = this . getLogo ( graphInfo ) ;
78
+ var logoGroup = this . getLogo ( ) ;
86
79
if ( context . watermark ) {
87
80
logoGroup . className = logoGroup . className + ' watermark' ;
88
81
}
@@ -299,7 +292,7 @@ function jsVersion(str) {
299
292
/**
300
293
* @return {HTMLDivElement } The logo image wrapped in a group
301
294
*/
302
- proto . getLogo = function ( graphInfo ) {
295
+ proto . getLogo = function ( ) {
303
296
var group = this . createGroup ( ) ;
304
297
var a = document . createElement ( 'a' ) ;
305
298
@@ -310,15 +303,6 @@ proto.getLogo = function(graphInfo) {
310
303
311
304
a . appendChild ( this . createIcon ( Icons . newplotlylogo ) ) ;
312
305
313
- var context = graphInfo . _context ;
314
- var fullLayout = graphInfo . _fullLayout ;
315
- var modeBarId = 'modebar-' + fullLayout . _uid ;
316
-
317
- var logoId = modeBarId + '-logo' ;
318
- var logoSelector = context . displayModeBar === 'hover' ? '.plotlyjsicon' : '' ;
319
- Lib . deleteRelatedStyleRule ( logoId ) ;
320
- Lib . addRelatedStyleRule ( logoId , logoSelector + ' .cls-bg-contrast' , 'fill: ' + Color . contrast ( fullLayout . paper_bgcolor ) ) ;
321
-
322
306
group . appendChild ( a ) ;
323
307
return group ;
324
308
} ;
@@ -334,7 +318,6 @@ proto.removeAllButtons = function() {
334
318
proto . destroy = function ( ) {
335
319
Lib . removeElement ( this . container . querySelector ( '.modebar' ) ) ;
336
320
Lib . deleteRelatedStyleRule ( this . _uid ) ;
337
- Lib . deleteRelatedStyleRule ( this . _uid + '-logo' ) ;
338
321
} ;
339
322
340
323
function createModeBar ( gd , buttons ) {
0 commit comments