From 0406d5d9617d20b528d2c5135a2474c19e23e9fa Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 5 Sep 2017 02:03:12 +0200 Subject: Fixed typo in Group --- not/Group.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/not/Group.lua b/not/Group.lua index 898d7f3..970d3bc 100644 --- a/not/Group.lua +++ b/not/Group.lua @@ -4,7 +4,7 @@ Group = require "not.Element":extends() function Group:new (parent) Group.__super.new(self, parent) self.children = {} - self.marign = 0 + self.margin = 0 end function Group:addChild (element) @@ -17,17 +17,17 @@ function Group:setPosition (x, y) local dx = 0 for _,child in ipairs(self.children) do child:setPosition(x + dx, y) - dx = dx + child:getSize() + self.marigin + dx = dx + child:getSize() + self.margin end return Group.__super.setPosition(self, x, y) end function Group:getSize () - local twidth = -self.marigin + local twidth = -self.margin local theight = 0 for _,child in ipairs(self.children) do local cwidth, cheight = child:getSize() - twidth = twidth + child:getSize() + self.marigin + twidth = twidth + child:getSize() + self.margin if theight < cheight then theight = cheight end -- cgit v1.1