Skip to content

Commit aa13bfb

Browse files
committed
lint
1 parent 0b6dfcf commit aa13bfb

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

src/components/legend/index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,9 @@
99

1010
'use strict';
1111

12-
var Plotly = require('../../plotly');
13-
var d3 = require('d3');
14-
15-
var Lib = require('../../lib');
16-
17-
var Plots = require('../../plots/plots');
18-
var Fx = require('../../plots/cartesian/graph_interact');
19-
20-
var Color = require('../color');
21-
var Drawing = require('../drawing');
22-
23-
var subTypes = require('../../traces/scatter/subtypes');
24-
var styleOne = require('../../traces/pie/style_one');
2512

2613
var legend = module.exports = {};
2714

28-
var constants = require('./constants');
2915
legend.layoutAttributes = require('./attributes');
3016

3117
legend.supplyLayoutDefaults = require('./defaults');

src/plots/plots.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ plots.sanitizeMargins = function(fullLayout) {
840840
margin.b = Math.floor(correction * margin.b);
841841
}
842842
};
843+
843844
// called by legend and colorbar routines to see if we need to
844845
// expand the margins to show them
845846
// o is {x,l,r,y,t,b} where x and y are plot fractions,
@@ -874,17 +875,19 @@ plots.doAutoMargin = function(gd) {
874875
var fullLayout = gd._fullLayout;
875876
if(!fullLayout._size) fullLayout._size = {};
876877
if(!fullLayout._pushmargin) fullLayout._pushmargin = {};
878+
877879
var gs = fullLayout._size,
878880
oldmargins = JSON.stringify(gs);
879881

880882
// adjust margins for outside legends and colorbars
881883
// fullLayout.margin is the requested margin,
882884
// fullLayout._size has margins and plotsize after adjustment
883-
var ml = Math.max(fullLayout.margin.l||0,0),
884-
mr = Math.max(fullLayout.margin.r||0,0),
885-
mt = Math.max(fullLayout.margin.t||0,0),
886-
mb = Math.max(fullLayout.margin.b||0,0),
885+
var ml = Math.max(fullLayout.margin.l || 0, 0),
886+
mr = Math.max(fullLayout.margin.r || 0, 0),
887+
mt = Math.max(fullLayout.margin.t || 0, 0),
888+
mb = Math.max(fullLayout.margin.b || 0, 0),
887889
pm = fullLayout._pushmargin;
890+
888891
if(fullLayout.margin.autoexpand!==false) {
889892
// fill in the requested margins
890893
pm.base = {

test/jasmine/tests/legend_test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
var Legend = require('@src/components/legend');
21
var Plots = require('@src/plots/plots');
32

3+
var Legend = require('@src/components/legend');
44
var getLegendData = require('@src/components/legend/get_legend_data');
55
var helpers = require('@src/components/legend/helpers');
66
var anchorUtils = require('@src/components/legend/anchor_utils');
7+
8+
79
describe('Test legend:', function() {
810
'use strict';
911

0 commit comments

Comments
 (0)