loading-bar
loading-bar copied to clipboard
Progress bar appears twice
Livescript code for initialization ldBar:
bar = new ldBar '#myselector', do
"stroke": '#f00'
HTML part (in pug):
div(id="myselector")
Result:
These lines resolves the issue, but also breaks "no Javascript initialization" "feature".
I'm having this issue as well. Any plans to release a patch to fix this?
Yes, of course. I'll probably cover this one in this PR but it's a decision up to @zbryikt to drop "no javascript initialization" feature.
Anyway, did you try disabling that feature, which resolves the problem for now?
You may also want to try out this precompiled one and see if it resolves your case or not.
@ceremcem that precompiled one worked like a charm, thanks!
You're welcome :+1:
hi guys, sorry for taking so long to reply here.
Initialization by JS will add a 'ldBar' class to target element, while no JS init runs after document is ready, so if we run JS initialization before document is ready then there will be another bar generated by no JS init code.
but no Javascript initialization is probably still needed, so I added a check to see if there is already an ldBar instance created. related commit here: 6c83d77f3