fix: fixed the program reduce algorithm to be flexable and correctly use the different phase variables.
ref: N25B-294
This commit is contained in:
@@ -18,6 +18,7 @@ import { NodeDefaults, NodeConnects, NodeDeletes } from './NodeRegistry';
|
||||
* @param id the id of the node to create
|
||||
* @param position the position of the node to create
|
||||
* @param data the data in the node to create
|
||||
* @param deletable if this node should be able to be deleted IN ANY WAY POSSIBLE
|
||||
* @constructor
|
||||
*/
|
||||
function createNode(id: string, type: string, position: XYPosition, data: Record<string, unknown>, deletable? : boolean) {
|
||||
@@ -35,8 +36,8 @@ function createNode(id: string, type: string, position: XYPosition, data: Record
|
||||
//* Initial nodes, created by using createNode. */
|
||||
const initialNodes : Node[] = [
|
||||
createNode('start', 'start', {x: 100, y: 100}, {label: "Start"}, false),
|
||||
createNode('end', 'end', {x: 370, y: 100}, {label: "End"}, false),
|
||||
createNode('phase-1', 'phase', {x:200, y:100}, {label: "Phase 1", children: ['end', 'start']}),
|
||||
createNode('end', 'end', {x: 500, y: 100}, {label: "End"}, false),
|
||||
createNode('phase-1', 'phase', {x:200, y:100}, {label: "Phase 1", children : []}),
|
||||
createNode('norms-1', 'norm', {x:-200, y:100}, {label: "Initial Norms", normList: ["Be a robot", "get good"]}),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user