创建 mxCell 元素
(
cell_id: str,
parent: str = "1",
value: str = "",
style: str = "",
vertex: bool = True,
edge: bool = False,
**attrs: Any,
)
| 8 | |
| 9 | |
| 10 | def create_mxcell( |
| 11 | cell_id: str, |
| 12 | parent: str = "1", |
| 13 | value: str = "", |
| 14 | style: str = "", |
| 15 | vertex: bool = True, |
| 16 | edge: bool = False, |
| 17 | **attrs: Any, |
| 18 | ) -> ET.Element: |
| 19 | """创建 mxCell 元素""" |
| 20 | d = {"id": str(cell_id), "parent": str(parent), "value": value or "", "style": style or ""} |
| 21 | if vertex: |
| 22 | d["vertex"] = "1" |
| 23 | if edge: |
| 24 | d["edge"] = "1" |
| 25 | d.update({k.replace("_", ""): str(v) for k, v in attrs.items()}) |
| 26 | return ET.Element("mxCell", d) |
| 27 | |
| 28 | |
| 29 | def create_geometry( |
nothing calls this directly
no outgoing calls
no test coverage detected