Commit 626eaf90 authored by Fintan Mc Gee's avatar Fintan Mc Gee

added global sort to DHlist view when tmeporal aspect is laoded

Also fixed issu where highlght fucntion could not be found on in bioListViewController.js
parent fb401b9c
......@@ -521,6 +521,7 @@ angular.module('blizaarModule.controllers')
});
}
}
......@@ -642,4 +643,15 @@ angular.module('blizaarModule.controllers')
$scope.$broadcast('animatePositionRefresh', {layerName: layerName})
}
$scope.controllerDrawFinished = function() {
// this function excutes whenever the dunderlying directives draw function completes
if ($scope.getGlobalSelectedAspect() === "temporal") {
multiLayerGraphService.getGraph().orderNodesGlobally("BLZ_label", false);
$scope.triggerAnimatePositionRefresh("All_Layers");
}
}
}]);
\ No newline at end of file
......@@ -57,9 +57,9 @@ angular.module('blizaarModule.controllers')
$scope.changeAspect = function(){
$scope.setGlobalSelectedAspect($scope.model.selectedAspectName );
angular.element(document).ready(function () {
$rootScope.$broadcast('refreshGraph');
});
// angular.element(document).ready(function () { // nod need for fresh as one is calle din the root contoller
// $rootScope.$broadcast('refreshGraph');
// });
}
......
......@@ -378,6 +378,50 @@ angular.module('blizaarModule.controllers')
}
$scope.initializeBioListView();
$scope.getListHighlightData = function (node, layername, otherLayernames) {
// data structuter:
//distand layers are anythign beyond neigbours
var layer = multiLayerGraphService.getLayerByName(layername);
var masterLayer = multiLayerGraphService.getGraph();
var highlightData = {
currentNode:[{layerName:layername, uid: node.uid}],
currentLayer: {layerName:layername, uids: []},
neighbourLayers: {},
secondOrderNeighbourLayers: {}
};
highlightData.currentLayer.uids = layer.getNeighboursByUid(node.uid);
// edgeList.forEach(function (a) {
// graphBounds.selectAll("#" + edgeIdPrefix + a.id).attr("class", "highlightedLink")
// });
var neighbourUids =masterLayer.getNeighboursByUid(node.uid);
// neighbours in other Layers
otherLayernames.forEach(function(otherLayerName) {
var otherLayer = multiLayerGraphService.getLayerByName(otherLayerName)
var otherLayerNeighbours
if(layer.name !== otherLayer.name) {
if (otherLayer.nodeExists(node.uid)) {
// heighlisgh the current node if it appears in other layers
highlightData.currentNode.push({layerName:otherLayerName, uid: node.uid});
}
highlightData.neighbourLayers[otherLayer.name] = [];
neighbourUids.forEach(function(nUid) {
if (otherLayer.nodeExists(nUid)) {
highlightData.neighbourLayers[otherLayer.name].push(nUid)
}
});
}
});
return highlightData;
}
$scope.$watch('model.inputType', function(newValue) {
// ensure that sensible vlaues exist for Experiment Queries
......
......@@ -996,6 +996,9 @@ angular.module('blizaarModule.directives')
drawInterLayerLinks();
}
//}
if(scope.controllerDrawFinished){
scope.controllerDrawFinished();
}
} // end draw svgGraph
function removeOldOne() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment