react-marquee icon indicating copy to clipboard operation
react-marquee copied to clipboard

Maybe translate3d() has better performance than simple position right?

Open jackey opened this issue 8 years ago • 2 comments

how about this one ?

    const style = {
      //'position': 'static',
      'position': 'relative',
      'display': 'inline-block',
      //'right': this.state.animatedWidth,
      'transform': `translate3d(-${this.state.animatedWidth}px, 0px, 0px)`,
      'whiteSpace': 'nowrap'
    };

jackey avatar Jan 08 '17 01:01 jackey

It is better indeed, this repo was built under the consideration of legacy browser support, so I choose setTimeout. You're very welcome to send some PRs to make it happen.

jasonslyvia avatar Jan 09 '17 01:01 jasonslyvia

Only measureText on ~~render~~ receiving props would help too

erikhuisman avatar May 09 '17 19:05 erikhuisman