summaryrefslogtreecommitdiffstats
path: root/lua-bindings
diff options
context:
space:
mode:
Diffstat (limited to 'lua-bindings')
-rw-r--r--lua-bindings/diaphragm.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua-bindings/diaphragm.lua b/lua-bindings/diaphragm.lua
index 8632e51..a308c28 100644
--- a/lua-bindings/diaphragm.lua
+++ b/lua-bindings/diaphragm.lua
@@ -296,7 +296,10 @@ function M.layout.hstack(params)
296 local el_vert_anchor = el[self.align] 296 local el_vert_anchor = el[self.align]
297 297
298 M.constrain(el.left:eq(previous_right + self.spacing)) 298 M.constrain(el.left:eq(previous_right + self.spacing))
299 M.constrain(el_vert_anchor:eq(previous_vert_anchor)) 299
300 if self.align ~= "none" then
301 M.constrain(el_vert_anchor:eq(previous_vert_anchor))
302 end
300 303
301 table.insert(tops, el.top) 304 table.insert(tops, el.top)
302 table.insert(bottoms, el.bottom) 305 table.insert(bottoms, el.bottom)
@@ -338,7 +341,10 @@ function M.layout.vstack(params)
338 local el_horiz_anchor = el[self.align] 341 local el_horiz_anchor = el[self.align]
339 342
340 M.constrain(el.top:eq(previous_bottom + self.spacing)) 343 M.constrain(el.top:eq(previous_bottom + self.spacing))
341 M.constrain(el_horiz_anchor:eq(previous_horiz_anchor)) 344
345 if self.align ~= "none" then
346 M.constrain(el_horiz_anchor:eq(previous_horiz_anchor))
347 end
342 348
343 table.insert(lefts, el.left) 349 table.insert(lefts, el.left)
344 table.insert(rights, el.right) 350 table.insert(rights, el.right)