summaryrefslogtreecommitdiff
path: root/activity
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-02-09 21:38:17 +0100
committerAki <please@ignore.pl>2024-02-09 21:53:31 +0100
commitd41c7d0e1d864bec20cd917354fe82330d0781d5 (patch)
tree972b4d0d7a318c9ba6a4eb58d4830e93fb747105 /activity
parentf203f127a8e7b35bd8351b813cd3448e6bf9fd6e (diff)
downloadactivity-d41c7d0e1d864bec20cd917354fe82330d0781d5.zip
activity-d41c7d0e1d864bec20cd917354fe82330d0781d5.tar.gz
activity-d41c7d0e1d864bec20cd917354fe82330d0781d5.tar.bz2
Removed duplication in svg itself
Design is still quite questionable. Main point would be to make them stateful in a non-awkward/hacky way like currently.
Diffstat (limited to 'activity')
-rw-r--r--activity/formats/svg.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/activity/formats/svg.lua b/activity/formats/svg.lua
index ab3ab69..f7e2700 100644
--- a/activity/formats/svg.lua
+++ b/activity/formats/svg.lua
@@ -44,7 +44,7 @@ function svg.end_table ()
end
-local cell_offset = 28
+local cell_offset
function svg.start_row ()
@@ -73,7 +73,7 @@ end
function svg.cell (level)
local cell = ([[<rect class="cell level%d" x="%d"/>]]):format(level, cell_offset)
- cell_offset = cell_offset + 12
+ svg.spot() -- Increment cell_offset in one place in code.
return cell
end