structure adjustment
This commit is contained in:
1 parent
af78bf0381
commit
22dbcf8db2
25 files changed
+519
-138
No files matched your search
@@ -9,6 +9,13 @@ function createUse(type, id) {
|
||||
return use;
|
||||
}
|
||||
|
||||
function changeIcon(svg, type, id) {
|
||||
if (svg instanceof HTMLElement) {
|
||||
svg.replaceChildren(createUse(type, id));
|
||||
}
|
||||
return svg;
|
||||
}
|
||||
|
||||
function createIcon(type, id, style) {
|
||||
const svg = document.createElementNS(svgns, 'svg');
|
||||
svg.appendChild(createUse(type, id));
|
||||
@@ -34,5 +41,6 @@ function resolveIcon(container) {
|
||||
|
||||
export {
|
||||
createIcon,
|
||||
changeIcon,
|
||||
resolveIcon
|
||||
}
|
||||
Reference in new issue
Block a user