I'm trying to filter elements on the svg
diagram using selector: Selector('.joint-type-mapping-record .v-line').withText('testElement')
. But in a result a got a message, that give element not found in DOM.
I checked that innerText is available for <tspan>
and it isn't. Then I tried to add customDOMProperties (addCustomDOMProperties({ innerText: (el) => el.innerText });
), but got error: 1) TypeError: Cannot redefine property: innerText
Is any way to handle <tspan>
using withText()
?
Here the page code:
<g model-id="6c1b0506-321a-4c27-8a06-7f2bfa5851ed" data-type="mapping.Record" id="j_488" class="joint-cell joint-type-mapping joint-type-mapping-record joint-element joint-theme-default" magnet="false" transform="translate(-171,99)">
<text joint-selector="headerLabel" id="v-11781" font-size="20" xml:space="preserve" font-family="Galano Grotesque" font-weight="500" text-anchor="middle" text-vertical-anchor="middle" fill="#333333" transform="matrix(1,0,0,1,109,15)">
<tspan dy="0.3em" class="v-line">testElement</tspan></text></g>