We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9101d7a commit afbcb18Copy full SHA for afbcb18
src/components/legend/draw.js
@@ -25,11 +25,12 @@ var helpers = require('./helpers');
25
var MAIN_TITLE = 1;
26
27
module.exports = function draw(gd, opts) {
28
- if(!opts) opts = gd._fullLayout.legend || {};
29
- drawOne(gd, opts);
+ drawOne(gd, opts || gd._fullLayout.legend);
30
};
31
32
-function drawOne(gd, legendObj) {
+function drawOne(gd, opts) {
+ var legendObj = opts || {};
33
+
34
var fullLayout = gd._fullLayout;
35
var clipId, layer;
36
0 commit comments