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

Resolved issue 519 #520

Conversation

pranavraikar01
Copy link

Issue Title:

Fixes issue #519

Type of change ☑️

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist: ☑️

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

How Has This Been Tested? ⚙️

  • Initially, the conversion function used a custom context-based serialization (ctx.getSerializedSvg()), which was not working correctly, as the SVG output did not accurately reflect the canvas content, leading to a blank or incorrectly rendered SVG.
  • I replaced the approach by directly using the canvas's toDataURL("image/png") method to create an image element within the SVG.
  • Tested the updated code by generating SVG files and opening them in multiple browsers to ensure that the canvas content was centered and correctly displayed.
  • Verified that the issue with the canvas being only horizontally centered but not vertically centered was fixed by adjusting the offsets.
  • Confirmed that the final SVG output matched the appearance of the canvas, with the content fully visible and centered.

Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
draw-it-out ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 7:48am
draw-it-out-zbd1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 7:48am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to Our repository.🎊 Thank you so much for taking the time to point this out.

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