Commit 65278dce authored by Fintan Mc Gee's avatar Fintan Mc Gee

fixed mouseover issue across grpahs, added mousover to regular node link view

parent bfec4467
......@@ -3,7 +3,7 @@
<ng-include src="'./html/templates/sideMenus.html'"></ng-include>
<ng-include src="'./html/templates/warningMessage.html'"></ng-include>
<div style="position:relative;display:inline-block;width: 95%;">
<svg-labels-directive class="bordered-graph" selectacrossalllayers = "true"></svg-labels-directive>
<svg-labels-directive class="bordered-graph" selectacrossalllayers = "true" crossgraphmouseover = "true"></svg-labels-directive>
<!--<div class ="centeredDiv" id="graphDiv"></div><ng-include src="'./html/templates/simpleGraphOptions.html'"></ng-include>-->
<div id="tooltip"></div>
<div id="nodeInfo"></div>
......
......@@ -705,4 +705,24 @@ angular.module('blizaarModule.controllers', [])
$scope.model.controlVisibility = { aspect:true, layers:true, download:true, saveLoad:true, listView: false, nodeLinkView:false }
}
// functions for highlighting in serval drawn graphs simultaneously
$scope.highlightNeighbourSetInAll = function(nodeUid, layerName) {
// get the set of node Neighbours in Layer
var highlightNodeIds = multiLayerGraphService.getGraph().getLayerByName(layerName).getNeighboursByUid(nodeUid);
highlightNodeIds.push(nodeUid)
$scope.highlightNodeIds = angular.copy(highlightNodeIds);
$scope.$broadcast("highlightNodeSet",{ nodeUidArray: highlightNodeIds});
}
$scope.clearHighlight = function() {
$scope.$broadcast("highlightNodeSet");
}
}]);
\ No newline at end of file
......@@ -231,7 +231,9 @@ angular.module('blizaarModule.directives')
// .linkDistance(30)
//.size([width, height]);
var node, fisheyeActive = fisheyeService.getFiseyeAvailability();
var node, // stores .node slection
link, // stores the d3.js svg selection
fisheyeActive = fisheyeService.getFiseyeAvailability();
if(params !== undefined && params.fisheye !== undefined){
fisheyeActive = params.fisheye === "true";
}
......@@ -246,7 +248,7 @@ angular.module('blizaarModule.directives')
if (graphData !== undefined) {
//var graphData = graphData,
var svg, // stores the d3.js svg selection
link, // stores the d3.js svg selection
positionFunc,
mouseover,
mouseout,
......@@ -767,19 +769,44 @@ angular.module('blizaarModule.directives')
doRefresh(false);
});
var doHighlightFade= function() {
node.filter(function(n){ return !visualHiglightList.hasOwnProperty(n.uid);})
.attr("opacity", 0.2);
link.filter(function(n){ return !(visualHiglightList.hasOwnProperty(n.source.uid) && visualHiglightList.hasOwnProperty(n.target.uid));})
.attr("opacity", 0.2);
}
var clearHighlightFade= function() {
node.attr("opacity", 1.0);
link.attr("opacity", 1.0);
}
scope.$on('highlightNodeSet', function(event, params){
// this message send a set of UIDs which are to be highlighted
if(!params) {
visualHiglightList = null;
node.attr("opacity", 1.0);
link.attr("opacity", 1.0);
visualHiglightList = null
} else {
visualHiglightList = {};
if( params.nodeUidArray) {
params.nodeUidArray.forEach(function (item) {
visualHiglightList[item] = 0;
});
updateGraph(true);
if (visualHighlightType === "fadeOthers") {
doHighlightFade();
}else {
updateGraph(true);
}
}
}
});
......
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