Fixup missing flowcharts
This commit is contained in:
parent
fc27cda81d
commit
92cfdaaa63
|
@ -15,11 +15,10 @@ const BALANCE = 'balance';
|
|||
*/
|
||||
export class Forum extends ReputationHolder {
|
||||
constructor(dao, name, scene) {
|
||||
|
||||
super(name, scene);
|
||||
this.dao = dao;
|
||||
this.id = this.reputationPublicKey;
|
||||
this.posts = new WDAG();
|
||||
this.posts = new WDAG(scene);
|
||||
this.actions = {
|
||||
propagate: new Action('propagate', scene),
|
||||
confirm: new Action('confirm', scene),
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import { MermaidDiagram } from './mermaid.js';
|
||||
|
||||
export class Flowchart extends MermaidDiagram {
|
||||
constructor(box, logBox, direction = 'BT') {
|
||||
super(box, logBox);
|
||||
|
||||
this.log(`graph ${direction}`, false);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ import { CryptoUtil } from '../util/crypto.js';
|
|||
import { MermaidDiagram } from './mermaid.js';
|
||||
import { SequenceDiagram } from './sequence.js';
|
||||
import { Table } from './table.js';
|
||||
import { Flowchart } from './flowchart.js';
|
||||
|
||||
export class Scene {
|
||||
constructor(name, rootBox) {
|
||||
|
@ -30,7 +31,6 @@ export class Scene {
|
|||
this.box.addBox('Spacer').setInnerHTML(' ');
|
||||
const logBox = this.box.addBox('Sequence diagram text').addClass('dim');
|
||||
this.sequence = new SequenceDiagram(box, logBox);
|
||||
this.sequence.log('sequenceDiagram', false);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,7 @@ export class Scene {
|
|||
const box = this.topSection.addBox('Flowchart').addClass('padded');
|
||||
this.box.addBox('Spacer').setInnerHTML(' ');
|
||||
const logBox = this.box.addBox('Flowchart text').addClass('dim');
|
||||
this.flowchart = new MermaidDiagram(box, logBox);
|
||||
this.flowchart.log(`graph ${direction}`, false);
|
||||
this.flowchart = new Flowchart(box, logBox, direction);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ export class SequenceDiagram extends MermaidDiagram {
|
|||
super(...args);
|
||||
this.activations = [];
|
||||
this.sections = [];
|
||||
|
||||
this.log('sequenceDiagram', false);
|
||||
}
|
||||
|
||||
async log(...args) {
|
||||
|
|
Loading…
Reference in New Issue