Skip to content

Create SVG Popup Button for Large Graphs #135

@jimbethancourt

Description

@jimbethancourt

Create a popup button when a graph is large to allow users to view an SVG graph while also avoiding horrible page load times.

This is a start and renders correctly the first time, but does not render correctly the second time and causes the page to freeze:

    function showSVGPopup(popupId, containerName, dot) {
        // Add event listener for Escape key to close the popup
        document.addEventListener('keydown', function (event) {
            if (event.key === 'Escape') {
                hidePopup();
            }
        });

        document.getElementById('overlay').style.display = 'block';
        document.getElementById(popupId).style.display = 'block';

        var container = document.getElementById(containerName);

        d3.select(container)
            .graphviz()
            .width(screen.width)
            .height(screen.height)
            .fit(true)
            .renderDot(classGraph_dot);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions