-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Unclear purpose of $mdIconProvider's optional IconSize #1785
Description
Until #1679 is resolved or settled, I was trying to use $mdIconProvider's optional iconSize property to generate a range of icon sizes to use in my application.
The documentation when using $mdIconProvider to register an iconset and use optional iconSize is:
iconSize
(optional)
string
Number indicating the width and height of the icons in the set. All icons in the icon set must be the same size. Default size is 24.
At first, I thought I could use this to generate a range of icon sizes:
_.map(_.range(6, 72, 6), function(i) {
$mdIconProvider
.iconSet('action' + i, '../styles/images/icons/material-design/action-icons.svg', i)
.iconSet('alert' + i, '../styles/images/icons/material-design/alert-icons.svg', i)
.iconSet('av' + i, '../styles/images/icons/material-design/av-icons.svg', i)
.iconSet('communication' + i, '../styles/images/icons/material-design/communication-icons.svg', i)
.iconSet('content' + i, '../styles/images/icons/material-design/content-icons.svg', i)
.iconSet('device' + i, '../styles/images/icons/material-design/device-icons.svg', i)
.iconSet('editor' + i, '../styles/images/icons/material-design/editor-icons.svg', i)
.iconSet('file' + i, '../styles/images/icons/material-design/file-icons.svg', i)
.iconSet('hardware' + i, '../styles/images/icons/material-design/hardware-icons.svg', i)
.iconSet('icons' + i, '../styles/images/icons/material-design/icons-icons.svg', i)
.iconSet('image' + i, '../styles/images/icons/material-design/image-icons.svg', i)
.iconSet('maps' + i, '../styles/images/icons/material-design/maps-icons.svg', i)
.iconSet('navigation' + i, '../styles/images/icons/material-design/navigation-icons.svg', i)
.iconSet('notification' + i, '../styles/images/icons/material-design/notification-icons.svg', i)
.iconSet('social' + i, '../styles/images/icons/material-design/social-icons.svg', i)
.iconSet('toggle' + i, '../styles/images/icons/material-design/toggle-icons.svg', i)
.iconSet('core' + i, '../styles/images/icons/material-design/core-icons.svg', i)
});
However, when I use them in my html:
<md-icon md-svg-icon="navigation60:close" alt="close"></md-icon>
I still get a 24 x 24 SVG image (which is the default size of my *-icons.svg files).
What exactly is the purpose of this optional IconSize property on mdIconProvider?
If it is to set the overall size of all icons in the set, then perhaps #1679 is affecting me here as well.
If it's simply to tell the mdIconProvider that all the icons are x by x I don't get why or when this optional parameter would ever be needed.