Changeset 1683 for XIOS/dev/dev_trunk_omp/inputs
- Timestamp:
- 07/23/19 11:54:42 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/inputs/vis.html
r1682 r1683 113 113 114 114 //=========================================================== 115 $('#clusteringcid2').on('click', function() 116 { 117 network.setData(data); 118 var clusterOptionsByData = 119 { 120 joinCondition:function(childOptions) 121 { 122 return childOptions.cid === 2; 123 }, 124 clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'} 125 }; 126 network.clustering.cluster(clusterOptionsByData); 127 var allNode = nodes.get(); 128 nodes.update(allNode); 129 }); 130 131 132 133 //=========================================================== 115 134 $('#lastTemporal').on('click', function() 116 135 { 117 136 var node = nodes.get(nodeSelected); 118 137 119 if(node.class == '5') //temporal filter138 if(node.class == 5) //temporal filter 120 139 { 121 140 var inputnodes = network.getConnectedNodes(node.id, 'from'); … … 142 161 edges.update(edges_ofinputnode); 143 162 144 allNode = nodes.get();163 var allNode = nodes.get(); 145 164 nodes.update(allNode); 146 165 … … 211 230 var node = allNode[i]; 212 231 213 if(node.class == '1')232 if(node.class == 1) 214 233 { 215 234 node.hidden = false; … … 230 249 var node = allNode[i]; 231 250 232 if(node.class >= '6'|| node.filled==1)251 if(node.class >= 6 || node.filled==1) 233 252 { 234 253 node.hidden = false; … … 724 743 } 725 744 745 726 746 var reader = new FileReader(); 727 747 var json; … … 749 769 var nboutVal = node.nbout; 750 770 751 // if (node.class == '6' || node.filled == 1 ) 752 if (true) 753 { 754 node.color = { 771 node.color = { 772 background: styleArr[classVal].background, 773 border: styleArr[classVal].border, 774 hover: styleArr[classVal].background, 775 highlight: { 755 776 background: styleArr[classVal].background, 756 border: styleArr[classVal].border, 757 hover: styleArr[classVal].background, 758 highlight: { 759 background: styleArr[classVal].background, 760 border: 'blue' 761 } 777 border: 'blue' 762 778 } 763 779 } 764 else 765 { 766 node.color = { 767 background: 'white', 768 border: 'LightGray', 769 hover: 'LightGray', 770 highlight: { 771 background: 'LightGray', 772 border: 'blue' 773 } 774 } 775 node.font = { 776 color:'white' 777 } 778 } 780 779 781 node.shape = styleArr[classVal].shape; 780 782 781 if (node.class == '1' || node.class >= '6')783 if (node.class == 1 || node.class >= 6) 782 784 node.title = "node id = "+node.id+"</br>"+labelVal +"</br>field attributes : </br>" + attrVal + "</br>filter entry nb = " + entryVal + "</br>cid = " + cidVal + "</br>distance = " + distVal ; 783 else if (node.class == '5')785 else if (node.class == 5) 784 786 node.title = "node id = "+node.id+"</br>"+labelVal +"</br>filter type = " + typeVal + "</br> entry nb = " + entryVal + "</br> inputs_complete = " + inputsVal + "</br>cid = " + cidVal + "</br>distance = " + distVal ; 785 787 else … … 802 804 node.level = distVal; 803 805 804 if (node.class == '6'|| node.filled == 1) node.hidden = true;806 if (node.class >= 6 || node.filled == 1) node.hidden = true; 805 807 else node.hidden = true; 806 808 … … 868 870 } 869 871 }, 872 873 joinCondition:function(nodeOptions) { 874 return nodeOptions.cid === 2; 875 876 } 877 870 878 871 879 }; … … 873 881 //================================================== 874 882 network = new vis.Network(container, data, options); 883 884 875 885 876 886 //================================================== … … 1000 1010 <button type="button" class="btn btn-default" id="disableAllChild">Disable all children</button> 1001 1011 <button type="button" class="btn btn-default" id="lastTemporal">Enable last temporal input</button> 1012 1013 1014 <button type="button" class="btn btn-default" id="clusteringcid2">Clustering cid=2</button> 1002 1015 </div> 1003 1016
Note: See TracChangeset
for help on using the changeset viewer.