Feedback regarding blog post for nested SVGs

  • Josh
    Asked on April 3, 2020 at 2:36 PM

    Hello, I just came across this blog post https://www.jotform.com/blog/better-positioning-and-transforming-with-nested-svgs/ While nothing in it is decidedly wrong, it's definitely not the "correct" way to go about doing what Denis describes in the article. This leads me to believe that the article may be out of date, or could use some updating as Denis increases his knowledge of SVG. Since you don't list "Date Published" on blog posts, I have no way of evaluating how out-of-date the feedback may or may not be. I recommend you add that piece of information.

    In the post, the following "However, in SVG format, elements are always turned around the top left corner of the SVG drawing area." - this is not true - CSS has a "transform-origin" property you can use to correct this.


    The post also says:

    if you want to change the position of a figure that possibly consists of dozens of individual elements, the “x” and “y” attribute, as well as the other position defining attributes, like “cx”, “cy”, and “d” (for the “” element), have to be altered.

    This is what <g transform="translate(x,y)"> was built for - super easy way of doing that without resorting to nested SVGs, an over-complicated solution to the problem.


    I don't want to throw Denis under the bus! The blog post is good! I just have no way to directly deliver him this feedback, and have no way of knowing if this post was written in 2020 or 2008.

  • Welvin Support Team Lead
    Replied on April 3, 2020 at 4:50 PM

    Hello Josh,

    Thank you for the feedback. I've sent this to our marketing team for review. 

    There is also a comment box at the bottom of the post. Feel free to comment to suggest or post your feedback about the author's article.