[ARVADOS] updated: 84eaf88d6836d730ef89d1433233a5f21d36ebb4
git at public.curoverse.com
git at public.curoverse.com
Wed Jun 18 10:04:16 EDT 2014
Summary of changes:
apps/workbench/app/assets/javascripts/sizing.js | 15 +++++++--------
.../workbench/app/assets/stylesheets/application.css.scss | 1 +
apps/workbench/app/views/application/_svg_div.html.erb | 3 +--
3 files changed, 9 insertions(+), 10 deletions(-)
via 84eaf88d6836d730ef89d1433233a5f21d36ebb4 (commit)
from 586c0409bf9496bae169c2d51b04806b82c342a9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 84eaf88d6836d730ef89d1433233a5f21d36ebb4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Jun 18 10:04:12 2014 -0400
Fixed smart scrolling as intended for svg divs. refs #2919
diff --git a/apps/workbench/app/assets/javascripts/sizing.js b/apps/workbench/app/assets/javascripts/sizing.js
index 640893f..3d60274 100644
--- a/apps/workbench/app/assets/javascripts/sizing.js
+++ b/apps/workbench/app/assets/javascripts/sizing.js
@@ -11,20 +11,19 @@ function graph_zoom(divId, svgId, scale) {
}
function smart_scroll_fixup(s) {
- //console.log(s);
+
if (s != null && s.type == 'shown.bs.tab') {
s = [s.target];
}
else {
s = $(".smart-scroll");
}
- //console.log(s);
- for (var i = 0; i < s.length; i++) {
- a = s[i];
- var h = window.innerHeight - a.getBoundingClientRect().top - 20;
+
+ s.each(function(i, a) {
+ var h = window.innerHeight - $(a).offset().top;
height = String(h) + "px";
- a.style['max-height'] = height;
- }
+ $(a).css('max-height', height);
+ });
}
-$(window).on('load resize scroll', smart_scroll_fixup);
+$(window).on('load ready resize scroll ajax:complete', smart_scroll_fixup);
diff --git a/apps/workbench/app/assets/stylesheets/application.css.scss b/apps/workbench/app/assets/stylesheets/application.css.scss
index 4fea7ae..da958e1 100644
--- a/apps/workbench/app/assets/stylesheets/application.css.scss
+++ b/apps/workbench/app/assets/stylesheets/application.css.scss
@@ -134,6 +134,7 @@ nav.navbar-fixed-top .navbar-nav.navbar-right > li > a:hover {
.smart-scroll {
overflow: auto;
+ margin-bottom: -15px;
}
.inline-progress-container div.progress {
diff --git a/apps/workbench/app/views/application/_svg_div.html.erb b/apps/workbench/app/views/application/_svg_div.html.erb
index b35d706..76bedba 100644
--- a/apps/workbench/app/views/application/_svg_div.html.erb
+++ b/apps/workbench/app/views/application/_svg_div.html.erb
@@ -24,7 +24,7 @@ stroke-linecap: round;
});
<% 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="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>
@@ -34,5 +34,4 @@ stroke-linecap: round;
<span id="_<%= divId %>_center" style="padding-left: 0px"></span>
<%= raw(svg) %>
</div>
- <div id="_<%= divId %>_padding" style="padding-bottom: 1em"></div>
</div>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list