Skip to content

Sn 277 interaction with svg#53

Merged
boyan-tonchev merged 4 commits intomainfrom
SN-277-interaction-with-svg
Feb 26, 2026
Merged

Sn 277 interaction with svg#53
boyan-tonchev merged 4 commits intomainfrom
SN-277-interaction-with-svg

Conversation

@boyan-tonchev
Copy link
Copy Markdown
Collaborator

@boyan-tonchev boyan-tonchev commented Feb 17, 2026

SN-277: interaction with PowSyBl and VizGraph diagrams

What

Implement core functionality to enable interaction with SVG diagram content.

Why

We want to trigger application-specific behavior when a diagram element is clicked.

How

Implemented an SvgDiagramManager class responsible for:

  • Locating an element within a provided HTML container or inside an iframe
  • Registering and deregistering event listeners on the detected SVG
  • Invoking a callback function (provided via constructor) when an SVG element is clicked
    When an SVG element with an iri attribute is clicked, the manager calls the provided callback and passes the iri of the clicked element.

Additional work

@boyan-tonchev boyan-tonchev force-pushed the SN-277-interaction-with-svg branch 4 times, most recently from f420e15 to 5b29abb Compare February 23, 2026 13:11
@nelly-hateva

This comment was marked as resolved.

@boyan-tonchev boyan-tonchev force-pushed the SN-277-interaction-with-svg branch from 5b29abb to 1babd93 Compare February 26, 2026 08:25
boyan.tonchev added 4 commits February 26, 2026 10:34
## What
Implement core functionality to enable interaction with SVG diagram content.

## Why
We want to trigger application-specific behavior when a diagram element is clicked.

## How
Implemented an SvgDiagramManager class responsible for:
 - Locating an <svg> element within a provided HTML container or inside an iframe
 - Registering and deregistering event listeners on the detected SVG
 - Invoking a callback function (provided via constructor) when an SVG element is clicked
When an SVG element with an iri attribute is clicked, the manager calls the provided callback and passes the iri of the clicked element.
Fixed an issue where a question selected from the question list was not cleared from the input field after submission.
Fixed issue https://github.com/statnett/Talk2PowerSystem_PM/issues/305
Adjusted the diagram width to occupy 100% of the screen when switching to fullscreen mode.
Restricted zoom functionality to mouse wheel interaction only.
@boyan-tonchev boyan-tonchev force-pushed the SN-277-interaction-with-svg branch from 1babd93 to 16c18e2 Compare February 26, 2026 08:35
@boyan-tonchev

This comment was marked as resolved.

@boyan-tonchev boyan-tonchev merged commit 321fe89 into main Feb 26, 2026
@boyan-tonchev boyan-tonchev deleted the SN-277-interaction-with-svg branch February 26, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants