diff options
| author | Viatrix | 2026-03-12 12:57:41 -0700 |
|---|---|---|
| committer | Viatrix | 2026-03-12 12:57:41 -0700 |
| commit | 318a84508163ad786f12ee72d01b1b15d3295f73 (patch) | |
| tree | 72281618de86c9596ca481359c6684020a4d59e1 /imagemap.py | |
| parent | 583220acca483e567553851815d3563bec7468f6 (diff) | |
Added image test case and adjusted code to pass it.
Removed rect test case since it was getting redundant.
Diffstat (limited to 'imagemap.py')
| -rw-r--r-- | imagemap.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/imagemap.py b/imagemap.py index 22789f0..89452be 100644 --- a/imagemap.py +++ b/imagemap.py @@ -62,6 +62,8 @@ class ImageMap(inkex.OutputExtension): link={attr:AREA_ATTRS[attr](a) for attr in AREA_ATTRS.keys()} for el in a.iterdescendants(): # CSS is preserved when flattening (for paths) if not isinstance(el,inkex.ShapeElement): continue + if el.tag=='{http://www.w3.org/2000/svg}image': + el.tag='{http://www.w3.org/2000/svg}rect' # because flattening an image creates a clip-path style=el.effective_style() style[CSS_LINK_INDEX]=f'" {CSS_LINK_INDEX}-{len(links)} "' links += [link] |
