iobroker.mywebui 1.38.3 → 1.38.4
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
|
@@ -58,6 +58,13 @@ function svgShapeToPathData(el) {
|
|
|
58
58
|
const h = parseFloat(el.getAttribute('height') || 0);
|
|
59
59
|
return `M ${x},${y} H ${x+w} V ${y+h} H ${x} Z`;
|
|
60
60
|
}
|
|
61
|
+
if (tag === 'line') {
|
|
62
|
+
const x1 = el.getAttribute('x1') || 0;
|
|
63
|
+
const y1 = el.getAttribute('y1') || 0;
|
|
64
|
+
const x2 = el.getAttribute('x2') || 0;
|
|
65
|
+
const y2 = el.getAttribute('y2') || 0;
|
|
66
|
+
return `M ${x1},${y1} L ${x2},${y2}`;
|
|
67
|
+
}
|
|
61
68
|
if (tag === 'polyline' || tag === 'polygon') {
|
|
62
69
|
const pts = (el.getAttribute('points') || '').trim().split(/[\s,]+/);
|
|
63
70
|
if (pts.length < 2) return null;
|
|
@@ -683,6 +690,9 @@ async function _applyEffect(el, cfg) {
|
|
|
683
690
|
const size = parseFloat(cfg.size) || 8;
|
|
684
691
|
const svg = el.ownerSVGElement || el.closest('svg');
|
|
685
692
|
if (!svg) break;
|
|
693
|
+
// Convert line/polyline/circle/rect → <path> so GSAP MotionPath works
|
|
694
|
+
const { pathEl: motionPathEl, tempEl: tempMotionEl } = ensurePathEl(el);
|
|
695
|
+
if (tempMotionEl) _pathFlowEls.push(tempMotionEl);
|
|
686
696
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
687
697
|
const makeShape = () => {
|
|
688
698
|
let s;
|
|
@@ -729,7 +739,7 @@ async function _applyEffect(el, cfg) {
|
|
|
729
739
|
for (let i = 0; i < count; i++) {
|
|
730
740
|
const shape = makeShape();
|
|
731
741
|
gsap.to(shape, {
|
|
732
|
-
motionPath: { path:
|
|
742
|
+
motionPath: { path: motionPathEl, align: motionPathEl, autoRotate: true, alignOrigin: [0.5, 0.5], start: i / count, end: (i / count) + 1 },
|
|
733
743
|
duration: dur, repeat: -1, ease: 'none', delay: delay
|
|
734
744
|
});
|
|
735
745
|
}
|