diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index 8faaeac7..5129e209 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -1394,7 +1394,7 @@ Metamaps.SynapseCard = { }, add_user_info: function (synapse) { var u = '
'; - u += '' + u += ' ' u += '
' + synapse.get("user_name") + '
'; $('#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) {