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) {
257257 * Add source links to your graph inside the 'showSources' config argument.
258258 */
259259plots . 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+
260263 var fullLayout = gd . _fullLayout ;
261264
262265 var linkContainer = fullLayout . _paper
Original file line number Diff line number Diff line change @@ -160,11 +160,7 @@ describe('config argument', function() {
160160
161161 var link = document . getElementsByClassName ( 'js-plot-link-container' ) [ 0 ] ;
162162
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 ( ) ;
168164 } ) ;
169165
170166 it ( 'should display a link when true' , function ( ) {
You can’t perform that action at this time.
0 commit comments