Compare commits
	
		
			2 Commits
		
	
	
		
			9dae4a2a90
			...
			490019a27b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 490019a27b | |||
| ecf69c91bb | 
							
								
								
									
										15
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								index.html
									
									
									
									
									
								
							@ -179,7 +179,9 @@ var Pivot =
 | 
			
		||||
    {        
 | 
			
		||||
        for(let i=0; i<inColumnNames.length; i++)
 | 
			
		||||
        {
 | 
			
		||||
            N.Connect(Pivot.Schema, N.Create({Label:inColumnNames[i], Index:i}), inColumnTypes[i]);
 | 
			
		||||
            let columnNode = N.Create({Label:inColumnNames[i], Index:i});
 | 
			
		||||
            N.Connect(Pivot.Schema, columnNode, inColumnTypes[i]);
 | 
			
		||||
            N.Connect(Pivot.Schema, columnNode, "all");
 | 
			
		||||
        }
 | 
			
		||||
        Pivot.Leaves = inRows.map(r => N.Create({Row:r}));
 | 
			
		||||
        Pivot.Init = ()=>{};
 | 
			
		||||
@ -387,20 +389,21 @@ let ElForm = props =>
 | 
			
		||||
 | 
			
		||||
    let used = N.Step(Pivot.Proto, "used")||[];
 | 
			
		||||
    let unused = N.Step(Pivot.Schema, "label").filter( columnLabel => !N.Step(columnLabel, "used", false) );
 | 
			
		||||
    let indicies = used.map(node=>node.Meta.Index);
 | 
			
		||||
 | 
			
		||||
    let indiciesPivot = used.map(node=>node.Meta.Index);
 | 
			
		||||
    let indiciesSum = (N.Step(Pivot.Schema, "sum")||[]).map(n=>n.Meta.Index);
 | 
			
		||||
    
 | 
			
		||||
    var action;
 | 
			
		||||
    if(indicies.length)
 | 
			
		||||
    if(indiciesPivot.length)
 | 
			
		||||
    {
 | 
			
		||||
        action = h("div", null, [
 | 
			
		||||
            h("span", null, "Build"),
 | 
			
		||||
            h("button", {onClick:e=>
 | 
			
		||||
            {
 | 
			
		||||
                N.Disconnect(Pivot.Proto, null, "used");
 | 
			
		||||
                Pivot.Create(indicies, [3, 4]);
 | 
			
		||||
                Pivot.Create(indiciesPivot, indiciesSum);
 | 
			
		||||
                Render();
 | 
			
		||||
            }
 | 
			
		||||
            }, indicies)
 | 
			
		||||
            }, "Create Pivot")
 | 
			
		||||
        ]);
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user