Update Grounded Wren's SVG icon control script

This commit is contained in:
Helen Chong 2024-06-23 12:24:16 +08:00
parent d3adf1eb47
commit 407bd106ba
1 changed files with 22 additions and 1 deletions

View File

@ -322,6 +322,17 @@ registerNamespace("GW.Controls.SVGLib", function(ns) {
ICON_CITATION ICON_CITATION
); );
iconEl.insertAdjacentHTML("afterbegin",
`<style>
.icon {
fill: black; /*Default color*/
fill: var(--icon-color);
width: 16px;
height: 16px;
}
</style>`
);
createChildElement( createChildElement(
iconEl, iconEl,
ns.ElementTypes.title, ns.ElementTypes.title,
@ -415,6 +426,16 @@ registerNamespace("GW.Controls", function(ns) {
} }
//Markup //Markup
this.insertAdjacentHTML("beforebegin",
`<style>
gw-icon {
display: inline-flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
</style>`
);
this.appendChild( this.appendChild(
ns.SVGLib.createIcon( ns.SVGLib.createIcon(
this.iconObj, this.iconObj,