From 77faead4e948f901fa6ca9951f085bbe045bae68 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 7 Nov 2016 15:43:13 -0500 Subject: Updated vis library to 4.17 and also linked to only graph2d-timeline CSS and JS --- .../timeline/interaction/navigationMenu.html | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'www/lib/vis/examples/timeline/interaction/navigationMenu.html') diff --git a/www/lib/vis/examples/timeline/interaction/navigationMenu.html b/www/lib/vis/examples/timeline/interaction/navigationMenu.html index 07ec66c1..cb7c19ad 100755 --- a/www/lib/vis/examples/timeline/interaction/navigationMenu.html +++ b/www/lib/vis/examples/timeline/interaction/navigationMenu.html @@ -23,7 +23,7 @@ - + @@ -69,26 +69,12 @@ }); } - /** - * Zoom the timeline a given percentage in or out - * @param {Number} percentage For example 0.1 (zoom out) or -0.1 (zoom in) - */ - function zoom (percentage) { - var range = timeline.getWindow(); - var interval = range.end - range.start; - - timeline.setWindow({ - start: range.start.valueOf() - interval * percentage, - end: range.end.valueOf() + interval * percentage - }); - } - // attach events to the navigation buttons - document.getElementById('zoomIn').onclick = function () { zoom(-0.2); }; - document.getElementById('zoomOut').onclick = function () { zoom( 0.2); }; + document.getElementById('zoomIn').onclick = function () { timeline.zoomIn( 0.2); }; + document.getElementById('zoomOut').onclick = function () { timeline.zoomOut( 0.2); }; document.getElementById('moveLeft').onclick = function () { move( 0.2); }; document.getElementById('moveRight').onclick = function () { move(-0.2); }; - \ No newline at end of file + -- cgit v1.2.3