Merge branch 'merogge/buffer-marker-decoration' of https://github.com/meganrogge/xterm.js into merogge/buffer-marker-decoration

This commit is contained in:
meganrogge
2022-02-08 21:31:00 -06:00
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -11,7 +11,7 @@ import { IDecorationOptions, IDecoration, IMarker } from 'xterm';
export class DecorationService extends Disposable implements IDecorationService {
private _decorations: Decoration[] = [];
private readonly _decorations: Decoration[] = [];
private _screenElement: HTMLElement | undefined;
constructor(
@@ -61,11 +61,10 @@ export class DecorationService extends Disposable implements IDecorationService
}
class Decoration extends Disposable implements IDecoration {
public readonly id: number = Decoration._nextId++;
private static _nextId: number = 1;
private _marker: IMarker;
private static _nextId = 1;
private readonly _marker: IMarker;
private _element: HTMLElement | undefined;
private readonly _id: number = Decoration._nextId++;
public isDisposed: boolean = false;
public get element(): HTMLElement | undefined { return this._element; }
+1 -1
View File
@@ -942,7 +942,7 @@ declare module 'xterm' {
* @param decorationOptions, which takes a marker and an optional anchor,
* width, height, and x offset from the anchor. Returns the decoration or
* undefined if the alt buffer is active or the marker has already been disposed of.
* @throws if the @param decorationOptions includes a negative x offset.
* @throws when options include a negative x offset.
*/
registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;