Bypass the rendering pipeline for highlighting to reduce (eliminate) latency
Fixes #15
This commit is contained in:
@@ -26,14 +26,12 @@ class EditorLink extends EditorEntryBase {
|
||||
}
|
||||
|
||||
serialize() {
|
||||
return {
|
||||
return super.serialize({
|
||||
type: 'link',
|
||||
id: this.getId(),
|
||||
label: this.getLabel(),
|
||||
from: this.getFrom().serialize(),
|
||||
to: this.getTo().serialize(),
|
||||
highlight: this.elem_.classList.contains('highlight'),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
getFrom() {
|
||||
@@ -59,10 +57,6 @@ class EditorLink extends EditorEntryBase {
|
||||
}
|
||||
}
|
||||
|
||||
setHighlight(highlight) {
|
||||
this.elem_.classList.toggle('highlight', highlight);
|
||||
}
|
||||
|
||||
flip() {
|
||||
let entries = this.nodes_.getEntries(EditorNode);
|
||||
let fromElem = entries[0].getElement();
|
||||
@@ -91,14 +85,6 @@ class EditorLink extends EditorEntryBase {
|
||||
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;
|
||||
|
||||
case 'f':
|
||||
this.flip();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user