(open, onClose, refs)
| 6007 | const textWidth = inner.scrollWidth; |
| 6008 | const containerWidth = wrap.offsetWidth; |
| 6009 | wrap.style.overflow = origOverflow || ""; |
| 6010 | if (textWidth > containerWidth && containerWidth > 0) { |
| 6011 | const gap = 48; |
| 6012 | const clone = textEl.cloneNode(true); |
| 6013 | clone.removeAttribute("data-uri"); |
| 6014 | clone.style.pointerEvents = "none"; |
| 6015 | clone.style.marginLeft = gap + "px"; |
| 6016 | inner.appendChild(clone); |
| 6017 | const scrollDist = textWidth + gap; |
| 6018 | const duration = Math.max(5e3, scrollDist / 20 * 1e3); |
| 6019 | wrap.classList.add("nsc-scrolling"); |
| 6020 | const anim = inner.animate( |
| 6021 | [ |
| 6022 | { transform: "translateX(0)" }, |
| 6023 | { transform: `translateX(-${scrollDist}px)` } |
| 6024 | ], |
| 6025 | { |
no outgoing calls
no test coverage detected