Initial bg/fg renderer decoration proof of concept

Part of #3770
This commit is contained in:
Daniel Imms
2022-05-09 12:44:51 -07:00
parent 85e0625078
commit 63eb9a4555
8 changed files with 115 additions and 15 deletions
+10 -2
View File
@@ -556,8 +556,16 @@ function loadTest() {
function addDecoration() {
term.options['overviewRulerWidth'] = 15;
const marker = term.addMarker(1);
const decoration = term.registerDecoration({ marker, overviewRulerOptions: { color: '#ef292980', position: 'left' } });
decoration.onRender((e) => e.style.backgroundColor = '#ef292980');
const decoration = term.registerDecoration({
marker,
backgroundColor: '#00FF00',
foregroundColor: '#000000',
overviewRulerOptions: { color: '#ef292980', position: 'left' }
});
decoration.onRender((e: HTMLElement) => {
e.style.right = '100%';
e.style.backgroundColor = '#ef292980';
});
}
function addOverviewRuler() {