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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "mywebui",
4
- "version": "1.38.03",
4
+ "version": "1.38.04",
5
5
  "titleLang": {
6
6
  "en": "mywebui",
7
7
  "de": "mywebui",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.mywebui",
3
- "version": "1.38.03",
3
+ "version": "1.38.04",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -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: el, align: el, autoRotate: true, alignOrigin: [0.5, 0.5], start: i / count, end: (i / count) + 1 },
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
  }