Bypass the rendering pipeline for highlighting to reduce (eliminate) latency

Fixes #15
This commit is contained in:
Ian Gulliver
2019-07-14 02:26:00 +00:00
parent a4630ba92a
commit f3823812c7
18 changed files with 96 additions and 123 deletions

View File

@@ -29,13 +29,11 @@ class EditorGroup extends EditorEntryBase {
}
serialize() {
return {
return super.serialize({
type: 'group',
id: this.getId(),
label: this.getLabel(),
members: this.nodes_.serialize(EditorNode),
highlight: this.elem_.classList.contains('highlight'),
};
});
}
getNodes() {
@@ -57,10 +55,6 @@ class EditorGroup extends EditorEntryBase {
}
}
setHighlight(highlight) {
this.elem_.classList.toggle('highlight', highlight);
}
onKeyDown(e) {
super.onKeyDown(e);
@@ -72,14 +66,6 @@ class EditorGroup extends EditorEntryBase {
e.stopPropagation();
e.preventDefault();
break;
case ' ':
this.elem_.classList.toggle('highlight');
this.elem_.setAttribute('data-arch-refresh', '');
this.elem_.setAttribute('data-arch-snapshot', '');
e.stopPropagation();
e.preventDefault();
break;
}
}