File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ plots.previousPromises = function(gd) {
257
257
* Add source links to your graph inside the 'showSources' config argument.
258
258
*/
259
259
plots . addLinks = function ( gd ) {
260
+ // Do not do anything if showLink and showSources are not set to true in config
261
+ if ( ! gd . _context . showLink && ! gd . _context . showSources ) return ;
262
+
260
263
var fullLayout = gd . _fullLayout ;
261
264
262
265
var linkContainer = fullLayout . _paper
Original file line number Diff line number Diff line change @@ -160,11 +160,7 @@ describe('config argument', function() {
160
160
161
161
var link = document . getElementsByClassName ( 'js-plot-link-container' ) [ 0 ] ;
162
162
163
- expect ( link . textContent ) . toBe ( '' ) ;
164
-
165
- var bBox = link . getBoundingClientRect ( ) ;
166
- expect ( bBox . width ) . toBe ( 0 ) ;
167
- expect ( bBox . height ) . toBe ( 0 ) ;
163
+ expect ( link ) . toBeUndefined ( ) ;
168
164
} ) ;
169
165
170
166
it ( 'should display a link when true' , function ( ) {
You can’t perform that action at this time.
0 commit comments