Remove nextUp() and nextLeft()

We need the expected size of the new cell to do it correctly, and that
would introduce an inconsistency between up/left and the existing row/col
functions.
This commit is contained in:
Kyle McLamb 2016-10-04 16:50:28 -07:00
parent a4ebbc2679
commit 0084ccba2e

View file

@ -37,20 +37,12 @@ end
Layout.nextDown = Layout.nextRow Layout.nextDown = Layout.nextRow
function Layout:nextUp()
return self._x, self._y - self._h - self._pady
end
function Layout:nextCol() function Layout:nextCol()
return self._x + self._w + self._padx, self._y return self._x + self._w + self._padx, self._y
end end
Layout.nextRight = Layout.nextCol Layout.nextRight = Layout.nextCol
function Layout:nextLeft()
return self._x - self._w - self._padx, self._y
end
function Layout:push(x,y) function Layout:push(x,y)
self._stack[#self._stack+1] = { self._stack[#self._stack+1] = {
self._x, self._y, self._x, self._y,