| 556 | } |
| 557 | |
| 558 | replace_dummy_nodes(views: Mark[]) { |
| 559 | for (const view of views) { |
| 560 | const dummyNode = this.dummyNodes[view.cid]; |
| 561 | |
| 562 | // It could be that the dummy node is removed before we got a change to replace it |
| 563 | // This happens when the marks list is changed rapidly |
| 564 | if (dummyNode !== null && dummyNode.parentNode) { |
| 565 | dummyNode.parentNode.replaceChild(view.el, dummyNode); |
| 566 | this.dummyNodes[view.cid] = null; |
| 567 | this.displayed.then(() => { |
| 568 | view.trigger('displayed'); |
| 569 | }); |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | create_listeners() { |
| 575 | this.listenTo(this.model, 'change:title_style', this.title_style_updated); |