mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-16 01:24:25 +02:00
awesome animation framework now in with promises
This commit is contained in:
parent
39f6353f07
commit
ebaae41a38
5 changed files with 271 additions and 53 deletions
|
@ -175,10 +175,14 @@ var VisNode = VisBase.extend({
|
|||
this.get('circle').stop().animate(attr.circle, s, e);
|
||||
this.get('text').stop().animate(attr.text, s, e);
|
||||
|
||||
// animate the x attribute without bouncing so it looks like there's
|
||||
// gravity in only one direction. Just a small animation polish
|
||||
this.get('circle').animate(attr.circle.cx, s, 'easeInOut');
|
||||
this.get('text').animate(attr.text.x, s, 'easeInOut');
|
||||
if (easing == 'bounce' &&
|
||||
attr.circle && attr.circle.cx !== undefined &&
|
||||
attr.text && attr.text.x !== undefined ) {
|
||||
// animate the x attribute without bouncing so it looks like there's
|
||||
// gravity in only one direction. Just a small animation polish
|
||||
this.get('circle').animate(attr.circle.cx, s, 'easeInOut');
|
||||
this.get('text').animate(attr.text.x, s, 'easeInOut');
|
||||
}
|
||||
},
|
||||
|
||||
getScreenCoords: function() {
|
||||
|
@ -271,7 +275,6 @@ var VisNode = VisBase.extend({
|
|||
},
|
||||
|
||||
setOutgoingEdgesBirthPosition: function(parentCoords) {
|
||||
|
||||
_.each(this.get('outgoingEdges'), function(edge) {
|
||||
var headPos = edge.get('head').getScreenCoords();
|
||||
var path = edge.genSmoothBezierPathStringFromCoords(parentCoords, headPos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue