From: Florian Forster Date: Wed, 30 Jun 2010 14:56:19 +0000 (+0200) Subject: share/collection.js: Implement "zoom_reference", too. X-Git-Tag: v4.0.0~170 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f6521a3206ca097ab97112fc7306ce751630272a;p=collection4.git share/collection.js: Implement "zoom_reference", too. --- diff --git a/share/collection.js b/share/collection.js index a15a096..4aacdd1 100644 --- a/share/collection.js +++ b/share/collection.js @@ -140,6 +140,29 @@ function zoom_relative (graph_id, factor_begin, factor_end) return (zoom_redraw (jq_obj)); } +function zoom_reference (graph_id) /* {{{ */ +{ + var jq_obj; + var end; + var begin; + + jq_obj = $("#" + graph_id); + if (jq_obj == null) + return (false); + + begin = jq_obj.data ('begin'); + end = jq_obj.data ('end'); + if ((begin == null) || (end == null)) + return (false); + + $(".graph-img img").each (function () + { + $(this).data ('begin', begin); + $(this).data ('end', end); + zoom_redraw ($(this)); + }); +} /* }}} function zoom_reference */ + function zoom_earlier (graph_id) /* {{{ */ { return (zoom_relative (graph_id, -0.2, -0.2)); @@ -213,7 +236,7 @@ $(document).ready(function() { + "
W
" + "
M
" + "
Y
" - + "
!
" + + "
!
" + "" + "
" + "
←
"