Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable node interaction when no metadata is available in network area diagram viewer #115

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ export class NetworkAreaDiagramViewer {
this.originalWidth = 0;
this.originalHeight = 0;
this.dynamicCssRules = customDynamicCssRules ?? DEFAULT_DYNAMIC_CSS_RULES;
// if no metadata is available disable node interaction
enableNodeInteraction = diagramMetadata == null ? false : enableNodeInteraction;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also disable the svgDraw.on('mouseover', ...). For that, shouldn't we rather give a hasMetadata boolean to init method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hover callback disabled if there is no metadata

this.init(minWidth, minHeight, maxWidth, maxHeight, enableNodeInteraction, enableLevelOfDetail);
this.svgParameters = new SvgParameters(diagramMetadata?.svgParameters);
this.layoutParameters = new LayoutParameters(diagramMetadata?.layoutParameters);
Expand Down
Loading