iobroker.mywebui 1.38.4 → 1.38.5
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.
package/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -675,9 +675,13 @@ async function _applyEffect(el, cfg) {
|
|
|
675
675
|
const gapLen = parseFloat(cfg.gapLen) || 20;
|
|
676
676
|
const flowColor = cfg.color || null;
|
|
677
677
|
const flowDir = cfg.direction === 'reverse' ? 'reverse' : 'normal';
|
|
678
|
-
el
|
|
679
|
-
|
|
680
|
-
|
|
678
|
+
// if el is <svg>, animate the inner stroke element
|
|
679
|
+
const dashTarget = el.tagName.toLowerCase() === 'svg'
|
|
680
|
+
? (el.querySelector('path,line,polyline,polygon,rect,circle,ellipse') || el)
|
|
681
|
+
: el;
|
|
682
|
+
dashTarget.style.strokeDasharray = `${dashLen} ${gapLen}`;
|
|
683
|
+
if (flowColor) dashTarget.style.stroke = flowColor;
|
|
684
|
+
_flowDashAnim = dashTarget.animate(
|
|
681
685
|
[{ strokeDashoffset: dashLen + gapLen }, { strokeDashoffset: 0 }],
|
|
682
686
|
{ duration: dur * 1000, iterations: Infinity, easing: 'linear', direction: flowDir, delay: delay * 1000 }
|
|
683
687
|
);
|
|
@@ -688,10 +692,14 @@ async function _applyEffect(el, cfg) {
|
|
|
688
692
|
const shapeType = cfg.shape || 'triangle';
|
|
689
693
|
const flowColor = cfg.color || '#0066ff';
|
|
690
694
|
const size = parseFloat(cfg.size) || 8;
|
|
691
|
-
|
|
695
|
+
// if el is <svg>, find the inner stroke element to follow
|
|
696
|
+
const pathTarget = el.tagName.toLowerCase() === 'svg'
|
|
697
|
+
? (el.querySelector('path,line,polyline,polygon,rect,circle,ellipse') || el)
|
|
698
|
+
: el;
|
|
699
|
+
const svg = pathTarget.ownerSVGElement || pathTarget.closest('svg') || el;
|
|
692
700
|
if (!svg) break;
|
|
693
701
|
// Convert line/polyline/circle/rect → <path> so GSAP MotionPath works
|
|
694
|
-
const { pathEl: motionPathEl, tempEl: tempMotionEl } = ensurePathEl(
|
|
702
|
+
const { pathEl: motionPathEl, tempEl: tempMotionEl } = ensurePathEl(pathTarget);
|
|
695
703
|
if (tempMotionEl) _pathFlowEls.push(tempMotionEl);
|
|
696
704
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
697
705
|
const makeShape = () => {
|