Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
fix(marquee): Fixes marquee width calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Mar 3, 2018
1 parent 65160cd commit 5851dd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/directives/marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ const marquee = el => {

setStyles({
height: `${scroller.offsetHeight}px`,
width: `${scroller.scrollWidth}px`
width: 'auto'
})(scroller)

if (scroller.scrollWidth > el.offsetWidth) {
addClasses('marquee-container')(el)
addClasses('marquee')(scroller)
setStyles({
'animation-duration': `${animationDuration > 10 ? animationDuration : 10}s` // min 10s
'animation-duration': `${animationDuration > 10 ? animationDuration : 10}s`, // min 10s
width: `${scroller.scrollWidth}px`
})(scroller)
} else {
removeClasses('marquee-container')(el)
Expand Down

0 comments on commit 5851dd8

Please sign in to comment.