forked from official-apps/SeismicHazardForecasting
		
	ISEPOS-2373 Also store the bounding box as a data attribute for quick access
This commit is contained in:
		@@ -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
 | 
			
		||||
            # -----------------------------------------
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user