get it working in demo with overviewRulerwidth not considered"

This commit is contained in:
meganrogge
2022-03-15 10:27:01 -04:00
parent bfb048110f
commit 079bbc8242
5 changed files with 88 additions and 113 deletions
+3 -1
View File
@@ -554,8 +554,10 @@ function addDecoration() {
function addOverviewRuler() {
const canvas = term.registerDecoration({marker: term.addMarker(1), overviewRulerItemColor: 'red'});
canvas.element!.style.left = `${document.querySelector('.xterm-viewport').clientWidth + 5}px`;
term.registerDecoration({marker: term.addMarker(3), overviewRulerItemColor: 'green'});
term.registerDecoration({marker: term.addMarker(5), overviewRulerItemColor: 'blue'});
canvas.onRender((e) => {
e.style.left = `${document.querySelector('.xterm-viewport').clientWidth + 5}px`;
});
}