iobroker.mywebui 1.37.91 → 1.37.93
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
|
@@ -413,7 +413,10 @@ class AnimationInstance {
|
|
|
413
413
|
const effect = this.cfg.effect;
|
|
414
414
|
|
|
415
415
|
if (effect === 'motionPath' && this.cfg.pathId) {
|
|
416
|
-
|
|
416
|
+
// Search in shadow root first — document.getElementById doesn't see shadow DOM elements
|
|
417
|
+
const rootNode = this.element.getRootNode();
|
|
418
|
+
const pathEl = (rootNode instanceof ShadowRoot ? rootNode : document).getElementById(this.cfg.pathId)
|
|
419
|
+
?? document.getElementById(this.cfg.pathId);
|
|
417
420
|
if (!pathEl) { console.warn('[AnimationService] motionPath: path element not found:', this.cfg.pathId); return; }
|
|
418
421
|
this.tween = gsap.to(this.element, {
|
|
419
422
|
duration: parseFloat(this.cfg.duration) || 1,
|
|
@@ -422,8 +425,8 @@ class AnimationInstance {
|
|
|
422
425
|
yoyo: this.cfg.yoyo === true,
|
|
423
426
|
paused: true,
|
|
424
427
|
motionPath: {
|
|
425
|
-
path:
|
|
426
|
-
align: this.cfg.alignToPath ?
|
|
428
|
+
path: pathEl,
|
|
429
|
+
align: this.cfg.alignToPath ? pathEl : false,
|
|
427
430
|
autoRotate: this.cfg.orientToPath === true,
|
|
428
431
|
alignOrigin: [0.5, 0.5],
|
|
429
432
|
start: this.cfg.valueFrom ? parseFloat(this.cfg.valueFrom) / 100 : 0,
|
|
@@ -388,6 +388,10 @@ let ScreenViewer = class ScreenViewer extends BaseCustomWebComponentConstructorA
|
|
|
388
388
|
if (window.location.href.includes('runtime.html')) return;
|
|
389
389
|
const shouldPause = window.appShell?._editorAnimationsEnabled === true;
|
|
390
390
|
if (shouldPause) {
|
|
391
|
+
// Stop GSAP-driven animations and effects (background-color, effects, etc.)
|
|
392
|
+
cleanupAnimations(this._rootShadow);
|
|
393
|
+
cleanupEffects(this._rootShadow);
|
|
394
|
+
// Also pause any remaining CSS @keyframes animations
|
|
391
395
|
if (!this._editorPauseSheet) {
|
|
392
396
|
this._editorPauseSheet = new CSSStyleSheet();
|
|
393
397
|
this._editorPauseSheet.replaceSync('*, ::before, ::after { animation-play-state: paused !important; transition: none !important; }');
|
|
@@ -395,8 +399,14 @@ let ScreenViewer = class ScreenViewer extends BaseCustomWebComponentConstructorA
|
|
|
395
399
|
if (!this._rootShadow.adoptedStyleSheets.includes(this._editorPauseSheet))
|
|
396
400
|
this._rootShadow.adoptedStyleSheets = [...this._rootShadow.adoptedStyleSheets, this._editorPauseSheet];
|
|
397
401
|
} else {
|
|
402
|
+
// Remove CSS pause sheet
|
|
398
403
|
if (this._editorPauseSheet)
|
|
399
404
|
this._rootShadow.adoptedStyleSheets = this._rootShadow.adoptedStyleSheets.filter(s => s !== this._editorPauseSheet);
|
|
405
|
+
// Restart GSAP animations if screen content is present
|
|
406
|
+
if (this._rootShadow.childElementCount > 0) {
|
|
407
|
+
scanAndApplyAnimations(this._rootShadow).catch(() => {});
|
|
408
|
+
scanAndApplyEffects(this._rootShadow).catch(() => {});
|
|
409
|
+
}
|
|
400
410
|
}
|
|
401
411
|
}
|
|
402
412
|
_onEditorAnimationsChanged = (e) => this._applyEditorAnimationState();
|