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.

Make IdManager property public for SvgDocument

See original GitHub issue

Description

Make IdManager property public for SvgDocument: https://github.com/vvvv/SVG/blob/816af8f7ab3b2ffd41913a2c464db8d9b69a5d38/Source/SvgDocument.cs#L90

Example data

You can not get ReferencedElement for SvgUse object. This is limiting usage and custom rendering. https://github.com/vvvv/SVG/blob/816af8f7ab3b2ffd41913a2c464db8d9b69a5d38/Source/Document Structure/SvgUse.cs#L28

Used Versions

master branch

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
wieslawsoltescommented, Jul 25, 2019

Hm, I’m not sure it’s the best idea to make Parent writable, as semantically it really is read-only. Maybe better add a public function that does that re-rendering?

I am trying to solve this issue by my own right now, when I will find solution or hit another roadblock I will report here.

0reactions
wieslawsoltescommented, Jul 26, 2019

It is different from the first issue…

Looking at #529, it seems that only public setter are provided, but is there no fundamental solution ? At first glance it seems that nothing has been solved.

Its solves the styling issue when rendering SvgUse. The Parent is different for each referenced element from SvgUse. Currently this is only accessible internally.

Basically as I understand the spec, the SvgUse should be converted to SvgGroup in all cases, this solves the problem with Parent.

How is this solution ?

This is how svg spces defines processing of SvgUse elements. Basically they are converted to SvgGroup (usually deep copy) and special handling of attributes. This is best solution and according to spec, but its probably huge changes and breaking one. So I prefer to enable access to Parent property setter and solve without braking too much or nothing. Anyway, currently I have solved this by using reflection and setting internal _parent field.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class SvgDocument | SVG.NET API
Initializes a new instance of the SvgDocument class. Declaration. public SvgDocument(). Properties.
Read more >
SVG/Source/SvgElement.cs at master
USE_SOURCE_GENERATORS //optimization protected class PropertyAttributeTuple { public PropertyDescriptor Property; public SvgAttributeAttribute Attribute; } ...
Read more >
C# (CSharp) SvgDocument Examples
public SvgIdManager (SvgDocument doc, ISvgEventCaller caller, RemoteContext remoteContext) : base(doc) { FCaller = caller; RemoteContext = remoteContext; ...
Read more >
SvgDocument Class | Leadtools.Svg
Represents a Scalable Vector Graphics (SVG) document. ... The SvgDocument class represents a Scalable Vector Graphics (SVG) object. LEADTOOLS supports versions 1.
Read more >
XSLTForms/Print version
An easy error to make is to give the wrong URI when pointing to an external instance (in the src or resource attribute)....
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