Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / application / _svg_div.html.erb
index 1e7fdf7fbb3cd1fb7281c24ee223793eac554bbb..8a417d9e0ea3ad7e6af3df3cd74e81daa9c034ea 100644 (file)
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <%= content_for :css do %>
 /* Need separate style for each instance of svg div because javascript will manipulate the properties. */
 #<%= divId %> {
  border-width: 1px;
  border-color: gray;
  position: absolute;
- left: 1px;
+ left: 25px;
+ right: 25px;
 }
 path:hover {
 stroke-width: 5;
 }
+path {
+stroke-linecap: round;
+}
 <% end %>
 
 <%= content_for :js do %>
     $(window).on('load', function() {
-      var fn = function () { graph_zoom("<%= divId %>", "<%=svgId %>", 1) };
-      $(window).on('resize', fn);
-      $(window).on('scroll', fn);
+      $(window).on('load resize scroll', function () { graph_zoom("<%= divId %>","<%=svgId %>", 1) } );
     });
 <% end %>
 
-<div id="_<%= divId %>_container" style="padding-top: 41px; margin-top: -41px">
+<div id="_<%= divId %>_container">
   <div style="text-align: right">
-    <a style="cursor: pointer"><span class="icon-zoom-out" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', .9)"></span></a>
-    <a style="cursor: pointer"><span class="icon-zoom-in" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', 1./.9)"></span></a>
+    <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-out" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', .9)"></span></a>
+    <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-in" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', 1./.9)"></span></a>
   </div>
 
-  <div id="<%= divId %>">
-    <span id="_<%= divId %>_center" style="padding-left: 300px"></span>
+  <div id="<%= divId %>" class="smart-scroll">
+    <span id="_<%= divId %>_center" style="padding-left: 0px"></span>
     <%= raw(svg) %>
   </div>
-  <div id="_<%= divId %>_padding" style="padding-bottom: 1em"></div>
 </div>