Coder Social home page Coder Social logo

Comments (8)

tjenkinson avatar tjenkinson commented on August 16, 2024

Hi. Please can you try v2.3.0 and if it still doesn't work provide an example that runs on https://stackblitz.com/ ?

from dynamic-marquee.

rakeshnayak360 avatar rakeshnayak360 commented on August 16, 2024

Hi, updated version to 2.3.0. Switch the tab, there is new error called ''String missing 'px' suffix".
And after build, same issue as mentioned in title of this issue.
Demo link: https://stackblitz.com/edit/angular-router-basic-example-hjrksg?file=app%2Fviews%2Flogin%2Flogin.component.ts

from dynamic-marquee.

rakeshnayak360 avatar rakeshnayak360 commented on August 16, 2024

Hi, updated version to 2.3.0. Switch the tab, there is new error called ''String missing 'px' suffix".
And after build, same issue as mentioned in title of this issue.
Demo link: https://stackblitz.com/edit/angular-router-basic-example-hjrksg?file=app%2Fviews%2Flogin%2Flogin.component.ts

from dynamic-marquee.

tjenkinson avatar tjenkinson commented on August 16, 2024

I should be able to prevent that error but I think the root of the issue here is not cleaning up before the component tears down.

In the components where you use the marquee could you call clear() on it in a ngOnDestroy function?

More info here: https://angular.io/guide/lifecycle-hooks

from dynamic-marquee.

rakeshnayak360 avatar rakeshnayak360 commented on August 16, 2024

Core issue is, with the following setup, marquee behaves strangely in dev env and prod env
setup:

this.$marquee = document.getElementById("marquee")!;
    this.marquee = new Marquee(this.$marquee, {
      rate: -100,
      startOnScreen: false,
    });

In dev env, marquee works fine i.e text move from left to right.

But in prod, (After ng build), run the dist/ folder.
text appears directly on screen i.e right side of the screen. Why it behaves so ?

preview of the out put: (sorry i am not able to attach picture)
in Dev:

--------------------------------------------------
|                                      Starts here|
--------------------------------------------------

in Prod:

--------------------------------------------------
| Starts here                                     |
--------------------------------------------------

from dynamic-marquee.

rakeshnayak360 avatar rakeshnayak360 commented on August 16, 2024

Any updates @tjenkinson ?

from dynamic-marquee.

tjenkinson avatar tjenkinson commented on August 16, 2024

@rakeshnayak360 please have a look at https://stackblitz.com/edit/angular-router-basic-example-pwzpdf

This updates to the latest version and adds the tear down function which hopefully solves the problems.

from dynamic-marquee.

rakeshnayak360 avatar rakeshnayak360 commented on August 16, 2024

$window.style.position = 'relative'; in marquee.js fixed my issue. Thanks for the update. You made my day :)

from dynamic-marquee.

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.