From b3141a24b68c452c6731c5b25e77ebeaf7d40e4d Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 8 May 2023 17:21:51 +0200 Subject: 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 --- lib/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/commands.py') 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) -- cgit v1.2.3