From 79270bf7f392e1a11f9b61bb94473d6751707fca Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Tue, 7 Jun 2011 13:36:14 -0600 Subject: make the SCROLL_VERT calculation clearer (and fix it) --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 8dc6c2a..c10764c 100644 --- a/examples/config/config +++ b/examples/config/config @@ -91,7 +91,7 @@ set download_handler = sync_spawn @scripts_dir/download.sh #@on_event CONFIG_CHANGED print Config changed: %1 = %2 # Scroll percentage calculation -@on_event SCROLL_VERT set scroll_message = \@<(function(){var p='--';if(%3<%4){p=(%1/(%3-%4));p=Math.round(10000*p)/100;};return p+'%';})()>\@ +@on_event SCROLL_VERT set scroll_message = \@<(function(curr, min, max, size){if(max == size) return '--'; var p=(curr/(max - size)); return Math.round(10000*p)/100;})(%1,%2,%3,%4)>\@% # === Behaviour and appearance =============================================== -- cgit v1.2.3