File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
shelly/plotlyjs/static/plotlyjs/src
test-dashboard/toolpanel-dashboard Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ fx.init = function(gd) {
78
78
79
79
if ( fullLayout . _hasGL3D || fullLayout . _hasGeo || gd . _context . staticPlot ) return ;
80
80
81
- var subplots = Object . keys ( fullLayout . _plots ) . sort ( function ( a , b ) {
81
+ var subplots = Object . keys ( fullLayout . _plots || { } ) . sort ( function ( a , b ) {
82
82
// sort overlays last, then by x axis number, then y axis number
83
83
if ( ( fullLayout . _plots [ a ] . mainplot && true ) ===
84
84
( fullLayout . _plots [ b ] . mainplot && true ) ) {
Original file line number Diff line number Diff line change @@ -1923,6 +1923,13 @@ plots.purge = function(gd) {
1923
1923
// note: we DO NOT remove _context because it doesn't change when we insert
1924
1924
// a new plot, and may have been set outside of our scope.
1925
1925
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
+
1926
1933
// data and layout
1927
1934
delete gd . data ;
1928
1935
delete gd . layout ;
@@ -1934,6 +1941,7 @@ plots.purge = function(gd) {
1934
1941
1935
1942
delete gd . fid ;
1936
1943
1944
+
1937
1945
delete gd . undoqueue ; // action queue
1938
1946
delete gd . undonum ;
1939
1947
delete gd . autoplay ; // are we doing an action that doesn't go in undo queue?
@@ -3601,7 +3609,7 @@ plots.resize = function(gd) {
3601
3609
3602
3610
if ( gd . _redrawTimer ) clearTimeout ( gd . _redrawTimer ) ;
3603
3611
3604
- gd . _redrawTimer = setTimeout ( function ( ) {
3612
+ gd . _redrawTimer = setTimeout ( function ( ) {
3605
3613
if ( ( gd . _fullLayout || { } ) . autosize ) {
3606
3614
// autosizing doesn't count as a change that needs saving
3607
3615
var oldchanged = gd . changed ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ function createPlot (divId) {
31
31
graphDiv . style . verticalAlign = 'top' ;
32
32
33
33
toolDiv . className = 'toolDiv' ;
34
+ toolDiv . style . width = '500px' ;
34
35
35
36
containerDiv . appendChild ( toolDiv ) ;
36
37
containerDiv . appendChild ( graphDiv ) ;
@@ -54,14 +55,14 @@ function createPlot (divId) {
54
55
55
56
graphDiv . toolPanel = toolPanel = new ToolPanel ( Plotly , graphDiv , {
56
57
standalone : true ,
57
- popoverContainer : containerDiv
58
+ popoverContainer : containerDiv ,
59
+ menuStyle : 'descriptive'
58
60
} ) ;
59
61
60
62
window . toolPanel = graphDiv . toolPanel ;
61
63
62
64
graphDiv . toolPanel . makeMenu ( {
63
- toolMenuContainer : toolDiv ,
64
- menuStyle : 'narrow'
65
+ toolMenuContainer : toolDiv
65
66
} ) ;
66
67
67
68
toolPanel . createMenuMultiButton ( [
You can’t perform that action at this time.
0 commit comments