Closed sfraczek closed 12 months ago
I've figured out that svg.get_element_by_id('edge-labels') returns text and tspan side by side so I get two elements per single text object with nested tspan object. I solved the problem by pairwise iteration so I can extract id from text and text from tspan. I still wonder if this is a bug or not (I don't know anything about svg).
It's removed because only the object in question gets that id. Ids unlike some other elements does not propagate to children.
The problem there is weirdly that the text
has the ID but tspan
has the actual text. It's a bit weird but it's actually correct. The text object is called "edge-label-edge-eltwise_Y"
the tspan inside that does not have that ID and shouldn't.
Even with javascript I think looking up that particular tspan based on id would be decidedly hard.
Thanks
Hi,
I'm trying to parse like this:
an svg Text element like this:
and I found that
id
is not there. It is removed here: https://github.com/meerk40t/svgelements/blob/89a6333c052b11c9f569205321ca8e9abaaf92a9/svgelements/svgelements.py#L9055-L9056I wonder why it is removed and how can I solve this? I need this
id
to match the text to the edge. Do you have any suggestions on how to proceed with this?Thanks