smarquee icon indicating copy to clipboard operation
smarquee copied to clipboard

Fails to work unless element initially has long text

Open ddurham2 opened this issue 5 years ago • 0 comments

I've found that with the prescribed process of...

<div id="smarquee">x</div>
...
var s = new Smarquee(...)
s.init()
...
s.updateText()
...

That it will not correctly scroll, not scroll when updateText() is called unless the div initially had an long text, causing overflow. Above, where it's content is only 'x', it will not work properly. It seems to be related to a condition that init() made in the beginning (namely, that needsMarquee was initially false) that it doesn't set things up completely for when updateText is called.

ddurham2 avatar Dec 24 '20 08:12 ddurham2