Skip to content

Commit

Permalink
WIP: fix selector to not select the label nodes (not shown by tests f…
Browse files Browse the repository at this point in the history
…or now)
  • Loading branch information
tbouffard committed Dec 17, 2020
1 parent 921fabd commit 7c749cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/component/registry/bpmn-elements-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,14 @@ export class BpmnQuerySelectors {
}

elementsOfKind(kind: string): string {
// TODO fix because it also returns the label node
return `#${this.containerId} > svg > g > g > g.${kind}`;
// document.querySelectorAll('#bpmn-container > svg > g > g > g.bpmn-intermediate-throw-event:not(g > foreignObject)')
// tester avec attribute style non vide
// genere une erreur document.querySelectorAll('#bpmn-container > svg > g > g > :not(> g.bpmn-intermediate-throw-event[style=""])')

// style is empty in g node that hold the label (with foreign object)
// this one is ok: document.querySelectorAll('#bpmn-container > svg > g > g > g.bpmn-intermediate-throw-event:not([style=""])')
// TODO fix because it also returns the label node BUT not shown by DOM tests
return `#${this.containerId} > svg > g > g > g.${kind}:not([style=""])`;
}
}

Expand Down

0 comments on commit 7c749cf

Please sign in to comment.