@bebranded/bb-contents 1.0.137 → 1.0.138
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 +15 -8
- 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.138
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
window._bbContentsInitialized = true;
|
|
33
33
|
|
|
34
34
|
// Log de démarrage simple (une seule fois)
|
|
35
|
-
console.log('bb-contents | v1.0.
|
|
35
|
+
console.log('bb-contents | v1.0.138');
|
|
36
36
|
|
|
37
37
|
// Configuration
|
|
38
38
|
const config = {
|
|
39
|
-
version: '1.0.
|
|
39
|
+
version: '1.0.138',
|
|
40
40
|
debug: false, // Debug désactivé pour rendu propre
|
|
41
41
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
42
42
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -478,11 +478,18 @@
|
|
|
478
478
|
speed, direction, gap, isVertical, useAutoHeight, contentSize, gapSize
|
|
479
479
|
});
|
|
480
480
|
} else {
|
|
481
|
-
// Solution standard : créer les copies
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
// Solution standard : créer les copies seulement si elles n'existent pas déjà
|
|
482
|
+
// (elles ont peut-être été créées pour le calcul de hauteur en horizontal)
|
|
483
|
+
const existingCopies = scrollContainer.querySelectorAll('div');
|
|
484
|
+
const hasCopies = existingCopies.length >= 3; // mainBlock + 2 copies
|
|
485
|
+
|
|
486
|
+
if (!hasCopies) {
|
|
487
|
+
// Créer les copies maintenant (les navigateurs non-Safari gèrent mieux)
|
|
488
|
+
const repeatBlock1 = mainBlock.cloneNode(true);
|
|
489
|
+
const repeatBlock2 = mainBlock.cloneNode(true);
|
|
490
|
+
scrollContainer.appendChild(repeatBlock1);
|
|
491
|
+
scrollContainer.appendChild(repeatBlock2);
|
|
492
|
+
}
|
|
486
493
|
|
|
487
494
|
// Solution standard pour autres navigateurs
|
|
488
495
|
this.initStandardAnimation(element, scrollContainer, mainBlock, {
|