resetting shape _mdf state when it has no effects applied but is part of a shape modifier
diff --git a/player/index.html b/player/index.html
index dc7d02c..4310955 100644
--- a/player/index.html
+++ b/player/index.html
@@ -178,6 +178,7 @@
};
// lottie.setQuality('low');
anim = lottie.loadAnimation(animData);
+ anim.setSubframe(false)
</script>
</body>
diff --git a/player/js/utils/shapes/ShapeModifiers.js b/player/js/utils/shapes/ShapeModifiers.js
index 32f9f98..585f1a8 100644
--- a/player/js/utils/shapes/ShapeModifiers.js
+++ b/player/js/utils/shapes/ShapeModifiers.js
@@ -21,11 +21,13 @@
ShapeModifier.prototype.initModifierProperties = function(){};
ShapeModifier.prototype.addShapeToModifier = function(){};
ShapeModifier.prototype.addShape = function(data){
- if(!this.closed){
+ if (!this.closed) {
+ // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.
+ data.sh.container.addDynamicProperty(data.sh);
var shapeData = {shape:data.sh, data: data, localShapeCollection:shapeCollection_pool.newShapeCollection()};
this.shapes.push(shapeData);
this.addShapeToModifier(shapeData);
- if(this._isAnimated) {
+ if (this._isAnimated) {
data.setAsAnimated();
}
}
diff --git a/player/js/utils/shapes/ShapeProperty.js b/player/js/utils/shapes/ShapeProperty.js
index 34dd68d..cf8ee72 100644
--- a/player/js/utils/shapes/ShapeProperty.js
+++ b/player/js/utils/shapes/ShapeProperty.js
@@ -118,10 +118,13 @@
}
function processEffectsSequence() {
- if(this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
+ if (this.elem.globalData.frameId === this.frameId) {
+ return;
+ } else if (!this.effectsSequence.length) {
+ this._mdf = false;
return;
}
- if(this.lock) {
+ if (this.lock) {
this.setVValue(this.pv);
return;
}