@biggive/components 202401021340.0.0 → 202401021422.0.0

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.
@@ -1673,7 +1673,11 @@ const BiggiveTotalizer = class {
1673
1673
  // We've seen the initial calculation exclude the ~30px per set of values end padding before,
1674
1674
  // and it's safe to err on the side of more copies to reduce the chance of abrupt early loop
1675
1675
  // ends, so we add a buffer of 40px to the calculation when deciding how many copies to use.
1676
- const sleeveCount = Math.max(1, Math.min(4, Math.ceil((2 * (40 + itemsWidth)) / containerWidth)));
1676
+ // const sleeveCount = Math.max(1, Math.min(4, Math.ceil((2 * (40 + itemsWidth)) / containerWidth)));
1677
+ // TODO Ultimately we'd like to get multiple copies working, or simplify. This
1678
+ // has proven very hard to iterate on pending a fix for DON-867 because
1679
+ // there is Angular-specific behaviour breaking the contents of copies.
1680
+ const sleeveCount = 1;
1677
1681
  this.host.style.setProperty('--ticker-end-left', `-${sleeveCount * 100}%`);
1678
1682
  const duration = Math.round((itemsWidth / 100) * sleeveCount);
1679
1683
  for (let ii = 1; ii <= sleeveCount; ii++) {
@@ -1702,12 +1706,9 @@ const BiggiveTotalizer = class {
1702
1706
  // Deep clone [all children of] the ticker items internal wrapper and append them, so the ticker can show items without
1703
1707
  // a blank break. Sleeve 2 and up will animate on delays per https://stackoverflow.com/a/45847760.
1704
1708
  setTimeout(() => {
1705
- tickerItemsInternalWrapper.childNodes.forEach((child) => {
1706
- console.log('Child element for cloning: ', child);
1707
- sleeve2 && sleeve2.appendChild(child.cloneNode(true)); // Deep clone all items.
1708
- sleeve3 && sleeve3.appendChild(child.cloneNode(true));
1709
- sleeve4 && sleeve4.appendChild(child.cloneNode(true));
1710
- });
1709
+ sleeve2 && sleeve2.appendChild(tickerItemsInternalWrapper.cloneNode(true));
1710
+ sleeve3 && sleeve3.appendChild(tickerItemsInternalWrapper.cloneNode(true));
1711
+ sleeve4 && sleeve4.appendChild(tickerItemsInternalWrapper.cloneNode(true));
1711
1712
  }, 800);
1712
1713
  setTimeout(() => {
1713
1714
  // In Angular contexts, it seems like we need to leave a little time before the calculations work.