@@ -122,15 +122,17 @@ export abstract class CellOverlayPart extends Disposable {
122
122
updateForExecutionState ( element : ICellViewModel , e : ICellExecutionStateChangedEvent ) : void { }
123
123
}
124
124
125
- export class CellPartsCollection implements IDisposable {
126
- private _scheduledOverlayRendering = new MutableDisposable ( ) ;
127
- private _scheduledOverlayUpdateState = new MutableDisposable ( ) ;
128
- private _scheduledOverlayUpdateExecutionState = new MutableDisposable ( ) ;
125
+ export class CellPartsCollection extends Disposable {
126
+ private _scheduledOverlayRendering = this . _register ( new MutableDisposable ( ) ) ;
127
+ private _scheduledOverlayUpdateState = this . _register ( new MutableDisposable ( ) ) ;
128
+ private _scheduledOverlayUpdateExecutionState = this . _register ( new MutableDisposable ( ) ) ;
129
129
130
130
constructor (
131
131
private readonly contentParts : readonly CellContentPart [ ] ,
132
132
private readonly overlayParts : readonly CellOverlayPart [ ]
133
- ) { }
133
+ ) {
134
+ super ( ) ;
135
+ }
134
136
135
137
concatContentPart ( other : readonly CellContentPart [ ] ) : CellPartsCollection {
136
138
return new CellPartsCollection ( this . contentParts . concat ( other ) , this . overlayParts ) ;
@@ -167,9 +169,9 @@ export class CellPartsCollection implements IDisposable {
167
169
part . unrenderCell ( element ) ;
168
170
}
169
171
170
- this . _scheduledOverlayRendering ?. dispose ( ) ;
171
- this . _scheduledOverlayUpdateState ?. dispose ( ) ;
172
- this . _scheduledOverlayUpdateExecutionState ?. dispose ( ) ;
172
+ this . _scheduledOverlayRendering . value = undefined ;
173
+ this . _scheduledOverlayUpdateState . value = undefined ;
174
+ this . _scheduledOverlayUpdateExecutionState . value = undefined ;
173
175
174
176
for ( const part of this . overlayParts ) {
175
177
part . unrenderCell ( element ) ;
@@ -211,10 +213,4 @@ export class CellPartsCollection implements IDisposable {
211
213
}
212
214
} ) ;
213
215
}
214
-
215
- dispose ( ) {
216
- this . _scheduledOverlayRendering ?. dispose ( ) ;
217
- this . _scheduledOverlayUpdateState ?. dispose ( ) ;
218
- this . _scheduledOverlayUpdateExecutionState ?. dispose ( ) ;
219
- }
220
216
}
0 commit comments