Skip to content

Commit

Permalink
fix: register iconset when vaadin-iconset is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
javier-godoy authored and paodb committed Apr 30, 2024
1 parent a284d9a commit 99ad284
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/codegen/modularize.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ const template = document.createElement('template');
template.innerHTML = `
</xsl:text>
<xsl:copy-of select="//fc-iconset/svg"/>
<xsl:text>`;
<xsl:text disable-output-escaping="yes">`;

customElements.whenDefined('vaadin-iconset').then(Iconset=>{
Iconset.register('</xsl:text
><xsl:value-of select="$family"/><xsl:text
>', 1000, template);
Expand All @@ -58,7 +59,7 @@ const iconset = Iconset.getIconset('</xsl:text
for (const name in aliases) {
iconset._icons[name] = iconset._icons[aliases[name]];
}

});
</xsl:text>
</xsl:template>

Expand Down
3 changes: 2 additions & 1 deletion src/main/javascript/font-awesome-iron-iconset/fab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/main/javascript/font-awesome-iron-iconset/far.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/main/javascript/font-awesome-iron-iconset/fas.js
Original file line number Diff line number Diff line change
Expand Up @@ -8950,11 +8950,12 @@ template.innerHTML = `
</defs>
</svg>`;

customElements.whenDefined('vaadin-iconset').then(Iconset=>{
Iconset.register('fas', 1000, template);

const iconset = Iconset.getIconset('fas');

for (const name in aliases) {
iconset._icons[name] = iconset._icons[aliases[name]];
}

});

0 comments on commit 99ad284

Please sign in to comment.