commit 4432c14059881c8f0da83e435b46ba24be60e4e7
parent cb80c2cffad02729e04fcd17183823d0e711da80
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Sat, 1 Oct 2022 14:06:37 -0500
actually order staffs correctly
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/smallpond.lua b/smallpond.lua
@@ -484,7 +484,8 @@ end
-- calculate extents
local extents = {}
-for staff, items in pairs(staff3) do
+for _, staff in pairs(stafforder) do
+ local items = staff3[staff]
extents[staff] = {xmin=0, ymin=0, xmax=0, ymax=0}
for i, d in ipairs(items) do
if d.kind == "glyph" then
@@ -569,7 +570,8 @@ end
local xmax = 0
local yoff = 0
local xmin = 0
-for staff, extent in pairs(extents) do
+for _, staff in pairs(stafforder) do
+ local extent = extents[staff]
if xmin > extent.xmin then
xmin = extent.xmin
end