From e2af0958bb74400574a1feccbd0b3d581d8aa360 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Mon, 23 Apr 2018 22:07:56 -0500 Subject: [PATCH] Fixed multiple text y positioning --- lib/objects/multi_line_text.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/objects/multi_line_text.rb b/lib/objects/multi_line_text.rb index eae4c49..e997d50 100644 --- a/lib/objects/multi_line_text.rb +++ b/lib/objects/multi_line_text.rb @@ -5,7 +5,6 @@ class MultiLineText @texts = [] text.split("\n").each_with_index do |line, i| _options = options - _options[:y]+=_options[:size] @texts << Text.new(line, _options) end @options = options @@ -46,12 +45,13 @@ class MultiLineText def y=(int) @y = int + puts "Hi, #{int}" @texts.each_with_index {|t, i| t.y=int+(i*t.size)} end def calculate_stack @texts.each_with_index do |text, index| - text.y = text.size*index + text.y = (text.size*index)+@options[:y] end end