From 0cb1be00f695b45453965bf5c3344f788308d850 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 10 Oct 2024 21:16:41 +0200 Subject: Adjust positioning of event items. Now aligns at the center of the timestamp instead of at the beginning. --- ramaskrik-program.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ramaskrik-program.rb') diff --git a/ramaskrik-program.rb b/ramaskrik-program.rb index 87ba2ba..8bda384 100755 --- a/ramaskrik-program.rb +++ b/ramaskrik-program.rb @@ -33,8 +33,8 @@ class EventDecorator < SimpleDelegator attr_reader :height def calc_offsets(time_offset) - @offset = (start_time - time_offset).to_i / 50 - @height = duration / 50; + @offset = 5 + (start_time - time_offset).to_i / 50 + @height = 5 + duration / 50; start_time + duration end end -- cgit v1.2.3