mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
git log now done, fixed up result rendering
This commit is contained in:
parent
543f5986ae
commit
9c7ec69e2f
10 changed files with 189 additions and 35 deletions
17
src/tree.js
17
src/tree.js
|
@ -1,6 +1,9 @@
|
|||
var VisBranch = Backbone.Model.extend({
|
||||
defaults: {
|
||||
pos: null
|
||||
pos: null,
|
||||
text: null,
|
||||
animationSpeed: GRAPHICS.defaultAnimationTime,
|
||||
animationEasing: GRAPHICS.defaultEasing
|
||||
},
|
||||
|
||||
validateAtInit: function() {
|
||||
|
@ -37,20 +40,14 @@ var VisBranch = Backbone.Model.extend({
|
|||
this.set('text', text);
|
||||
},
|
||||
|
||||
animateUpdatedPos: function(paper) {
|
||||
animateUpdatedPos: function(speed, easing) {
|
||||
var pos = this.getPosition();
|
||||
var t = this.get('text');
|
||||
if (!t) {
|
||||
this.genGraphics(paper);
|
||||
t = this.get('text');
|
||||
// TODO HACKY
|
||||
}
|
||||
this.get('text').toFront().stop().animate({
|
||||
x: pos.x,
|
||||
y: pos.y
|
||||
},
|
||||
300,
|
||||
'easeInOut'
|
||||
speed || this.get('animationSpeed'),
|
||||
easing || this.get('animationEasing')
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue