Merge branch 'merogge/buffer-marker-decoration' of https://github.com/meganrogge/xterm.js into merogge/buffer-marker-decoration
This commit is contained in:
@@ -11,7 +11,7 @@ import { IDecorationOptions, IDecoration, IMarker } from 'xterm';
|
|||||||
|
|
||||||
export class DecorationService extends Disposable implements IDecorationService {
|
export class DecorationService extends Disposable implements IDecorationService {
|
||||||
|
|
||||||
private _decorations: Decoration[] = [];
|
private readonly _decorations: Decoration[] = [];
|
||||||
private _screenElement: HTMLElement | undefined;
|
private _screenElement: HTMLElement | undefined;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -61,11 +61,10 @@ export class DecorationService extends Disposable implements IDecorationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Decoration extends Disposable implements IDecoration {
|
class Decoration extends Disposable implements IDecoration {
|
||||||
public readonly id: number = Decoration._nextId++;
|
private static _nextId = 1;
|
||||||
private static _nextId: number = 1;
|
private readonly _marker: IMarker;
|
||||||
|
|
||||||
private _marker: IMarker;
|
|
||||||
private _element: HTMLElement | undefined;
|
private _element: HTMLElement | undefined;
|
||||||
|
private readonly _id: number = Decoration._nextId++;
|
||||||
public isDisposed: boolean = false;
|
public isDisposed: boolean = false;
|
||||||
|
|
||||||
public get element(): HTMLElement | undefined { return this._element; }
|
public get element(): HTMLElement | undefined { return this._element; }
|
||||||
|
|||||||
Vendored
+1
-1
@@ -942,7 +942,7 @@ declare module 'xterm' {
|
|||||||
* @param decorationOptions, which takes a marker and an optional anchor,
|
* @param decorationOptions, which takes a marker and an optional anchor,
|
||||||
* width, height, and x offset from the anchor. Returns the decoration or
|
* 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.
|
* 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;
|
registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user