[ARVADOS] updated: c25faef6db41c5daeff420871b7d5683c25d62fa
git at public.curoverse.com
git at public.curoverse.com
Mon Jan 27 16:18:24 EST 2014
Summary of changes:
apps/workbench/app/views/collections/show.html.erb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
via c25faef6db41c5daeff420871b7d5683c25d62fa (commit)
from 489595e9636f7a271774cc8188f691d49f514e43 (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 c25faef6db41c5daeff420871b7d5683c25d62fa
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Jan 27 16:19:05 2014 -0500
Adjusts scrollbar to maintain center of image when zooming
diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index bbb7d20..42b732f 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -147,13 +147,13 @@
function graph_zoom(scale) {
var pg = document.getElementById("provenance_graph");
- var st = pg.scrollTop / pg.scrollTopMax;
- var sl = pg.scrollLeft / pg.scrollLeftMax;
+ vcenter = (pg.scrollTop + (pg.scrollHeight - pg.scrollTopMax)/2.0) / pg.scrollHeight;
+ hcenter = (pg.scrollLeft + (pg.scrollWidth - pg.scrollLeftMax)/2.0) / pg.scrollWidth;
var g = document.getElementById("graph1").parentNode;
g.setAttribute("height", parseFloat(g.getAttribute("height")) * scale);
g.setAttribute("width", parseFloat(g.getAttribute("width")) * scale);
- pg.scrollTop = st * pg.scrollTopMax;
- pg.scrollLeft = sl * pg.scrollLeftMax;
+ pg.scrollTop = (vcenter * pg.scrollHeight) - (pg.scrollHeight - pg.scrollTopMax)/2.0;
+ pg.scrollLeft = (hcenter * pg.scrollWidth) - (pg.scrollWidth - pg.scrollLeftMax)/2.0;
}
</script>
<div style="text-align: right">
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list