Merge pull request #1819 from Tyriar/fix_demo_line_height
Allow decimal line heights in demo
This commit is contained in:
+2
-2
@@ -235,7 +235,7 @@ function initOptions(term: TerminalType): void {
|
|||||||
});
|
});
|
||||||
html += '</div><div class="option-group">';
|
html += '</div><div class="option-group">';
|
||||||
numberOptions.forEach(o => {
|
numberOptions.forEach(o => {
|
||||||
html += `<div class="option"><label>${o} <input id="opt-${o}" type="number" value="${term.getOption(o)}"/></label></div>`;
|
html += `<div class="option"><label>${o} <input id="opt-${o}" type="number" value="${term.getOption(o)}" step="${o === 'lineHeight' ? '0.1' : '1'}"/></label></div>`;
|
||||||
});
|
});
|
||||||
html += '</div><div class="option-group">';
|
html += '</div><div class="option-group">';
|
||||||
Object.keys(stringOptions).forEach(o => {
|
Object.keys(stringOptions).forEach(o => {
|
||||||
@@ -265,7 +265,7 @@ function initOptions(term: TerminalType): void {
|
|||||||
if (o === 'cols' || o === 'rows') {
|
if (o === 'cols' || o === 'rows') {
|
||||||
updateTerminalSize();
|
updateTerminalSize();
|
||||||
} else {
|
} else {
|
||||||
term.setOption(o, parseInt(input.value, 10));
|
term.setOption(o, o === 'lineHeight' ? parseFloat(input.value) : parseInt(input.value, 10));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user