Loading client/js/controllers/vis-general.js +14 −5 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ angular }; $scope.selectPerson = function(index) { if( $scope.selectedpersons.indexOf(this.item) == - 1 ){ $scope.selectedpersons.push(this.item); if( $scope.selectedpersons.indexOf(this.item.id) == - 1 ){ $scope.selectedpersons.push(this.item.id); } }; Loading Loading @@ -58,14 +58,19 @@ angular $http.get("data/graph_v" + filenumber + ".json") .then(function(response) { $scope.data = response.data; const allDataLinks = response.data.links; angular.forEach(response.data.nodes, function(value){ if( value['nodetype'] == "issuer" ){ $scope.allpersons.push(value.id); var numLinks = allDataLinks.reduce(function (n, obj) { return n + (obj.source == value.id); }, 0); value['numLinks'] = numLinks; $scope.allpersons.push(value); } }); $scope.resultsIssuers = $scope.allpersons; var index = 0; angular.forEach(response.data.links, function(value){ angular.forEach(allDataLinks, function(value){ allLinks[index] = response.data.links[index]; index++; }); Loading Loading @@ -388,11 +393,11 @@ angular nodeArr.push(nodeObject); } }); } $scope.allnobilitytitles = $scope.allnobilitytitles.filter(function(item, pos, self) { return self.indexOf(item) == pos; }); } //console.log(edgeArr); Loading Loading @@ -709,6 +714,10 @@ angular if( $scope.vissettings.fileIsRead ){ setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500); network.fit(); if( nodes.get().length > 150 || edges.get().length > 300 ){ network.setOptions({physics:{enabled: false}}); $scope.vissettings.physicsEnabled = false; } } }); Loading index.html +4 −4 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ <table class="table table-bordered" at-table at-list="resultsIssuers"> <tbody class="text-left"> <tr ng-click="selectPerson($index);" ng-mouseover="hoverActive=true" ng-mouseleave="hoverActive=false" ng-style="hoverActive ? {'background-color':'#c7c9c9'} : {}"> <td>{{item}}</td> <td>{{item.id}} (# of edges: {{item.numLinks}})</td> </tr> </tbody> </table> Loading Loading @@ -270,7 +270,7 @@ Remove </button> <button ng-if="item.isSuccess" type="button" class="btn btn-danger btn-xs" ng-click="item.remove(); delete($index, item.file.name)" ng-click="item.remove(); delete($index, item.file.name); setToUnselected()" title="Delete the file"> <span class="glyphicon glyphicon-trash"></span> Delete Loading Loading @@ -321,7 +321,7 @@ </div> <br> <div> <a class="btn btn-lg entry-button" ng-click="startVisualization()" ng-disabled="selectedpersons.length == 0"><span>Visualize</span></a> <a class="btn btn-lg entry-button" ng-click="startVisualization()" ng-disabled="selectedpersons.length == 0 && !vissettings.fileIsRead"><span>Visualize</span></a> </div> </div> </div> Loading Loading @@ -503,7 +503,7 @@ </div> <footer class="footer-style"> <span> <p style="color:#fff">Copyright ©2018 Leo Born, Juri Opitz</p> <p style="color:#fff">Copyright ©2018-2019 Leo Born, Juri Opitz</p> </span> </footer> </div> Loading Loading
client/js/controllers/vis-general.js +14 −5 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ angular }; $scope.selectPerson = function(index) { if( $scope.selectedpersons.indexOf(this.item) == - 1 ){ $scope.selectedpersons.push(this.item); if( $scope.selectedpersons.indexOf(this.item.id) == - 1 ){ $scope.selectedpersons.push(this.item.id); } }; Loading Loading @@ -58,14 +58,19 @@ angular $http.get("data/graph_v" + filenumber + ".json") .then(function(response) { $scope.data = response.data; const allDataLinks = response.data.links; angular.forEach(response.data.nodes, function(value){ if( value['nodetype'] == "issuer" ){ $scope.allpersons.push(value.id); var numLinks = allDataLinks.reduce(function (n, obj) { return n + (obj.source == value.id); }, 0); value['numLinks'] = numLinks; $scope.allpersons.push(value); } }); $scope.resultsIssuers = $scope.allpersons; var index = 0; angular.forEach(response.data.links, function(value){ angular.forEach(allDataLinks, function(value){ allLinks[index] = response.data.links[index]; index++; }); Loading Loading @@ -388,11 +393,11 @@ angular nodeArr.push(nodeObject); } }); } $scope.allnobilitytitles = $scope.allnobilitytitles.filter(function(item, pos, self) { return self.indexOf(item) == pos; }); } //console.log(edgeArr); Loading Loading @@ -709,6 +714,10 @@ angular if( $scope.vissettings.fileIsRead ){ setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500); network.fit(); if( nodes.get().length > 150 || edges.get().length > 300 ){ network.setOptions({physics:{enabled: false}}); $scope.vissettings.physicsEnabled = false; } } }); Loading
index.html +4 −4 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ <table class="table table-bordered" at-table at-list="resultsIssuers"> <tbody class="text-left"> <tr ng-click="selectPerson($index);" ng-mouseover="hoverActive=true" ng-mouseleave="hoverActive=false" ng-style="hoverActive ? {'background-color':'#c7c9c9'} : {}"> <td>{{item}}</td> <td>{{item.id}} (# of edges: {{item.numLinks}})</td> </tr> </tbody> </table> Loading Loading @@ -270,7 +270,7 @@ Remove </button> <button ng-if="item.isSuccess" type="button" class="btn btn-danger btn-xs" ng-click="item.remove(); delete($index, item.file.name)" ng-click="item.remove(); delete($index, item.file.name); setToUnselected()" title="Delete the file"> <span class="glyphicon glyphicon-trash"></span> Delete Loading Loading @@ -321,7 +321,7 @@ </div> <br> <div> <a class="btn btn-lg entry-button" ng-click="startVisualization()" ng-disabled="selectedpersons.length == 0"><span>Visualize</span></a> <a class="btn btn-lg entry-button" ng-click="startVisualization()" ng-disabled="selectedpersons.length == 0 && !vissettings.fileIsRead"><span>Visualize</span></a> </div> </div> </div> Loading Loading @@ -503,7 +503,7 @@ </div> <footer class="footer-style"> <span> <p style="color:#fff">Copyright ©2018 Leo Born, Juri Opitz</p> <p style="color:#fff">Copyright ©2018-2019 Leo Born, Juri Opitz</p> </span> </footer> </div> Loading