Closed devleaks closed 4 years ago
Don't ask me why, but I noticed that <svg class="leaflet-ant-path"...> is missing an animation-duration
attribute... If I add it (in the browser inspector), it crawls. :-) But why doesn't it get written when bundling with rollup?
I tracked this one down. After I noticed some missing styles, I found the function that does attach them (_calculateAnimationSpeed). I looked at the generated code and found that for some obscure buggy reason, rollup strips the following piece of code from _calculateAnimationSpeed():
a = ["-webkit-", "-moz-", "-ms-", "-o-", ""]
.map(function(t) {
return "".concat(t, "animation-duration: ").concat(i);
})
.join(";");
Array.from(o, function(t) {
(t.style.cssText = a), t.setAttribute("data-animated", "true");
});
If I add this piece of code in the rollup generated file, it works.
Type:
Environment:
I'm going to open a PR:
Description: When I assemble a simple es6 script with rollup, ants don't craw! The display of the polyline remains static. Tried to resume() but no progress. Any idea?
Please clone this repo as a test case.
I don't know webpack. I'd be curious to see if a webpack build works. This may be a rollup issue.
Thanks for your help.