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

@@ -1,10 +1,9 @@
class LayoutLink {
constructor(from, to, id, label, highlight, nodesByPos, linksByPos, labelsByPos) {
constructor(from, to, id, label, nodesByPos, linksByPos, labelsByPos) {
this.from_ = from;
this.to_ = to;
this.id_ = id;
this.label_ = label;
this.highlight_ = highlight;
this.nodesByPos_ = nodesByPos;
this.linksByPos_ = linksByPos;
this.labelsByPos_ = labelsByPos;
@@ -229,7 +228,6 @@ class LayoutLink {
id: this.id_,
pos: Array.from(this.path[0]),
cls: 's' + this.getOutPoint(this.path[0], this.path[1]),
highlight: this.highlight_,
});
for (let i = 1; i < this.path.length - 1; ++i) {
@@ -240,7 +238,6 @@ class LayoutLink {
id: this.id_,
pos: Array.from(this.path[i]),
cls: `i${inPoint}o${outPoint}`,
highlight: this.highlight_,
});
}
@@ -252,7 +249,6 @@ class LayoutLink {
id: this.id_,
pos: Array.from(this.path[this.path.length - 1]),
cls: 's' + endInPoint,
highlight: this.highlight_,
});
steps.push({
@@ -260,7 +256,6 @@ class LayoutLink {
id: this.id_,
pos: Array.from(this.path[this.path.length - 1]),
cls: 'a' + endInPoint,
highlight: this.highlight_,
});
if (this.labelPos_) {