Fix bug with layout left()/up()
When moving down/right, we use the old cell size because we are moving the start point outside of the existing cell. When we go up/right, we are doing actually doing the inverse operation, moving backwards using the new cell size. We still check to see if there's an old cell because up()/down()/left()/right() should behave the same for the first cell.
This commit is contained in:
parent
549693dd38
commit
a4ebbc2679
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ Layout.down = Layout.row
|
|||
|
||||
function Layout:up(w, h)
|
||||
w,h = calc_width_height(self, w, h)
|
||||
local x,y = self._x, self._y - (self._h or 0)
|
||||
local x,y = self._x, self._y - (self._h and h or 0)
|
||||
|
||||
if not self._isFirstCell then
|
||||
y = y - self._pady
|
||||
|
@ -184,7 +184,7 @@ Layout.right = Layout.col
|
|||
function Layout:left(w, h)
|
||||
w,h = calc_width_height(self, w, h)
|
||||
|
||||
local x,y = self._x - (self._w or 0), self._y
|
||||
local x,y = self._x - (self._w and w or 0), self._y
|
||||
|
||||
if not self._isFirstCell then
|
||||
x = x - self._padx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue