ISEPOS-2373 Also store the bounding box as a data attribute for quick access
This commit is contained in:
parent
c20f7c06a7
commit
cce0cd258d
@ -536,6 +536,11 @@ verbose: {verbose}")
|
||||
meta_elem = ET.SubElement(root, "metadata")
|
||||
meta_elem.text = json.dumps(bbox_dict)
|
||||
|
||||
# (Optional) Also store the bounding box as a data attribute for quick access
|
||||
root.set("data-bbox", json.dumps(bbox_dict))
|
||||
tree.write(svg_path, encoding="utf-8", xml_declaration=True)
|
||||
logger.info(f"Embedded bbox into {svg_path} → {bbox_dict}")
|
||||
|
||||
# -----------------------------------------
|
||||
# END Inject bounding box (BBOX) metadata into the SVG
|
||||
# -----------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user