make synapse card mapper icon link to mapper profile

This commit is contained in:
Bashar Jabbour 2014-11-29 16:36:57 -05:00
parent 12dd2f32b4
commit b883d03b4e

View file

@ -1394,7 +1394,7 @@ Metamaps.SynapseCard = {
},
add_user_info: function (synapse) {
var u = '<div id="edgeUser" class="hoverForTip">';
u += '<img src="" width="24" height="24" />'
u += '<a href="/explore/mapper/' + synapse.get("user_id") + '"> <img src="" width="24" height="24" /></a>'
u += '<div class="tip">' + synapse.get("user_name") + '</div></div>';
$('#editSynLowerBar').append(u);
@ -2818,8 +2818,20 @@ Metamaps.Control = {
}
Metamaps.Control.deselectNode(node);
Metamaps.Visualize.mGraph.graph.removeNode(nodeid);
Metamaps.Visualize.mGraph.plot();
node.setData('alpha', 0, 'end');
node.eachAdjacency(function (adj) {
adj.setData('alpha', 0, 'end');
});
Metamaps.Visualize.mGraph.fx.animate({
modes: ['node-property:alpha',
'edge-property:alpha'
],
duration: 500
});
setTimeout(function () {
Metamaps.Visualize.mGraph.graph.removeNode(nodeid);
}, 500);
Metamaps.Filter.checkMetacodes();
Metamaps.Filter.checkMappers();
},
@ -2984,13 +2996,17 @@ Metamaps.Control = {
hideEdge: function (edge) {
var from = edge.nodeFrom.id;
var to = edge.nodeTo.id;
edge.setData('alpha', 0, 'end');
Metamaps.Control.deselectEdge(edge);
if (Metamaps.Visualize.mGraph.graph.getAdjacence(from, to)) {
Metamaps.Visualize.mGraph.fx.animate({
modes: ['edge-property:alpha'],
duration: 500
});
setTimeout(function () {
Metamaps.Visualize.mGraph.graph.removeAdjacence(from, to);
Metamaps.Visualize.mGraph.plot();
Metamaps.Filter.checkSynapses();
Metamaps.Filter.checkMappers();
}
}, 500);
Metamaps.Filter.checkSynapses();
Metamaps.Filter.checkMappers();
},
updateSelectedPermissions: function (permission) {