Merge pull request #3688 from meganrogge/onRender
don't fire onRender for overviewRuler decorations
This commit is contained in:
+1
-5
@@ -548,11 +548,7 @@ function addDecoration() {
|
|||||||
term.options['overviewRulerWidth'] = 15;
|
term.options['overviewRulerWidth'] = 15;
|
||||||
const marker = term.addMarker(1);
|
const marker = term.addMarker(1);
|
||||||
const decoration = term.registerDecoration({ marker, overviewRulerOptions: { color: '#ef2929'} });
|
const decoration = term.registerDecoration({ marker, overviewRulerOptions: { color: '#ef2929'} });
|
||||||
decoration.onRender((e) => {
|
decoration.onRender((e) => e.style.backgroundColor = '#ef2929');
|
||||||
if (e.classList.value === 'xterm-decoration') {
|
|
||||||
e.style.backgroundColor = '#ef2929';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addOverviewRuler() {
|
function addOverviewRuler() {
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ export class OverviewRulerRenderer extends Disposable {
|
|||||||
this._decorationElements.set(decoration, this._canvas);
|
this._decorationElements.set(decoration, this._canvas);
|
||||||
}
|
}
|
||||||
this._refreshStyle(decoration, updateAnchor);
|
this._refreshStyle(decoration, updateAnchor);
|
||||||
decoration.onRenderEmitter.fire(this._canvas);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private _queueRefresh(updateCanvasDimensions?: boolean, updateAnchor?: boolean): void {
|
private _queueRefresh(updateCanvasDimensions?: boolean, updateAnchor?: boolean): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user