mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #3462 from anirudh1713/master
fix: switch active unicode version in demo
This commit is contained in:
@@ -377,6 +377,9 @@ function initAddons(term: TerminalType): void {
|
||||
if (!addon.canChange) {
|
||||
checkbox.disabled = true;
|
||||
}
|
||||
if(name === 'unicode11' && checkbox.checked) {
|
||||
term.unicode.activeVersion = '11';
|
||||
}
|
||||
addDomListener(checkbox, 'change', () => {
|
||||
if (checkbox.checked) {
|
||||
addon.instance = new addon.ctor();
|
||||
@@ -385,10 +388,14 @@ function initAddons(term: TerminalType): void {
|
||||
setTimeout(() => {
|
||||
document.body.appendChild((addon.instance as WebglAddon).textureAtlas);
|
||||
}, 0);
|
||||
} else if (name === 'unicode11') {
|
||||
term.unicode.activeVersion = '11';
|
||||
}
|
||||
} else {
|
||||
if (name === 'webgl') {
|
||||
document.body.removeChild((addon.instance as WebglAddon).textureAtlas);
|
||||
} else if (name === 'unicode11') {
|
||||
term.unicode.activeVersion = '6';
|
||||
}
|
||||
addon.instance!.dispose();
|
||||
addon.instance = undefined;
|
||||
|
||||
Reference in New Issue
Block a user