Skip to content

Commit

Permalink
setting parents context when destroying
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymovin committed Feb 12, 2017
1 parent 9516869 commit 638e96b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion player/js/elements/CompElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ICompElement.prototype.getElements = function(){
};

ICompElement.prototype.destroy = function(){
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
var i,len = this.layers.length;
for( i = 0; i < len; i+=1 ){
if(this.elements[i]){
Expand Down
2 changes: 1 addition & 1 deletion player/js/elements/ImageElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ IImageElement.prototype.renderFrame = function(parentMatrix){
};

IImageElement.prototype.destroy = function(){
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
this.innerElem = null;
};
2 changes: 1 addition & 1 deletion player/js/elements/ShapeElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ IShapeElement.prototype.renderStroke = function(styleData,viewData){
};

IShapeElement.prototype.destroy = function(){
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
this.shapeData = null;
this.viewData = null;
this.parentContainer = null;
Expand Down
2 changes: 1 addition & 1 deletion player/js/elements/canvasElements/CVCompElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ CVCompElement.prototype.destroy = function(){
}
this.layers = null;
this.elements = null;
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
};
CVCompElement.prototype.checkLayers = CanvasRenderer.prototype.checkLayers;
CVCompElement.prototype.buildItem = CanvasRenderer.prototype.buildItem;
Expand Down
2 changes: 1 addition & 1 deletion player/js/elements/canvasElements/CVImageElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ CVImageElement.prototype.renderFrame = function(parentMatrix){

CVImageElement.prototype.destroy = function(){
this.img = null;
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
};
2 changes: 1 addition & 1 deletion player/js/elements/canvasElements/CVShapeElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,6 @@ CVShapeElement.prototype.destroy = function(){
this.canvasContext = null;
this.stylesList.length = 0;
this.viewData.length = 0;
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
};

2 changes: 1 addition & 1 deletion player/js/elements/svgElements/SVGTextElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,5 @@ SVGTextElement.prototype.renderFrame = function(parentMatrix){


SVGTextElement.prototype.destroy = function(){
this._parent.destroy.call();
this._parent.destroy.call(this._parent);
};

0 comments on commit 638e96b

Please sign in to comment.