summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclient/js/controllers/home/home.js10
-rw-r--r--client/js/controllers/home/machineCreation.js2
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 () {