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

matIcon: Use the symbol viewBox by default #16892

Closed
Sl1MBoy opened this issue Aug 27, 2019 · 1 comment · Fixed by #16896
Closed

matIcon: Use the symbol viewBox by default #16892

Sl1MBoy opened this issue Aug 27, 2019 · 1 comment · Fixed by #16896
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Sl1MBoy
Copy link

Sl1MBoy commented Aug 27, 2019

Feature Description

When I register an SVG icon set containing symbols I would like that matIcons utilize the viewBox from the symbol. While this PR allows us to set a viewBox value when registering the set, it will use the same value for all the symbols.

Use Case

This way we can have a resizable icon without any additional setting.

@Sl1MBoy Sl1MBoy added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Aug 27, 2019
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed feature This issue represents a new feature or feature request rather than a bug or bug fix labels Aug 27, 2019
@crisbeto crisbeto self-assigned this Aug 27, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Aug 27, 2019
Currently we have some special handling for the cases where an icon resolves to a `symbol` node, because cloning it directly won't display anything. Our workaround is set up by creating a blank SVG and copying over all of the children of the `symbol` into it, however this doesn't account for any attributes on the `symbol` (e.g. its `viewBox`).

These changes also copy over all the attributes.

Fixes angular#16892.
jelbourn pushed a commit that referenced this issue Sep 6, 2019
Currently we have some special handling for the cases where an icon resolves to a `symbol` node, because cloning it directly won't display anything. Our workaround is set up by creating a blank SVG and copying over all of the children of the `symbol` into it, however this doesn't account for any attributes on the `symbol` (e.g. its `viewBox`).

These changes also copy over all the attributes.

Fixes #16892.
jelbourn pushed a commit that referenced this issue Sep 9, 2019
Currently we have some special handling for the cases where an icon resolves to a `symbol` node, because cloning it directly won't display anything. Our workaround is set up by creating a blank SVG and copying over all of the children of the `symbol` into it, however this doesn't account for any attributes on the `symbol` (e.g. its `viewBox`).

These changes also copy over all the attributes.

Fixes #16892.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants