summaryrefslogtreecommitdiffstats
path: root/lua-bindings/diaphragm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua-bindings/diaphragm.lua')
-rw-r--r--lua-bindings/diaphragm.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/lua-bindings/diaphragm.lua b/lua-bindings/diaphragm.lua
index ffb3e4b..ad8aac6 100644
--- a/lua-bindings/diaphragm.lua
+++ b/lua-bindings/diaphragm.lua
@@ -399,6 +399,14 @@ function M.constraint.same_width(elems)
399end 399end
400 400
401M.constrain = M.core.constrain 401M.constrain = M.core.constrain
402M.draw = M.core.draw 402M.draw = function(params)
403 M.core.draw(M.util.tbl_extend(params, {
404 draw = function(figure)
405 local self = M.shape({ left = 0, top = 0 })
406 M.constraint.inset(self, figure)
407 params.draw(self)
408 end,
409 }))
410end
403 411
404return M 412return M