Anima ignores element's current opacity
MichalBures opened this issue · 3 comments
MichalBures commented
Adding a new item into a world initializes it's opacity to 1 no matter the current value.
See http://jsfiddle.net/2SpzY/
Setting the opacity in Item.prototype.init
as opacity: this.dom.style.opacity
seems to fix it.
MichalBures commented
Okay, getting current opacity isn't that easy. But opacity: parseFloat(window.getComputedStyle(this.dom).opacity)
should do it.
lvivski commented
Anima also ignores Item transform, if it wasn't set with anima, 'cause it's not possible to decompose every transform value.
The main idea is to set Transforms and Opacity only via anima. But I'll do the opacity
thing in v0.2.0, it will be the next version, thanks.
jamland commented
agree, that is not handy. I was need use important opacity: .1 !important;
to see what i need via css