mazurinv / ZlataLoader.js

ZlataLoader is tiny javascript library to draw loaders for web sites
Apache License 2.0
1 stars 0 forks source link

redraw function missing #1

Closed JMFL92 closed 3 years ago

JMFL92 commented 3 years ago

hi Vladimir

thanks for your great library. but something sounds like a bug ... when I load the first time all is ok but when I load twice, I get the error

**Uncaught TypeError: ZlataLoader.prototype.instances[params.id].redraw is not a function**
    ZlataLoader file:///C:/Users/jmflo/Documents/Vol-à-Voile/GuideVV/GMapsVV/lib/zlataLoader.js-x.x.x/ZlataLoader.js:12
    wait_loading file:///C:/Users/jmflo/Documents/Vol-à-Voile/GuideVV/GMapsVV/igcmanager.js:67
    <anonymous> file:///C:/Users/jmflo/Documents/Vol-à-Voile/GuideVV/GMapsVV/igcmanager.js:596
    jQuery 9
    <anonymous> file:///C:/Users/jmflo/Documents/Vol-à-Voile/GuideVV/GMapsVV/igcmanager.js:594
    jQuery 13
ZlataLoader.js:12:52

indeed, this function is called when the object is already instanciated, but the function doesn't exists in your code ... a little patch please ?

best regards Jean-Marc

mazurinv commented 3 years ago

HI Jean-Marc! This should be instantiated only once. You can put this loader to some container and manage visibility of the loader by managing container CSS properties.

Honestly, I'm not interested in improving this widget right now. This widget was developed for flight booking website and it has only what was needed in that project. So, you can clone repo and improve it by yourself.

Best regards, Vladimir.