diff options
Diffstat (limited to 'imagemap.py')
| -rw-r--r-- | imagemap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/imagemap.py b/imagemap.py index 483845b..0a1c12a 100644 --- a/imagemap.py +++ b/imagemap.py @@ -125,8 +125,8 @@ class ImageMap(inkex.OutputExtension): command=\ ''.join(f'select-clear;select-by-id:{i};selection-ungroup;' for i in reversed(svgIDs)) \ +''.join(f'select-clear;select-by-id:{i[0]};{"selection-ungroup;"*i[1]}' for i in reversed(clipped) if i[1]>0) \ - +''.join(f'select-clear;select-by-id:{i[0]};object-release-clip;selection-set-backup;select-clear;select-by-id:{i[0]};object-stroke-to-path;selection-ungroup;path-union;object-set-attribute:id,{i[0]};selection-restore-backup;path-intersection;object-set-attribute:style,{CSS_LINK_INDEX}:{i[1]};' for i in clippedpaths) \ - +''.join(f'select-clear;select-by-selector:[style~="{CSS_LINK_INDEX}-{i}"];object-stroke-to-path;selection-ungroup;path-union;select-by-id:{rects[i]};path-intersection;object-set-attribute:style,{CSS_LINK_INDEX}:" {CSS_LINK_INDEX}-{i} ";' for i in range(len(links))) \ + +''.join(f'select-clear;select-by-id:{i[0]};object-release-clip;selection-set-backup;select-clear;select-by-id:{i[0]};object-stroke-to-path;selection-ungroup;selection-ungroup;path-union;object-set-attribute:id,{i[0]};selection-restore-backup;path-intersection;object-set-attribute:style,{CSS_LINK_INDEX}:{i[1]};' for i in clippedpaths) \ + +''.join(f'select-clear;select-by-selector:[style~="{CSS_LINK_INDEX}-{i}"];object-stroke-to-path;selection-ungroup;selection-ungroup;path-union;select-by-id:{rects[i]};path-intersection;object-set-attribute:style,{CSS_LINK_INDEX}:" {CSS_LINK_INDEX}-{i} ";' for i in range(len(links))) \ +'select-all;path-flatten;path-split' # (we re-set the existing style attribute in case it got unset on non-paths) newbytes=inkscape_command(self.svg,actions=command) |
