diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-13 17:06:04 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-13 17:06:04 +0000 |
commit | 3270c613fd8cc050147d39d4fa20722b98a81ee0 (patch) | |
tree | 0141e3135ba684b1e9875182ad63deba494af247 | |
parent | fcba62ef0051575981427bc2089b08c693e7a140 (diff) | |
download | git-deps-3270c613fd8cc050147d39d4fa20722b98a81ee0.tar.gz |
fix transitioning of plus icon
-rw-r--r-- | html/js/git-deps-graph.coffee | 11 |
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() |