loading-bar icon indicating copy to clipboard operation
loading-bar copied to clipboard

Progress bar appears twice

Open ceremcem opened this issue 7 years ago • 7 comments

Livescript code for initialization ldBar:

bar = new ldBar '#myselector', do
    "stroke": '#f00'

HTML part (in pug):

div(id="myselector")

Result:

image

ceremcem avatar Jun 26 '17 09:06 ceremcem

These lines resolves the issue, but also breaks "no Javascript initialization" "feature".

ceremcem avatar Jun 26 '17 16:06 ceremcem

I'm having this issue as well. Any plans to release a patch to fix this?

dennisaskeland avatar Sep 07 '17 08:09 dennisaskeland

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?

ceremcem avatar Sep 07 '17 10:09 ceremcem

You may also want to try out this precompiled one and see if it resolves your case or not.

ceremcem avatar Sep 07 '17 11:09 ceremcem

@ceremcem that precompiled one worked like a charm, thanks!

dennisaskeland avatar Sep 07 '17 11:09 dennisaskeland

You're welcome :+1:

ceremcem avatar Sep 07 '17 11:09 ceremcem

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

zbryikt avatar Sep 07 '17 13:09 zbryikt