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

Save as png: When adding the graph screenshot node badges are not visible. #50

Closed
Tracked by #45
LaraMerdol opened this issue Dec 19, 2023 · 7 comments
Closed
Tracked by #45
Assignees
Milestone

Comments

@LaraMerdol
Copy link
Collaborator

LaraMerdol commented Dec 19, 2023

As per cytoscape#2219, anything outside the graph in the DOM is not rendered hence we should create our own png load method.
Screen Shot 2023-12-17 at 16 49 34
Screen Shot 2023-12-17 at 16 46 45

@LaraMerdol LaraMerdol changed the title 1) When adding the graph screenshot node badges are not visible. Save as png: When adding the graph screenshot node badges are not visible. Dec 19, 2023
@LaraMerdol LaraMerdol self-assigned this Dec 19, 2023
@LaraMerdol
Copy link
Collaborator Author

@LaraMerdol
Copy link
Collaborator Author

pngFull( options:any) method added to the cytoscape-visual-cues.
sample - 2024-01-08T173750 036

@LaraMerdol
Copy link
Collaborator Author

Here are some notes regarding the pngFull method. This method uses html2canvas library, which is a new dependency added to the visual-cues extension. However, html2canvas library may not recognize certain elements such as 'cy-context-menus-cxt-menu' and 'cy-panzoom'. To use this method, these elements need to be added to the ignoreElementClasses parameter of the function.

LaraMerdol added a commit that referenced this issue Jan 9, 2024
@LaraMerdol
Copy link
Collaborator Author

LaraMerdol commented Jan 14, 2024

Margin has been added to the canvas to encapsulate the cues at the edges of the graph bounding box in the PNG.

Screen Shot 2024-01-14 at 22 29 39

@LaraMerdol
Copy link
Collaborator Author

Pull request open cytoscape.js-visual-cues/pull/15

@ugurdogrusoz
Copy link
Collaborator

Looks good, thanks. Let's wait until the PR is merged into the extension and we start using it from the master branch before we close this issue.

@LaraMerdol
Copy link
Collaborator Author

The pull request was merged. #15

@LaraMerdol LaraMerdol added this to the Version 1.0 milestone Jun 11, 2024
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

3 participants