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) {
201
201
// Make sure the legend top and bottom are visible
202
202
// (legends with a scroll bar are not allowed to stretch beyond the extended
203
203
// 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 ;
208
208
209
209
210
210
if ( legendHeight > legendHeightMax ) {
@@ -220,9 +220,7 @@ module.exports = function draw(gd) {
220
220
}
221
221
222
222
// 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 ;
226
224
227
225
scrollBox . attr ( 'transform' , 'translate(0, ' + scrollPosition + ')' ) ;
228
226
You can’t perform that action at this time.
0 commit comments