A
A
Alexander Karpov2015-12-30 16:59:52
Raphael
Alexander Karpov, 2015-12-30 16:59:52

How to center elements in SVG relative to Viewbox?

It is very necessary to place objects in the center of the Viewbox, thereby realizing the effect similar to which can be seen in normal maps, where when you enter an address, the object is centered. In the picture I tried to state the situation with the objects.
Basically, if I knew the center of the viewbox coordinate or could change it.
By the way, I can change the viewbox itself, but it comes out sooo expensive and deprives me of some effects.
I'm using SVGjs , maybe someone has a better command of the library and can advise a ready-made solution that this library provides. I haven't found it yet...
Thanks in advance!
(image)
61f582bc0d1a4302a9d219548a56f9ad.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2015-12-30
@Inkognitoss

jsfiddle.net/FZe7u/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question