Skip to content

Commit

Permalink
Fix selector
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Fontorbe <guillaume.fontorbe@typefox.io>
  • Loading branch information
gfontorbe committed Apr 29, 2024
1 parent 7604624 commit e059fc2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ export class JunctionPostProcessor implements IVNodePostprocessor {
}
postUpdate(cause?: Action | undefined): void {
let targetDiv: string = this.viewerOptions.baseDiv;
let junctionSelector = `#${targetDiv} > svg > g > g.sprotty-junction`;

if (cause?.kind === RequestBoundsAction.KIND) {
targetDiv = this.viewerOptions.hiddenDiv;
junctionSelector = `#${targetDiv} > svg > g > g > g.sprotty-junction`;
}

const junctionSelector = `#${targetDiv} > svg > g > g > g.sprotty-junction`;
const svg = document.querySelector(`#${targetDiv} > svg > g`);
if (svg) {
const junctionGroups = Array.from(document.querySelectorAll(junctionSelector));
Expand Down

0 comments on commit e059fc2

Please sign in to comment.