Skip to content

Commit 1a79671

Browse files
Merge pull request #3934 from plotly/handle-workspace-logic-outside-toolpanel
Handle workspace logic outside toolpanel
2 parents 68afb7e + 0c87469 commit 1a79671

File tree

2 files changed

+1
-22
lines changed
  • shelly/plotlyjs/static/plotlyjs/src
  • test-dashboard/toolpanel-dashboard

2 files changed

+1
-22
lines changed

shelly/plotlyjs/static/plotlyjs/src/graph_obj.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,6 @@ plots.getSubplotData = function getSubplotData(data, type, subplotId) {
193193
return subplotData;
194194
};
195195

196-
// new workspace tab. Perhaps this goes elsewhere, a workspace-only file???
197-
plots.newTab = function(divid, layout) {
198-
var gd = document.getElementById(divid);
199-
var toolPanel = new Plotly.ToolPanel(Plotly, gd, {
200-
standalone: false,
201-
popoverContainer: 'body'
202-
});
203-
204-
toolPanel.makeMenu();
205-
206-
var config = {
207-
workspace: true,
208-
editable: true,
209-
autosizable: true,
210-
scrollZoom: true,
211-
showLink: false,
212-
setBackground: 'opaque'
213-
};
214-
return Plotly.plot(divid, [], layout, config);
215-
};
216-
217196
// in some cases the browser doesn't seem to know how big
218197
// the text is at first, so it needs to draw it,
219198
// then wait a little, then draw it again

test-dashboard/toolpanel-dashboard/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function createPlot (divId) {
3535
popoverContainer: containerDiv
3636
});
3737

38-
graphDiv.toolPanel.makeMenu(graphDiv);
38+
graphDiv.toolPanel.makeMenu();
3939

4040
divs.push(graphDiv);
4141

0 commit comments

Comments
 (0)