Coder Social home page Coder Social logo

Library bugged on firefox about lax.js HOT 13 CLOSED

alexfoxy avatar alexfoxy commented on May 20, 2024
Library bugged on firefox

from lax.js.

Comments (13)

alexfoxy avatar alexfoxy commented on May 20, 2024

How many browsers have you tried it in...? It's pretty simple at it's core so I don't see why it wouldn't perform well in other browsers, but I haven't tried it in Firefox.

from lax.js.

WhereCanI avatar WhereCanI commented on May 20, 2024

I have only seen it lag in Chrome on android and in Safari on iPad. On desktop it works great for me no matter which browser I use. πŸ™‚

from lax.js.

alexfoxy avatar alexfoxy commented on May 20, 2024

Closing due to lack of information.

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

It lags on firefox a lot, IE and mobile browsers.

from lax.js.

alexfoxy avatar alexfoxy commented on May 20, 2024

@jojobagings78 do you have an example?

The demo (https://alexfox.dev/laxxx/) is silky smooth on my iPhone.

Perhaps you’re doing something wrong.

from lax.js.

WhereCanI avatar WhereCanI commented on May 20, 2024

I think you might be right about that. I have a scroll effect on my website sliding the headlines up faster than the content plus bringing the opacity down. At the same time I at moving my background image slowly depending on how much you scroll. So it might be because I am stretching the browser and not something with the module.

from lax.js.

alexfoxy avatar alexfoxy commented on May 20, 2024

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

I have fixed the issue however I cam across another issue now. On initial page load the offset of when the animation triggers is wrong. If I change page and go back with a route on react it then is correct.

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

Any idea @alexfoxy ?

from lax.js.

alexfoxy avatar alexfoxy commented on May 20, 2024

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

I am using SSR and this is what is used.

import lax from 'lax.js';

componentDidMount(){
  lax.setup()
  const update = () => {
    lax.update(window.scrollY)
    window.requestAnimationFrame(update)
  }
  window.requestAnimationFrame(update)
}

 <div id="animation_parralax">
  <div className="lax" data-lax-translate-y="(vh) 0, (-elh) 200" data-lax-opacity="offset=100" data-lax-anchor="#animation_parralax">IMAGE HERE</div>
  <div className="lax" data-lax-translate-y="(vh) 0, (-elh) -200" data-lax-opacity="offset=100" data-lax-anchor="#animation_parralax">IMAGE HERE</div>
 </div>

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

@alexfoxy I believe the above is correct

from lax.js.

jojobagings78 avatar jojobagings78 commented on May 20, 2024

I was able to fix the issue however on using this library on a ssr website it seems to require you to resize page for the parralax to work correctly any idea around this ?

from lax.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.