Skip to content

Commit

Permalink
Deploy latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
egon-development committed Aug 8, 2024
1 parent 4096853 commit a34c8aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app-latest-build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1194,9 +1194,9 @@ function DomainStoryRenderer(eventBus, styles, canvas, textRenderer, pathMap, co
return rest + "base64," + encodedColoredSvg;
}
function applyColorToIcon(pickedColor = DEFAULT_COLOR, iconSvg) {
const match = iconSvg.match(/fill[=:]/);
if (match && match.length > 0) {
return iconSvg.replaceAll(/fill="(?!none).*?"/g, `fill="${pickedColor}"`).replaceAll(/fill:\s*#\w*[; ]/g, `fill:${pickedColor}`);
const match = iconSvg.match(/fill=\s*"(?!none).*?"|fill:\s*[#r]\w*[;\s]{1}/);
if (match && match.some(it => it)) {
return iconSvg.replaceAll(/fill=\s*"(?!none).*?"/g, `fill="${pickedColor} "`).replaceAll(/fill:\s*[#r]\w*[;\s]{1}/g, `fill:${pickedColor};`);
} else {
const index = iconSvg.indexOf("<svg ") + 5;
return iconSvg.substring(0, index) + ' fill=" ' + pickedColor + '" ' + iconSvg.substring(index);
Expand Down
2 changes: 1 addition & 1 deletion app-latest-build/main.js.map

Large diffs are not rendered by default.

0 comments on commit a34c8aa

Please sign in to comment.