question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to centre or right align for fit SVG to viewer

See original GitHub issue

This is for scenarios where the dimensions for the viewer and the canvas are not the same (the canvas is the rect that has a white background by default).

When clicking zoom to fit button, it fits the canvas to the left of the screen. It would be better if there is a way to align this canvas to the centre or to the right (without having to play around with bounds for fitSelectionToViewer method).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
neilyoungcommented, Mar 6, 2018

OK, thanks. Never mind, please don’t forget 😃

0reactions
chrvadalacommented, Jul 30, 2018

Feature released with 2.18

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I center an SVG in a div?
I have an SVG that I am trying to center in a div. The div has a width of 900px. The SVG has...
Read more >
Align SVG Icons to Text and Say Goodbye to Font Icons
The icons align to your text easily and can be modified by changing the font-size of the element. There is no clearly defined...
Read more >
alignment-baseline - SVG: Scalable Vector Graphics | MDN
Aligns the top of the aligned subtree with the top of the line box. Aligns the center of the aligned subtree with the...
Read more >
Coordinate Systems, Transformations and Units — SVG 2
Align the midpoint Y value of the element's 'viewBox' with the midpoint Y value of the SVG viewport.
Read more >
Move And Scale SVG Graphics With The viewBox Attribute
The SVG canvas and the SVG viewport, through which you see the canvas operate on independent coordinate systems. The systems are aligned by ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found