Skip to content

Comments

Sn 277 interaction with svg#53

Open
boyan-tonchev wants to merge 4 commits intomainfrom
SN-277-interaction-with-svg
Open

Sn 277 interaction with svg#53
boyan-tonchev wants to merge 4 commits intomainfrom
SN-277-interaction-with-svg

Conversation

@boyan-tonchev
Copy link
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 id attribute is clicked, the manager calls the provided callback and passes the id of the clicked element.

Additional work

boyan.tonchev added 4 commits February 20, 2026 12:02
## 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 id attribute is clicked, the manager calls the provided callback and passes the id 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 67bfefb to 754fe3b Compare February 20, 2026 10:02
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.

1 participant