dispose of decoration on dispose of marker

This commit is contained in:
meganrogge
2022-02-11 14:54:01 -06:00
parent 06357b1184
commit f160436df8
@@ -88,6 +88,7 @@ export class Decoration extends Disposable implements IDecoration {
super();
this.x = options.x ?? 0;
this._marker = options.marker;
this._marker.onDispose(() => this.dispose());
this.anchor = options.anchor || 'left';
this.width = options.width || 1;
this.height = options.height || 1;