Facet.idChainValues

This commit is contained in:
Tony Garnock-Jones 2023-05-28 12:24:28 +02:00
parent 2a2b7da4bc
commit 7b8526dfcf
1 changed files with 10 additions and 4 deletions

View File

@ -237,12 +237,18 @@ export class Facet {
});
}
idChain(): string {
let facetIds = [];
idChainValues(): AnyValue[] {
let pieces = [];
for (let f: Facet | null = this; f !== null; f = f.parent) {
facetIds.push(f.id);
pieces.push(f.id);
}
return facetIds.reverse().join(':') + ':' + stringify(this.actor.name);
pieces.push(this.actor.name);
pieces.reverse();
return pieces;
}
idChain(): string {
return this.idChainValues().map(v => stringify(v)).join(':');
}
toString(): string {