Loading client/js/controllers/vis-general.js +14 −8 Original line number Diff line number Diff line angular .module('kg-app') .run(function($rootScope) { $rootScope.vissettings = {settingsview: true, visview: false, query: "", ownfile: true, datafile: false, fileIsRead: false, addEdgeValue: false, addCentrality: false, degreeCentrality: true, eigenvectorCentrality: false, addEventYears: false, showUnconnectedNodes: false, groupByGender: true, degree: 1, minDegree: true, equalDegree: false, maxDegree: false, count: 1, minCount: true, equalCount: false, maxCount: false, selectAllIssuers: false, physicsEnabled: true, networkLocked: false}; $rootScope.vissettings = {settingsview: true, visview: false, query: "", ownfile: true, paperdatafile: false, otherdatafile: false, fileIsRead: false, addEdgeValue: false, addCentrality: false, degreeCentrality: true, eigenvectorCentrality: false, addEventYears: false, showUnconnectedNodes: false, groupByGender: true, degree: 1, minDegree: true, equalDegree: false, maxDegree: false, count: 1, minCount: true, equalCount: false, maxCount: false, selectAllIssuers: false, physicsEnabled: true, networkLocked: false}; }) .controller('VissuiteController', function($rootScope, $scope, $sce, $filter, $http, $timeout, $q, GraphUtils, FileSaver, FileUploader) { // Here, we want to save settings Loading Loading @@ -35,7 +35,7 @@ angular $scope.selectedpersons = []; } else{ $scope.selectedpersons = $scope.allpersons; $scope.selectedpersons = $scope.resultsIssuers; } } Loading @@ -44,7 +44,7 @@ angular $scope.resultsIssuers = []; $scope.selectedpersons = []; $scope.setDataFile = function(){ $scope.setDataFile = function(filenumber){ $scope.vissettings.query = ""; $scope.vissettings.file1 = false; $scope.vissettings.file2 = true; Loading @@ -54,7 +54,7 @@ angular $scope.allpersons = []; $scope.resultsIssuers = []; $scope.selectedpersons = []; $http.get("data/graph_v10.json") $http.get("data/graph_v" + filenumber + ".json") .then(function(response) { $scope.data = response.data; angular.forEach(response.data.nodes, function(value){ Loading Loading @@ -552,8 +552,10 @@ angular borderWidth: 0 }, edges: { smooth: true //smooth: false smooth: { enabled: true, type: 'continuous' } }, layout: { improvedLayout: false }, physics: { enabled: false } Loading @@ -567,8 +569,10 @@ angular borderWidth: 0 }, edges: { smooth: true //smooth: false smooth: { enabled: true, type: 'continuous' } }, layout: { improvedLayout: false }, physics: { Loading Loading @@ -1147,6 +1151,8 @@ angular edges.update(edges.get()); $scope.edge.selected = true; // connectedpeople.length is the number of highlighted people // TODO: maybe show in view angular.forEach(nodes.get(), function(nodeVal, nodeKey){ if( connectedpeople.indexOf(nodeVal.id) == -1 ){ nodeVal.color.background = "#cccccc"; Loading data/graph_v11.json 0 → 100644 +0 −0 File added.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View file index.html +2 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,8 @@ <div> <p> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.ownfile" ng-value="true" ng-click="setOwnFile();" required> Upload saved JSON file</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.datafile" ng-value="true" ng-click="setDataFile();" required> graph_v10.json</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.paperdatafile" ng-value="true" ng-click="setDataFile(10);" required> graph_v10.json</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.otherdatafile" ng-value="true" ng-click="setDataFile(11);" required> graph_v11.json</label> </p> </div> </div> Loading Loading
client/js/controllers/vis-general.js +14 −8 Original line number Diff line number Diff line angular .module('kg-app') .run(function($rootScope) { $rootScope.vissettings = {settingsview: true, visview: false, query: "", ownfile: true, datafile: false, fileIsRead: false, addEdgeValue: false, addCentrality: false, degreeCentrality: true, eigenvectorCentrality: false, addEventYears: false, showUnconnectedNodes: false, groupByGender: true, degree: 1, minDegree: true, equalDegree: false, maxDegree: false, count: 1, minCount: true, equalCount: false, maxCount: false, selectAllIssuers: false, physicsEnabled: true, networkLocked: false}; $rootScope.vissettings = {settingsview: true, visview: false, query: "", ownfile: true, paperdatafile: false, otherdatafile: false, fileIsRead: false, addEdgeValue: false, addCentrality: false, degreeCentrality: true, eigenvectorCentrality: false, addEventYears: false, showUnconnectedNodes: false, groupByGender: true, degree: 1, minDegree: true, equalDegree: false, maxDegree: false, count: 1, minCount: true, equalCount: false, maxCount: false, selectAllIssuers: false, physicsEnabled: true, networkLocked: false}; }) .controller('VissuiteController', function($rootScope, $scope, $sce, $filter, $http, $timeout, $q, GraphUtils, FileSaver, FileUploader) { // Here, we want to save settings Loading Loading @@ -35,7 +35,7 @@ angular $scope.selectedpersons = []; } else{ $scope.selectedpersons = $scope.allpersons; $scope.selectedpersons = $scope.resultsIssuers; } } Loading @@ -44,7 +44,7 @@ angular $scope.resultsIssuers = []; $scope.selectedpersons = []; $scope.setDataFile = function(){ $scope.setDataFile = function(filenumber){ $scope.vissettings.query = ""; $scope.vissettings.file1 = false; $scope.vissettings.file2 = true; Loading @@ -54,7 +54,7 @@ angular $scope.allpersons = []; $scope.resultsIssuers = []; $scope.selectedpersons = []; $http.get("data/graph_v10.json") $http.get("data/graph_v" + filenumber + ".json") .then(function(response) { $scope.data = response.data; angular.forEach(response.data.nodes, function(value){ Loading Loading @@ -552,8 +552,10 @@ angular borderWidth: 0 }, edges: { smooth: true //smooth: false smooth: { enabled: true, type: 'continuous' } }, layout: { improvedLayout: false }, physics: { enabled: false } Loading @@ -567,8 +569,10 @@ angular borderWidth: 0 }, edges: { smooth: true //smooth: false smooth: { enabled: true, type: 'continuous' } }, layout: { improvedLayout: false }, physics: { Loading Loading @@ -1147,6 +1151,8 @@ angular edges.update(edges.get()); $scope.edge.selected = true; // connectedpeople.length is the number of highlighted people // TODO: maybe show in view angular.forEach(nodes.get(), function(nodeVal, nodeKey){ if( connectedpeople.indexOf(nodeVal.id) == -1 ){ nodeVal.color.background = "#cccccc"; Loading
data/graph_v11.json 0 → 100644 +0 −0 File added.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View file
index.html +2 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,8 @@ <div> <p> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.ownfile" ng-value="true" ng-click="setOwnFile();" required> Upload saved JSON file</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.datafile" ng-value="true" ng-click="setDataFile();" required> graph_v10.json</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.paperdatafile" ng-value="true" ng-click="setDataFile(10);" required> graph_v10.json</label> <label class="inline-radio"><input name="jsonfile" type="radio" ng-model="vissettings.otherdatafile" ng-value="true" ng-click="setDataFile(11);" required> graph_v11.json</label> </p> </div> </div> Loading