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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "mywebui",
4
- "version": "1.38.04",
4
+ "version": "1.38.05",
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.04",
3
+ "version": "1.38.05",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -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.style.strokeDasharray = `${dashLen} ${gapLen}`;
679
- if (flowColor) el.style.stroke = flowColor;
680
- _flowDashAnim = el.animate(
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
- const svg = el.ownerSVGElement || el.closest('svg');
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(el);
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 = () => {