File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -201,10 +201,10 @@ module.exports = function draw(gd) {
201201 // Make sure the legend top and bottom are visible
202202 // (legends with a scroll bar are not allowed to stretch beyond the extended
203203 // margins)
204- var lyMin = 0 ;
205- var lyMax = fullLayout . margin . t + fullLayout . height + fullLayout . margin . b ;
206- var legendHeight = opts . height ;
207- var legendHeightMax = gs . h ;
204+ var lyMin = 0 ,
205+ lyMax = fullLayout . height ,
206+ legendHeight = opts . height ,
207+ legendHeightMax = gs . h ;
208208
209209
210210 if ( legendHeight > legendHeightMax ) {
@@ -220,9 +220,7 @@ module.exports = function draw(gd) {
220220 }
221221
222222 // Deal with scrolling
223- var scrollPosition = scrollBox . attr ( 'data-scroll' ) ?
224- scrollBox . attr ( 'data-scroll' ) :
225- 0 ;
223+ var scrollPosition = scrollBox . attr ( 'data-scroll' ) || 0 ;
226224
227225 scrollBox . attr ( 'transform' , 'translate(0, ' + scrollPosition + ')' ) ;
228226
You can’t perform that action at this time.
0 commit comments