@bebranded/bb-contents 1.0.69-beta → 1.0.70-beta
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/bb-contents.js +8 -6
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BeBranded Contents
|
|
3
3
|
* Contenus additionnels français pour Webflow
|
|
4
|
-
* @version 1.0.
|
|
4
|
+
* @version 1.0.70-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
// Configuration
|
|
36
36
|
const config = {
|
|
37
|
-
version: '1.0.
|
|
37
|
+
version: '1.0.70-beta',
|
|
38
38
|
debug: true, // Debug activé pour diagnostic
|
|
39
39
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
40
40
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -412,22 +412,24 @@
|
|
|
412
412
|
|
|
413
413
|
console.log(`🔍 [MARQUEE] Safari - Position initiale: ${currentPosition}px, transform: ${initialTransform}`);
|
|
414
414
|
|
|
415
|
-
// Fonction d'animation Safari optimisée
|
|
415
|
+
// Fonction d'animation Safari optimisée avec logique de reset corrigée
|
|
416
416
|
const animate = () => {
|
|
417
417
|
if (!isPaused) {
|
|
418
418
|
if (direction === (isVertical ? 'bottom' : 'right')) {
|
|
419
419
|
currentPosition += step;
|
|
420
|
+
// Reset Safari pour direction bottom/right - logique 3 copies
|
|
420
421
|
if (currentPosition >= 0) {
|
|
421
422
|
currentPosition = -(contentSize + gapSize);
|
|
422
423
|
}
|
|
423
424
|
} else {
|
|
424
425
|
currentPosition -= step;
|
|
425
|
-
|
|
426
|
-
|
|
426
|
+
// Reset Safari pour direction top/left - logique 3 copies corrigée
|
|
427
|
+
if (currentPosition <= -(contentSize + gapSize)) {
|
|
428
|
+
currentPosition = 0;
|
|
427
429
|
}
|
|
428
430
|
}
|
|
429
431
|
|
|
430
|
-
// Transform optimisé pour Safari
|
|
432
|
+
// Transform optimisé pour Safari
|
|
431
433
|
const transform = isVertical
|
|
432
434
|
? `translate3d(0, ${currentPosition}px, 0)`
|
|
433
435
|
: `translate3d(${currentPosition}px, 0, 0)`;
|