Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7e0889

Browse files
committed
Merge branch 'master' into emit-doubleclick
2 parents 9c19406 + 7b0036e commit e7e0889

File tree

108 files changed

+1652
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1652
-324
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"no-unused-vars": [2],
3636
"no-use-before-define": [2, "nofunc"],
3737
"no-loop-func": [2],
38-
"no-console": [0]
38+
"no-console": [0],
39+
"no-unexpected-multiline": [2],
40+
"no-unused-labels": [2]
3941
},
4042
}

devtools/test_dashboard/buttons.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* global Plotly:false Tabs:false */
22

3+
var Lib = require('@src/lib');
4+
35
var plotlist = document.getElementById('plot-list');
46
var anchor = document.getElementById('embedded-graph');
57
var image = document.getElementById('embedded-image');
@@ -40,9 +42,10 @@ function plotButtons(plots, figDir) {
4042
anchor.appendChild(gd);
4143

4244
var plot = plots[plotname];
43-
Plotly.plot(gd, plot.data, plot.layout);
44-
45+
var data = Lib.extendDeep([], plot.data);
46+
var layout = Lib.extendDeep({}, plot.layout);
4547

48+
Plotly.plot(gd, data, layout);
4649
});
4750
});
4851

devtools/test_dashboard/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
<!-- helper functions to manipulate the graph div -->
2323
<script>
24+
var d3 = Plotly.d3;
25+
2426
var Tabs = {
2527
getGraph: function() {
2628
return document.getElementById('embedded-graph').children[0];
@@ -34,10 +36,15 @@
3436
anchor.appendChild(graphDiv);
3537

3638
return graphDiv;
39+
},
40+
plotMock: function(mockName) {
41+
var mockURL = '../../test/image/mocks/' + mockName + '.json';
42+
43+
d3.json(mockURL, function(err, fig) {
44+
Plotly.plot(Tabs.fresh(), fig.data, fig.layout);
45+
});
3746
}
3847
};
39-
40-
var d3 = Plotly.d3;
4148
</script>
4249

4350
</body>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
"browserify": "^13.0.0",
8383
"browserify-transform-tools": "^1.5.1",
8484
"ecstatic": "^1.4.0",
85-
"eslint": "^1.10.3",
85+
"eslint": "^2.1.0",
8686
"falafel": "^1.2.0",
87-
"glob": "^6.0.4",
87+
"glob": "^7.0.0",
8888
"jasmine-core": "^2.3.4",
8989
"karma": "^0.13.15",
9090
"karma-browserify": "^5.0.1",

src/.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"env": {
44
"browser": true
55
},
6+
"globals": {
7+
"Promise": true,
8+
"Uint8Array": true
9+
},
610
"rules": {
711
"strict": [2, "global"]
812
}

src/components/legend/constants.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
module.exports = {
4+
scrollBarWidth: 4,
5+
scrollBarHeight: 20,
6+
scrollBarColor: '#808BA4',
7+
scrollBarMargin: 4
8+
};

0 commit comments

Comments
 (0)