Bypass the rendering pipeline for highlighting to reduce (eliminate) latency
Fixes #15
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user