diff options
| author | Loic GUEGAN <loic@Manzerbredes.home> | 2016-05-05 12:12:50 +0200 |
|---|---|---|
| committer | Loic GUEGAN <loic@Manzerbredes.home> | 2016-05-05 12:12:50 +0200 |
| commit | b0d79adc8ec06502f7adae0cf72f294d1f7d9405 (patch) | |
| tree | 4a84c209a35508b6614874367bff01d284e398f5 | |
| parent | 4daec471a322645a8173739a5edd17e57b7f2d27 (diff) | |
Tet
| -rwxr-xr-x | client/js/controllers/home/home.js | 10 | ||||
| -rw-r--r-- | client/js/controllers/home/machineCreation.js | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js index c64fc6d..98c1b61 100755 --- a/client/js/controllers/home/home.js +++ b/client/js/controllers/home/home.js @@ -9,6 +9,10 @@ mainApp.controller('homeCtrl', ['$scope', 'Compute', '$rootScope', 'Loading', 'I $rootScope.$broadcast("showMachineCreationEvent", Compute.getData().axioms); }; var displayMachine = function () { + + + + var machineNames = []; var i = 0; $.each(Compute.getData().machines, function () { @@ -43,8 +47,8 @@ mainApp.controller('homeCtrl', ['$scope', 'Compute', '$rootScope', 'Loading', 'I }, joint.shapes.basic.Rect.prototype.defaults) }); - var graph = new joint.dia.Graph; - var paper = new joint.dia.Paper({ + var graph = new joint.dia.Graph; + var paper = new joint.dia.Paper({ el: $('#graphHolder'), width: $('#graphHolder').width(), //height: test.height, @@ -138,7 +142,7 @@ mainApp.controller('homeCtrl', ['$scope', 'Compute', '$rootScope', 'Loading', 'I // On user login $scope.$on('updateGraphEvent', function () { - // call update graph + displayMachine() }); //Return a new link linking the parent and child elements with the interfaces names given in parameters function makeLink(parentElementLabel, childElementLabel, Iparent, Ichild) { diff --git a/client/js/controllers/home/machineCreation.js b/client/js/controllers/home/machineCreation.js index 3996c68..aa488af 100644 --- a/client/js/controllers/home/machineCreation.js +++ b/client/js/controllers/home/machineCreation.js @@ -15,7 +15,7 @@ mainApp.controller('machineCreationCtrl', ['$scope', 'Compute', '$rootScope', '$ }); var callMeAfterMachineCreation=function(response){ - Compute.pullData(function(){}); + Compute.pullData(function(){$rootScope.$broadcast("updateGraphEvent")}); }; $scope.createMachine = function () { |
