Compare commits

..

No commits in common. "9dae4a2a9063c24d8380b31339170962c9f8f86c" and "35bfe29066ed16a63318ac1b1a970b87c6b573b1" have entirely different histories.

2 changed files with 7 additions and 40 deletions

View File

@ -27,7 +27,7 @@ var N =
let check = N.Step(inNodeMajor, inKey, true);
if(check)
{
if(check.indexOf(inNodeMinor) !== -1)
if(check.indexOf(inNodeMinor) < 0)
{
return;
}
@ -251,12 +251,12 @@ var Pivot =
{
// apply them to the branch
inLastBranch.ID.Walk = N.ID.Walk;
modifiers.forEach( inModifier => N.Connect(inModifier, inLastBranch, "ModifyOut") )
modifiers.forEach( inModifier => N.Connect(inModifier, inLastBranch, "ModifyUp") )
// also walk them up and connect, but with "check unique" enabled
N.Walk( inNode=>
{
modifiers.forEach( inModifier => N.Connect(inModifier, inNode, "ModifyOut", true) )
modifiers.forEach( inModifier => N.Connect(inModifier, inNode, "ModifyUp", true) )
}
, inLastBranch, "Hierarchy", false);
}
@ -278,13 +278,7 @@ var Pivot =
{
N.ID.Walk++;
let names = N.Step(Pivot.Schema, "label");
let label = inPivotIndicies.map( inPivotIndex =>
{
return names[inPivotIndex].Meta.Label;
});
let pivotRoot = N.Create({Label:label.join("|"), Leaves:Pivot.Leaves});
let pivotRoot = N.Create({Label:"Pivot Root", Leaves:Pivot.Leaves});
N.Connect(Pivot.Root, pivotRoot, "Pivot");
return Pivot.Pivot(pivotRoot, pivotRoot, inPivotIndicies, inSumIndicies);
},
@ -311,8 +305,6 @@ var Pivot =
Modify(inNode)
{
let modified = N.Create({Label:"Modifier"});
// add the modifier to the appropriate root
N.ID.Walk++;
if(N.Step(inNode, "Hierarchy").length)
{
@ -326,7 +318,6 @@ var Pivot =
N.Connect(Pivot.Root, modified, "Modifier");
}
// traverse
let leaves = [];
let gatherUp = n => N.Connect(modified, n, "ModifyUp");
let gatherDown = n =>
@ -334,11 +325,7 @@ var Pivot =
N.Connect(modified, n, "ModifyDown");
N.Step(n, "Hierarchy").length == 0 ? leaves.push(n) : null;
};
let gatherOut = n => {
N.Connect(modified, n, "ModifyOut");
};
let gatherOut = n => N.Connect(modified, n, "ModifyOut");
N.ID.Walk++;
inNode.ID.Walk = N.ID.Walk;
@ -438,6 +425,7 @@ let ElForm = props =>
action
])
};
let ElNode = ({node, depth}) =>
{
let nodeBase = css`
@ -521,8 +509,7 @@ let ElNode = ({node, depth}) =>
};
let ElPivot = ({pivot}) =>
{
return h("div", {className:css`display:inline-block;`}, [
h("h3", null, pivot.Meta.Label),
return h("div", {style:{display:"inline-block", width:"800px"}}, [
h("button", {onClick:e=>{Pivot.Delete(pivot);Render();}}, "delete?"),
h(ElModifiers, {node:pivot}),
h(ElNode, {node:pivot, depth:0})

View File

@ -1,20 +0,0 @@
[
{
"name":"",
"csv":["data/output/1.csv", "data/output/2.csv"],
"pivots":
[
{
"pivot":[0, 1],
"sum":[3],
"modifications":
[
{
"path":[0, 0],
"modification":[0.2]
}
]
}
]
}
]