Tutorial: Kein Springen bei allen Steps - Bubble erst nach Clamp sichtbar
Nicht-Modal-Steps: visible nach requestAnimationFrame Clamp+Arrow Modal-Steps: visible nach 450ms Reposition + Clamp+Arrow Kein Step zeigt die Bubble mehr an der falschen Position.
Dieser Commit ist enthalten in:
@@ -1406,9 +1406,7 @@ const Tutorial = {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (self2._isActive && self2._currentStep === i) {
|
if (self2._isActive && self2._currentStep === i) {
|
||||||
self2._positionBubble(step);
|
self2._positionBubble(step);
|
||||||
// Jetzt erst sichtbar machen
|
// Clamp + Arrow ausfuehren, DANN sichtbar machen
|
||||||
self2._els.bubble.classList.add('visible');
|
|
||||||
// Clamp + Arrow nochmal ausfuehren
|
|
||||||
requestAnimationFrame(function() {
|
requestAnimationFrame(function() {
|
||||||
var bubble = self2._els.bubble;
|
var bubble = self2._els.bubble;
|
||||||
var bRect = bubble.getBoundingClientRect();
|
var bRect = bubble.getBoundingClientRect();
|
||||||
@@ -1432,6 +1430,8 @@ const Tutorial = {
|
|||||||
bubble.style.setProperty('--arrow-top', ay + 'px');
|
bubble.style.setProperty('--arrow-top', ay + 'px');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Erst jetzt sichtbar machen - Position ist korrekt
|
||||||
|
bubble.classList.add('visible');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 450);
|
}, 450);
|
||||||
@@ -1540,11 +1540,8 @@ const Tutorial = {
|
|||||||
bubble.classList.remove('tutorial-bubble-pulsing');
|
bubble.classList.remove('tutorial-bubble-pulsing');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sichtbar machen (bei Modal-Steps erst nach Reposition)
|
// Bubble erst nach Clamp-Check sichtbar machen (verhindert Springen)
|
||||||
var isModalBubbleStep = step.bubbleTarget && step.target && step.target.indexOf('#modal-') !== -1;
|
var isModalBubbleStep = step.bubbleTarget && step.target && step.target.indexOf('#modal-') !== -1;
|
||||||
if (!isModalBubbleStep) {
|
|
||||||
bubble.classList.add('visible');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sicherheitscheck: Bubble komplett im sichtbaren Bereich halten
|
// Sicherheitscheck: Bubble komplett im sichtbaren Bereich halten
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -1581,6 +1578,10 @@ const Tutorial = {
|
|||||||
bubble.style.setProperty('--arrow-top', arrowY + 'px');
|
bubble.style.setProperty('--arrow-top', arrowY + 'px');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Jetzt sichtbar machen (nach Clamp + Arrow) - nur fuer nicht-Modal Steps
|
||||||
|
if (!isModalBubbleStep) {
|
||||||
|
bubble.classList.add('visible');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren