@bebranded/bb-contents 1.0.72-beta → 1.0.73-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 +5 -12
- 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.73-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
// Configuration
|
|
43
43
|
const config = {
|
|
44
|
-
version: '1.0.
|
|
44
|
+
version: '1.0.73-beta',
|
|
45
45
|
debug: true, // Debug activé pour diagnostic
|
|
46
46
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
47
47
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -419,32 +419,25 @@
|
|
|
419
419
|
|
|
420
420
|
console.log(`🔍 [MARQUEE] Safari - Position initiale: ${currentPosition}px, transform: ${initialTransform}`);
|
|
421
421
|
|
|
422
|
-
// Fonction d'animation Safari avec
|
|
423
|
-
let frameCount = 0;
|
|
422
|
+
// Fonction d'animation Safari avec arrondi pour éviter les sauts
|
|
424
423
|
const animate = () => {
|
|
425
424
|
if (!isPaused) {
|
|
426
|
-
frameCount++;
|
|
427
|
-
|
|
428
425
|
if (direction === (isVertical ? 'bottom' : 'right')) {
|
|
429
426
|
currentPosition += step;
|
|
430
427
|
// Reset standard pour direction bottom/right - 3 copies
|
|
431
428
|
if (currentPosition >= 0) {
|
|
432
|
-
console.log(`🔄 [MARQUEE] Safari RESET bottom/right: ${currentPosition} → ${-(contentSize + gapSize)}`);
|
|
433
429
|
currentPosition = -(contentSize + gapSize);
|
|
434
430
|
}
|
|
435
431
|
} else {
|
|
436
432
|
currentPosition -= step;
|
|
437
433
|
// Reset standard pour direction top/left - 3 copies
|
|
438
434
|
if (currentPosition <= -(2 * (contentSize + gapSize))) {
|
|
439
|
-
console.log(`🔄 [MARQUEE] Safari RESET top/left: ${currentPosition} → ${-(contentSize + gapSize)}`);
|
|
440
435
|
currentPosition = -(contentSize + gapSize);
|
|
441
436
|
}
|
|
442
437
|
}
|
|
443
438
|
|
|
444
|
-
//
|
|
445
|
-
|
|
446
|
-
console.log(`📍 [MARQUEE] Safari position: ${currentPosition}px (frame ${frameCount})`);
|
|
447
|
-
}
|
|
439
|
+
// ARRONDI pour éviter les erreurs de précision JavaScript
|
|
440
|
+
currentPosition = Math.round(currentPosition * 100) / 100;
|
|
448
441
|
|
|
449
442
|
// Transform optimisé pour Safari
|
|
450
443
|
const transform = isVertical
|