@bebranded/bb-contents 1.0.103 → 1.0.105
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 +13 -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.105
|
|
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.105');
|
|
36
36
|
|
|
37
37
|
// Configuration
|
|
38
38
|
const config = {
|
|
39
|
-
version: '1.0.
|
|
39
|
+
version: '1.0.105',
|
|
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)
|
|
@@ -320,9 +320,13 @@
|
|
|
320
320
|
${isVertical ? 'min-height: 100px;' : ''}
|
|
321
321
|
`;
|
|
322
322
|
|
|
323
|
-
//
|
|
324
|
-
|
|
323
|
+
// Créer 3 copies pour le défilement infini
|
|
324
|
+
const repeatBlock1 = mainBlock.cloneNode(true);
|
|
325
|
+
const repeatBlock2 = mainBlock.cloneNode(true);
|
|
326
|
+
|
|
325
327
|
scrollContainer.appendChild(mainBlock);
|
|
328
|
+
scrollContainer.appendChild(repeatBlock1);
|
|
329
|
+
scrollContainer.appendChild(repeatBlock2);
|
|
326
330
|
mainContainer.appendChild(scrollContainer);
|
|
327
331
|
|
|
328
332
|
element.innerHTML = '';
|
|
@@ -579,10 +583,11 @@
|
|
|
579
583
|
requestAnimationFrame(animate);
|
|
580
584
|
};
|
|
581
585
|
|
|
582
|
-
// Démarrer l'animation
|
|
583
|
-
|
|
586
|
+
// Démarrer l'animation immédiatement (les copies sont déjà créées)
|
|
587
|
+
// Utiliser requestAnimationFrame pour garantir le rendu
|
|
588
|
+
requestAnimationFrame(() => {
|
|
584
589
|
animate();
|
|
585
|
-
}
|
|
590
|
+
});
|
|
586
591
|
|
|
587
592
|
// Pause au survol pour Safari
|
|
588
593
|
if (element.getAttribute('bb-marquee-pause') === 'true') {
|