@vidal-community/vidal-web-components
Version:
Vidal Web Components
14 lines • 569 B
JavaScript
export class DecisionTreeWithCaptions {
constructor(decisionTree, captions) {
this.decisionTree = decisionTree;
this.captions = captions;
}
static fromElement(decisionTreeElement) {
const comments = [...decisionTreeElement.querySelectorAll('.comment')];
const lastComment = comments.length > 0
? comments[comments.length - 1]
: document.createElement('div');
return new DecisionTreeWithCaptions(decisionTreeElement, lastComment);
}
}
//# sourceMappingURL=decision-tree-with-captions.js.map