Skip to content

Commit d548ea1

Browse files
author
doeg
committed
Merge branch 'master' into doeg-password-form
2 parents fad47ab + b28de25 commit d548ea1

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

shelly/plotlyjs/static/plotlyjs/src/graph_interact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fx.init = function(gd) {
7878

7979
if(fullLayout._hasGL3D || fullLayout._hasGeo || gd._context.staticPlot) return;
8080

81-
var subplots = Object.keys(fullLayout._plots).sort(function(a,b) {
81+
var subplots = Object.keys(fullLayout._plots || {}).sort(function(a,b) {
8282
// sort overlays last, then by x axis number, then y axis number
8383
if( (fullLayout._plots[a].mainplot && true) ===
8484
(fullLayout._plots[b].mainplot && true) ) {

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,13 @@ plots.purge = function(gd) {
19231923
// note: we DO NOT remove _context because it doesn't change when we insert
19241924
// a new plot, and may have been set outside of our scope.
19251925

1926+
// clean up the gl and geo containers
1927+
// TODO unify subplot creation/update with d3.selection.order
1928+
// and/or subplot ids
1929+
var fullLayout = gd._fullLayout || {};
1930+
if(fullLayout._glcontainer !== undefined) fullLayout._glcontainer.remove();
1931+
if(fullLayout._geocontainer !== undefined) fullLayout._geocontainer.remove();
1932+
19261933
// data and layout
19271934
delete gd.data;
19281935
delete gd.layout;
@@ -1934,6 +1941,7 @@ plots.purge = function(gd) {
19341941

19351942
delete gd.fid;
19361943

1944+
19371945
delete gd.undoqueue; // action queue
19381946
delete gd.undonum;
19391947
delete gd.autoplay; // are we doing an action that doesn't go in undo queue?
@@ -3601,7 +3609,7 @@ plots.resize = function(gd) {
36013609

36023610
if(gd._redrawTimer) clearTimeout(gd._redrawTimer);
36033611

3604-
gd._redrawTimer = setTimeout(function(){
3612+
gd._redrawTimer = setTimeout(function() {
36053613
if((gd._fullLayout || {}).autosize) {
36063614
// autosizing doesn't count as a change that needs saving
36073615
var oldchanged = gd.changed;

test-dashboard/toolpanel-dashboard/ui.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function createPlot (divId) {
3131
graphDiv.style.verticalAlign = 'top';
3232

3333
toolDiv.className = 'toolDiv';
34+
toolDiv.style.width = '500px';
3435

3536
containerDiv.appendChild(toolDiv);
3637
containerDiv.appendChild(graphDiv);
@@ -54,14 +55,14 @@ function createPlot (divId) {
5455

5556
graphDiv.toolPanel = toolPanel = new ToolPanel(Plotly, graphDiv, {
5657
standalone: true,
57-
popoverContainer: containerDiv
58+
popoverContainer: containerDiv,
59+
menuStyle: 'descriptive'
5860
});
5961

6062
window.toolPanel = graphDiv.toolPanel;
6163

6264
graphDiv.toolPanel.makeMenu({
63-
toolMenuContainer: toolDiv,
64-
menuStyle: 'narrow'
65+
toolMenuContainer: toolDiv
6566
});
6667

6768
toolPanel.createMenuMultiButton([

0 commit comments

Comments
 (0)