Skip to content

Commit a6160bf

Browse files
committed
add Tabs.setPlotConfig :
- to so that local topojson files are used while dev'ing in the test dashboard - make sure that setPlotConfig is called on reload too
1 parent 7191173 commit a6160bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

devtools/test_dashboard/devtools.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ var d3 = window.d3 = Plotly.d3;
1111
// Our gracious testing object
1212
var Tabs = {
1313

14+
// Set plot config options
15+
setPlotConfig: function() {
16+
17+
// use local topojson files
18+
Plotly.setPlotConfig({ topojsonURL: '../../dist/topojson/' });
19+
},
20+
1421
// Return the specified plot container (or default one)
1522
getGraph: function(id) {
1623
id = id || 'graph';
@@ -110,6 +117,7 @@ var Tabs = {
110117
var interval = setInterval(function() {
111118
if(window.Plotly) {
112119
clearInterval(interval);
120+
Tabs.setPlotConfig();
113121
Tabs.onReload();
114122
}
115123
}, 100);
@@ -125,6 +133,8 @@ setInterval(function() {
125133
window.fullData = window.gd._fullData;
126134
}, 1000);
127135

136+
// Set plot config on first load
137+
Tabs.setPlotConfig();
128138

129139
// Mocks search and plotting
130140
var f = new Fuse(mocks, {

0 commit comments

Comments
 (0)