mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
nicer visedges
This commit is contained in:
parent
15817f9220
commit
1fee32879c
3 changed files with 11 additions and 6 deletions
|
@ -14,6 +14,8 @@ var TIME = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var GRAPHICS = {
|
var GRAPHICS = {
|
||||||
|
arrowHeadSize: 8,
|
||||||
|
|
||||||
nodeRadius: 17,
|
nodeRadius: 17,
|
||||||
curveControlPointOffset: 50,
|
curveControlPointOffset: 50,
|
||||||
defaultEasing: 'easeInOut',
|
defaultEasing: 'easeInOut',
|
||||||
|
|
10
src/tree.js
10
src/tree.js
|
@ -674,12 +674,17 @@ var VisEdge = Backbone.Model.extend({
|
||||||
str += coords(headPos);
|
str += coords(headPos);
|
||||||
|
|
||||||
// arrow head
|
// arrow head
|
||||||
// TODO default sizing? fill the arrow head?
|
|
||||||
var delta = GRAPHICS.arrowHeadSize || 10;
|
var delta = GRAPHICS.arrowHeadSize || 10;
|
||||||
str += ' L' + coords(offset2d(headPos, -delta, delta));
|
str += ' L' + coords(offset2d(headPos, -delta, delta));
|
||||||
str += ' L' + coords(offset2d(headPos, delta, delta));
|
str += ' L' + coords(offset2d(headPos, delta, delta));
|
||||||
str += ' L' + coords(headPos);
|
str += ' L' + coords(headPos);
|
||||||
|
|
||||||
|
// then go back, so we can fill correctly
|
||||||
|
str += 'C';
|
||||||
|
str += coords(offset(headPos, 1)) + ' ';
|
||||||
|
str += coords(offset(tailPos, -1)) + ' ';
|
||||||
|
str += coords(tailPos);
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -698,7 +703,8 @@ var VisEdge = Backbone.Model.extend({
|
||||||
'stroke-width': GRAPHICS.visBranchStrokeWidth,
|
'stroke-width': GRAPHICS.visBranchStrokeWidth,
|
||||||
'stroke': this.getStrokeColor(),
|
'stroke': this.getStrokeColor(),
|
||||||
'stroke-linecap': 'round',
|
'stroke-linecap': 'round',
|
||||||
'stroke-linejoin': 'round'
|
'stroke-linejoin': 'round',
|
||||||
|
'fill': this.getStrokeColor()
|
||||||
});
|
});
|
||||||
path.toBack();
|
path.toBack();
|
||||||
this.set('path', path);
|
this.set('path', path);
|
||||||
|
|
5
todo.txt
5
todo.txt
|
@ -6,15 +6,12 @@ animation factory? stuff like:
|
||||||
-highlightCommit(50, 'targetColor') // during search
|
-highlightCommit(50, 'targetColor') // during search
|
||||||
-clearHighlightsAllNodes
|
-clearHighlightsAllNodes
|
||||||
|
|
||||||
|
|
||||||
ALSO other big things:
|
ALSO other big things:
|
||||||
- Division in their rings based on how many / what branches they are part of
|
|
||||||
- Color on branch edges??
|
- Color on branch edges??
|
||||||
|
|
||||||
Big Graphic things:
|
Big Graphic things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
- colored branch edges. basically
|
- colored branch edges. basically
|
||||||
- node rings, really think we should do it
|
|
||||||
- When you are rebasing and you hit the bottom, all the nodes go in the wrong spot...
|
- When you are rebasing and you hit the bottom, all the nodes go in the wrong spot...
|
||||||
We need some kind of "update everything but this set of nodes" thing...
|
We need some kind of "update everything but this set of nodes" thing...
|
||||||
- averaging colors!
|
- averaging colors!
|
||||||
|
@ -31,6 +28,6 @@ Small things to implement:
|
||||||
|
|
||||||
|
|
||||||
Bugs to fix:
|
Bugs to fix:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue