summaryrefslogtreecommitdiff
path: root/lib/commands.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2023-05-08 17:21:51 +0200
committerGitHub <noreply@github.com>2023-05-08 17:21:51 +0200
commitb3141a24b68c452c6731c5b25e77ebeaf7d40e4d (patch)
tree99f809690ef86d7ac021293c1e89408a1e20cd13 /lib/commands.py
parent59ac45d3212fdfa4615a671738cfa1d970e02782 (diff)
Gradient blocks (#2275)
* remove underlay * set start and end commands for consecutive blocks with the same color * keep previous params * add option for manual input of end_row_spacing
Diffstat (limited to 'lib/commands.py')
-rw-r--r--lib/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/commands.py b/lib/commands.py
index 2bae2ca6..1214e9bc 100644
--- a/lib/commands.py
+++ b/lib/commands.py
@@ -392,7 +392,7 @@ def remove_legacy_param(element, command):
del element.node.attrib[attribute]
-def add_commands(element, commands):
+def add_commands(element, commands, pos=None):
svg = get_document(element.node)
for i, command in enumerate(commands):
@@ -400,7 +400,8 @@ def add_commands(element, commands):
remove_legacy_param(element, command)
group = add_group(svg, element.node, command)
- pos = get_command_pos(element, i, len(commands))
+ if pos is None:
+ pos = get_command_pos(element, i, len(commands))
symbol = add_symbol(svg, group, command, pos)
add_connector(svg, symbol, command, element)