Hidden styles, e.g. ty: 'fl' and hd: true, are skipped when the element is created. This is fine, but trying to reach them afterwards via element.itemsData[0].it[i] in order to change their properties (such as color) dynamically means that the indices no longer correspond one-to-one with the original Lottie. So, one has to adjust the index to account for the styles that were skipped.
Hidden styles, e.g.
ty: 'fl'
andhd: true
, are skipped when the element is created. This is fine, but trying to reach them afterwards viaelement.itemsData[0].it[i]
in order to change their properties (such as color) dynamically means that the indices no longer correspond one-to-one with the original Lottie. So, one has to adjust the index to account for the styles that were skipped.The skipping happens because of https://github.com/airbnb/lottie-web/blob/master/player/js/elements/svgElements/SVGShapeElement.js#L214.
I imagine this would affect
lottie-api
as well, although I haven't checked.Would it be possible to keep them there, especially as styles have a
closed
property which is AFAICT already used to skip their rendering?