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

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