Skip to content

Options don't work as expected? #2

@mepatterson

Description

@mepatterson

My expectations with the following options set are:

  • The marquee will not be moving when the page loads (paused: true)
  • If I make the .reel container big enough to fit everything, it will not create any clones and no need to run the marquee (clonesMin:0 and clonesOverflow: false)
  • When the animation does run via .resume(), it will run backwards (reversed: true)
  • If I made the container a relative width, I could expand the window and the animation would stop if everything fits (autoStop: true)

None of these things work as expected. As soon as the page loads, it just starts scrolling the marquee, no matter what I change in the options. Am I fundamentally missing something or misunderstanding all the options? Because this library animates really nicely and would seem to fit my needs better than anything else I've found, if I could just get it to work as I'm expecting...

const reeller = new Reeller({
      container: '.reel',
      wrapper: '.reel-wrapper',
      itemSelector: '.reel-item',
      clonesMin: 0,
      clonesOverflow: false,
      paused: true,
      reversed: true,
      autoStop: true
    })
    <div class="reel w-96 rounded border">
      <div class="reel-wrapper flex text-sm uppercase">
        <div class="reel-item mx-2 flex-none">Lorem</div>
        <div class="reel-item mx-2 flex-none">ipsum</div>
        <div class="reel-item mx-2 flex-none">dolor</div>
        <div class="reel-item mx-2 flex-none">sit</div>
        <div class="reel-item mx-2 flex-none">amet</div>
        <div class="reel-item mx-2 flex-none">consectetur</div>
        <div class="reel-item mx-2 flex-none">adipisicing</div>
        <div class="reel-item mx-2 flex-none">elit</div>
      </div>
    </div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions