Skip to content

Commit

Permalink
Add a simple transition to dependencyTree
Browse files Browse the repository at this point in the history
  • Loading branch information
LFDM committed May 28, 2014
1 parent 6759c4a commit 706175e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/js/arethusa.dep_tree/directives/dependency_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ angular.module('arethusa.depTree').directive('dependencyTree', [
svg.select('g').attr('transform', 'translate(' + ev.translate + ') scale(' + ev.scale + ')');
}));
var renderer = new dagreD3.Renderer();

function transition(selection) {
return selection.transition().duration(500);
}
renderer.transition(transition);

function insertTokenDirectives() {
nodes().append(function () {
// This is the element we append to and we created as a placeholder
Expand Down Expand Up @@ -282,4 +288,4 @@ angular.module('arethusa.depTree').directive('dependencyTree', [
template: '<g/>'
};
}
]);
]);

0 comments on commit 706175e

Please sign in to comment.