Skip to content

Commit

Permalink
switch active unicode version in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudh1713 committed Sep 5, 2021
1 parent b5df612 commit 3eeec14
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions demo/client.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 3eeec14

Please sign in to comment.