Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / application / _svg_div.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%= content_for :css do %>
6 /* Need separate style for each instance of svg div because javascript will manipulate the properties. */
7 #<%= divId %> {
8  padding-left: 3px;
9  overflow: auto;
10  border: solid;
11  border-width: 1px;
12  border-color: gray;
13  position: absolute;
14  left: 25px;
15  right: 25px;
16 }
17 path:hover {
18 stroke-width: 5;
19 }
20 path {
21 stroke-linecap: round;
22 }
23 <% end %>
24
25 <%= content_for :js do %>
26     $(window).on('load', function() {
27       $(window).on('load resize scroll', function () { graph_zoom("<%= divId %>","<%=svgId %>", 1) } );
28     });
29 <% end %>
30
31 <div id="_<%= divId %>_container">
32   <div style="text-align: right">
33     <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-out" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', .9)"></span></a>
34     <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-in" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', 1./.9)"></span></a>
35   </div>
36
37   <div id="<%= divId %>" class="smart-scroll">
38     <span id="_<%= divId %>_center" style="padding-left: 0px"></span>
39     <%= raw(svg) %>
40   </div>
41 </div>