diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-12 23:10:58 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-12 23:10:58 +0000 |
commit | 80d531898b434ade5f8f942025cb409b445922d1 (patch) | |
tree | 31f9be356b144e6595d0b40b6b73a4ff6a6c3eed /html | |
parent | 149f5253f8d0f92aaf93922e17b5c86df3f92178 (diff) | |
download | git-deps-80d531898b434ade5f8f942025cb409b445922d1.tar.gz |
add hyperlinks with gitfile:// URLs (#29)
Closes #29.
Diffstat (limited to 'html')
-rw-r--r-- | html/js/git-deps-graph.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/html/js/git-deps-graph.coffee b/html/js/git-deps-graph.coffee index 6157a42..1148109 100644 --- a/html/js/git-deps-graph.coffee +++ b/html/js/git-deps-graph.coffee @@ -284,7 +284,7 @@ draw_new_nodes = (fg, g_enter) -> rects = g_enter.append('rect') .attr('rx', 5) .attr('ry', 5) - .on('dblclick', (d) -> explore_node d) + .on('dblclick', (d) -> launch_viewer d) labels = g_enter.append('text').text((d) -> d.name @@ -310,6 +310,9 @@ explore_node = (d) -> else add_commitish d.sha1 +launch_viewer = (d) -> + window.location.assign "gitfile://#{options.repo_path}##{d.sha1}" + new_data_notification = (new_data) -> new_nodes = new_data[0] new_deps = new_data[1] |