aboutsummaryrefslogtreecommitdiffstats
path: root/html
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-13 17:06:04 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-13 17:06:04 +0000
commit3270c613fd8cc050147d39d4fa20722b98a81ee0 (patch)
tree0141e3135ba684b1e9875182ad63deba494af247 /html
parentfcba62ef0051575981427bc2089b08c693e7a140 (diff)
downloadgit-deps-3270c613fd8cc050147d39d4fa20722b98a81ee0.tar.gz
fix transitioning of plus icon
Diffstat (limited to 'html')
-rw-r--r--html/js/git-deps-graph.coffee11
1 files changed, 5 insertions, 6 deletions
diff --git a/html/js/git-deps-graph.coffee b/html/js/git-deps-graph.coffee
index 5796c11..0033493 100644
--- a/html/js/git-deps-graph.coffee
+++ b/html/js/git-deps-graph.coffee
@@ -423,8 +423,8 @@ add_plus_icon = (node_element) ->
icon = n.insert('use')
.attr('class', 'plus-icon')
.attr('xlink:href', '#plus-icon')
- .attr('x', rw/2 - PLUS_ICON_WIDTH/2)
- .attr('y', rh - PLUS_ICON_WIDTH/2)
+ .attr('x', rw/2)
+ .attr('y', rh - PLUS_ICON_WIDTH/2)
.attr('width', 0)
.attr('height', 0)
icon
@@ -442,17 +442,16 @@ icon_ease_in = (icon, rw) ->
.duration(200)
.attr('width', PLUS_ICON_WIDTH)
.attr('height', PLUS_ICON_WIDTH)
- .attrTween('x', (d, i, a) ->
- d3.interpolateNumber(rw/2, rw/2 - PLUS_ICON_WIDTH/2))
+ .attr('x', rw/2 - PLUS_ICON_WIDTH/2)
icon_ease_out = (icon, rw) ->
icon.transition()
+ .attr(rw/2 - PLUS_ICON_WIDTH/2)
.ease('cubic-out')
.duration(200)
.attr('width', 0)
.attr('height', 0)
- .attrTween('x', (d, i, a) ->
- d3.interpolateNumber(rw/2 - PLUS_ICON_WIDTH/2, rw/2))
+ .attr('x', rw/2)
tip_html = (d) ->
fragment = $(tip_template).clone()