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

Create SVG Popup Button for Large Graphs #135

Open
jimbethancourt opened this issue Mar 16, 2025 · 0 comments
Open

Create SVG Popup Button for Large Graphs #135

jimbethancourt opened this issue Mar 16, 2025 · 0 comments

Comments

@jimbethancourt
Copy link
Collaborator

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);
    }
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

No branches or pull requests

1 participant