Fixup, use string for INCINERATOR_ADDRESS
This commit is contained in:
parent
dd582c4d20
commit
f978c20104
|
@ -313,9 +313,6 @@ export class Forum extends ReputationHolder {
|
|||
this.actions.propagate.log(post, author, `(${authorIncrement})`);
|
||||
}
|
||||
|
||||
// Increment the value of the post
|
||||
await post.setValue(newValue);
|
||||
|
||||
console.log('propagateValue end', {
|
||||
depth,
|
||||
increment,
|
||||
|
@ -325,6 +322,9 @@ export class Forum extends ReputationHolder {
|
|||
refundToInbound,
|
||||
});
|
||||
|
||||
// Increment the value of the post
|
||||
await post.setValue(newValue);
|
||||
|
||||
return refundToInbound;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ export class Vertex {
|
|||
constructor(graph, type, id, data, options = {}) {
|
||||
this.graph = graph;
|
||||
this.type = type;
|
||||
this._id = id;
|
||||
this.id = id;
|
||||
this.data = data;
|
||||
this.options = options;
|
||||
this.edges = {
|
||||
|
@ -16,14 +16,6 @@ export class Vertex {
|
|||
this.installedClickCallback = false;
|
||||
}
|
||||
|
||||
set id(newId) {
|
||||
this._id = newId;
|
||||
}
|
||||
|
||||
get id() {
|
||||
return this._id;
|
||||
}
|
||||
|
||||
getEdges(type, away) {
|
||||
return this.edges[away ? 'from' : 'to'].filter(
|
||||
(edge) => edge.type === type,
|
||||
|
@ -66,18 +58,17 @@ export class Vertex {
|
|||
name: 'Save',
|
||||
cb: ({ form: { value } }, { initializing }) => {
|
||||
if (initializing) return;
|
||||
let fullRedraw = false;
|
||||
if (value.id && value.id !== vertex.id) {
|
||||
// TODO: When an ID changes we really need to wipe out and redraw!
|
||||
// But we don't yet have a systematic approach for doing that.
|
||||
// Everything is getting rendered as needed. Lacking abstraction.
|
||||
// HMM we're not actually that far! Just wipe everything out and draw each vertex and edge :)
|
||||
// for (const vertex of )
|
||||
// for (const edge of [...vertex.edges.to, ...vertex.edges.from]) {
|
||||
// edge.displayEdge();
|
||||
// }
|
||||
fullRedraw = true;
|
||||
}
|
||||
Object.assign(vertex, value);
|
||||
vertex.displayVertex();
|
||||
if (fullRedraw) {
|
||||
graph.redraw();
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ export class WeightedDirectedGraph {
|
|||
}
|
||||
}
|
||||
|
||||
// Rerender
|
||||
// Ensure rerender
|
||||
this.flowchart?.render();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export const EPSILON = 2.23e-16;
|
||||
|
||||
export const INCINERATOR_ADDRESS = 0;
|
||||
export const INCINERATOR_ADDRESS = '0';
|
||||
|
||||
export const EdgeTypes = {
|
||||
CITATION: 'citation',
|
||||
|
|
Loading…
Reference in New Issue