From f6521a3206ca097ab97112fc7306ce751630272a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 30 Jun 2010 16:56:19 +0200 Subject: [PATCH] share/collection.js: Implement "zoom_reference", too. --- share/collection.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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
" - + "
!
" + + "
!
" + "" + "
" + "
←
" -- 2.11.0