Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVGView svgNode property made open var instead of fileprivate var #108

Closed
deathByLiche opened this issue Mar 20, 2017 · 5 comments
Closed
Assignees
Milestone

Comments

@deathByLiche
Copy link

It would be nice if the svgNode property on the SVGView was open, not fileprivate. Currently there is no way to dynamically change the svg on the SVGView without changing the filename. This prevents a previously parsed svg node from being set on the SVGView with the proper content mode without creating a new instance of SVGView.

@ystrot ystrot self-assigned this Mar 28, 2017
@ystrot
Copy link
Member

ystrot commented Mar 28, 2017

Not sure I understand your use case. svgNode actually an internal property which might be removed in future. SVGView should be used to display SVG files from the storyboard. If you want to change SVG dynamically, you can always use MacawView and SVGParser directly.

@deathByLiche
Copy link
Author

The use case I have is dynamically changing the svg (using SVGParser to get a new root node) while also getting the benefit of the content mode resizing provided in the SVGView class.

MacawView provides the ability to change the svg root node, but doesn't allow for content mode scaling. I'd like the ability to set a new root node on the SVGView, just like you can set a new filename and have it re-render for the correct content mode.

@ystrot ystrot added this to the 0.9.0 milestone May 10, 2017
@ystrot
Copy link
Member

ystrot commented May 11, 2017

Sorry for late response. I got your point, but still thinking that using SVGView with dynamic content might be too complicated. A better solution would be to add content mode to MacawView. And I think we can implement it in one of upcoming releases.

For now you can just copy&paste SVGView implementation to your code and customize it as you like.

@deathByLiche
Copy link
Author

Awesome that's good to hear!

@ystrot ystrot modified the milestones: 0.9.0, 0.9.1 Sep 19, 2017
@ystrot ystrot modified the milestones: 0.9.1, 0.9.x Nov 28, 2017
@ystrot ystrot modified the milestones: 0.9.x, 0.9.2 Jun 21, 2018
@ystrot
Copy link
Member

ystrot commented Jun 28, 2018

MacawView now supports content mode, so closing this issue.

@ystrot ystrot closed this as completed Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants