rich icon indicating copy to clipboard operation
rich copied to clipboard

Add Console.build_svg() function to get SVG and its size

Open jslvtr opened this issue 3 years ago • 0 comments

Type of changes

  • [ ] Bug fix
  • [x] New feature
  • [ ] Documentation / docstrings
  • [ ] Tests
  • [ ] Other

Checklist

  • [x] I've run the latest black with default args on new code.
  • [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • [x] I've added tests for new code.
  • [x] I accept that @willmcgugan may be pedantic in the code review.

Description

Add Console.build_svg() function to get SVG and its size.

Then changed the existing export_svg() to use the new build_svg() function, but only return the first value which is the SVG string. Power users could then use build_svg() to get the SVG code as well as the width and height.

This is related to issue #2431

jslvtr avatar Aug 04 '22 14:08 jslvtr