File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -116,11 +116,11 @@ export default class PlotPane extends PaneItem {
116
116
}
117
117
}
118
118
119
- show ( view ) {
119
+ show ( view , { maxSize : maxSize } = { maxSize : MAX_SIZE } ) {
120
120
if ( view ) {
121
121
this . ids . push ( this . counter += 1 )
122
122
this . items . push ( view )
123
- this . prune ( )
123
+ this . prune ( maxSize )
124
124
this . activateItem ( this . items . length - 1 )
125
125
}
126
126
etch . update ( this , false )
@@ -139,11 +139,11 @@ export default class PlotPane extends PaneItem {
139
139
}
140
140
}
141
141
142
- prune ( ) {
142
+ prune ( maxSize ) {
143
143
const numItems = this . items . length
144
- if ( numItems <= MAX_SIZE ) return
144
+ if ( numItems <= maxSize ) return
145
145
146
- const startInd = numItems - MAX_SIZE
146
+ const startInd = numItems - maxSize
147
147
this . items . forEach ( ( item , ind ) => {
148
148
if ( ind < startInd && item . teardown ) {
149
149
item . teardown ( )
You can’t perform that action at this time.
0 commit comments