Populate EditorLink based on highlighted items

This commit is contained in:
Ian Gulliver
2019-07-11 04:40:43 +00:00
parent f7822b24b5
commit 7390acb978
3 changed files with 20 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
class EditorLink extends EditorEntryBase {
constructor() {
constructor(entries) {
super();
this.elem_.innerText = '↓';
@@ -10,8 +10,10 @@ class EditorLink extends EditorEntryBase {
[EditorNode, [2, 2]],
[EditorLabel, [0, 1]],
]);
this.nodes_.addNodeAfter();
this.nodes_.addNodeAfter();
this.nodes_.addNodeAfter(
entries && entries[0] ? entries[0].getLabel() : null);
this.nodes_.addNodeAfter(
entries && entries[1] ? entries[1].getLabel() : null);
this.elem_.appendChild(nodeList);
}