I dragged this image into a perspective view and successfully linked parameters to the text elements.
But within Ignition I wanted to format the text as centered. So I drilled down to the contents of the SVG and applied a center format like so:
But the text remains left justified:
Is it possible to do what I want, and justify the text from within Ignition, or can I only do this by applying some sort of justification directly in the SVG (and if so, how)?
I can see how that works by changing where the X/Y coords are with respect to the text. I’m guessing that is probably the best I can do within the SVG itself.
Of course I just discovered that my SVG editor of choice (Affinity Designer) doesn’t support “text-anchor” … . So every time I want to edit my master SVG project I’ll have to manually manipulate the text-anchor of the exported SVG (and yes I know about Inkscape)
Yea that look’s odd. Looks like this may be a potential bug in Perspective. Would you mind posting your test SVG so I can take a look at how the attributes are being applied?
As you can see the x coord of the text is same as the cx coord of the circle.
Given that my editor of choice doesn’t support creating the text-anchor, I may take the less painful path and just slap the text into the view from within Perspective.
It looks like the text-anchor attribute doesn’t get applied during import or when adding the property value manually. I will file a ticket for this bug. This is a bit tedious but as a workaround you can add the attribute textAnchor: middle to the style object of the text element like so:
Ah hm, yes they are both an svg attribute and style, seems igntion only will recognize it as a style.(probably)
And im guessing most svg editors will put it as an attribute
I’m glad to find this workaround to center text, but is there a bug fix in the works to apply the textAnchor attribute in an embedded SVG? I am using 8.1.18 and still have this issue.
Also, I've found (v8.1.47) that when embedding text (from Plan SVGs exported from Inkscape), that text is included into an element "text" group which contains "t-span" sub-elements. I can't get text to be positioned correctly unless I delete the whole sub-elements folder that includes the t-span(s), and then add a "text" prop to the parent and set the text. Then the text appears in the same location as saved in the Inkscape