@morozeckiy/dd-lib 0.7.112 → 0.7.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2339,15 +2339,13 @@ class LibSvgViewerComponent {
|
|
|
2339
2339
|
const elements = svg.querySelectorAll(rule.selector);
|
|
2340
2340
|
elements.forEach(el => {
|
|
2341
2341
|
if (rule.attribute === 'fill' || rule.attribute === 'both' || !rule.attribute) {
|
|
2342
|
-
if (el.
|
|
2343
|
-
el.getAttribute('fill') !== 'none' &&
|
|
2342
|
+
if (el.getAttribute('fill') !== 'none' &&
|
|
2344
2343
|
el.getAttribute('fill') !== 'transparent') {
|
|
2345
2344
|
el.setAttribute('fill', rule.color);
|
|
2346
2345
|
}
|
|
2347
2346
|
}
|
|
2348
2347
|
if (rule.attribute === 'stroke' || rule.attribute === 'both' || !rule.attribute) {
|
|
2349
|
-
if (el.
|
|
2350
|
-
el.getAttribute('stroke') !== 'none' &&
|
|
2348
|
+
if (el.getAttribute('stroke') !== 'none' &&
|
|
2351
2349
|
el.getAttribute('stroke') !== 'transparent') {
|
|
2352
2350
|
el.setAttribute('stroke', rule.color);
|
|
2353
2351
|
}
|
|
@@ -2358,13 +2356,11 @@ class LibSvgViewerComponent {
|
|
|
2358
2356
|
applyColor(svg) {
|
|
2359
2357
|
const elements = svg.querySelectorAll('[stroke], [fill]');
|
|
2360
2358
|
elements.forEach(el => {
|
|
2361
|
-
if (el.
|
|
2362
|
-
el.getAttribute('stroke') !== 'none' &&
|
|
2359
|
+
if (el.getAttribute('stroke') !== 'none' &&
|
|
2363
2360
|
el.getAttribute('stroke') !== 'transparent') {
|
|
2364
2361
|
el.setAttribute('stroke', this.color);
|
|
2365
2362
|
}
|
|
2366
|
-
if (el.
|
|
2367
|
-
el.getAttribute('fill') !== 'none' &&
|
|
2363
|
+
if (el.getAttribute('fill') !== 'none' &&
|
|
2368
2364
|
el.getAttribute('fill') !== 'transparent') {
|
|
2369
2365
|
el.setAttribute('fill', this.color);
|
|
2370
2366
|
}
|