# HG changeset patch
# User drewp@bigasterisk.com
# Date 1647729903 25200
# Node ID 4822d5621463573b173d1eda06aa9c78e41b235e
# Parent f46b9dfa9b9c86f8ac97297bd5e3ff5f60c721fa
cleanup
diff -r f46b9dfa9b9c -r 4822d5621463 src/render/GraphView.ts
--- a/src/render/GraphView.ts Fri Mar 18 23:45:17 2022 -0700
+++ b/src/render/GraphView.ts Sat Mar 19 15:45:03 2022 -0700
@@ -83,7 +83,9 @@
}
_renderAlignedTable(section: AlignedTable): TemplateResult {
+ let anyType: NamedNode = new NamedNode('');
const heads = section.columnHeaders.map((ch) => {
+ anyType = ch.rdfType;
return html`
${this.nodeDisplay.render(ch.pred)} | `;
});
const cells = [];
@@ -100,17 +102,17 @@
cells.push(html`${headerCol}${bodyCols}
`);
}
return html`
- {JSON.stringify(section.rows,null,' ')}
+ [icon] Resources of type ${this.nodeDisplay.render(anyType)}
`;
}
@@ -161,51 +163,6 @@
return html` ${this.nodeDisplay.render(pred)} | `;
}
- // _thead(layout: MultiSubjsTypeBlockLayout): TemplateResult {
- // return html`
- //
- //
- // |
- // ${layout.preds.map(this._drawColumnHead.bind(this))}
- //
- //
- // `;
- // }
-
- // _msbCell(layout: MultiSubjsTypeBlockLayout, subj: NamedNode) {
- // return (pred: NamedNode): TemplateResult => {
- // const objs = layout.graphCells.get(layout.makeCellKey(subj, pred));
- // if (!objs || !objs.size) {
- // return html` | `;
- // }
- // const objsList = Array.from(objs);
- // objsList.sort();
- // return html` ${objsList.map(this._drawObj.bind(this))} | `;
- // };
- // }
-
- // _instanceRow(layout: MultiSubjsTypeBlockLayout) {
- // return (subj: NamedNode): TemplateResult => {
- // return html`
- //
- // ${this.nodeDisplay.render(subj)} |
- // ${layout.preds.map(this._msbCell(layout, subj))}
- //
- // `;
- // };
- // }
-
- // _multiSubjsTypeBlock(byType: TypeToSubjs, table: TableDesc) {
- // const layout = new MultiSubjsTypeBlockLayout(this.graph, byType, table);
-
- // let typeNames = [html`${this.nodeDisplay.render(table.primary)}`];
- // if (table.joins) {
- // typeNames.push(html` joined with [`);
- // for (let j of table.joins) {
- // typeNames.push(html`${this.nodeDisplay.render(j)}`);
- // }
- // typeNames.push(html`]`);
- // }
// return html`
// [icon] Resources of type ${typeNames}