Skip to content

Commit

Permalink
Create the canvas only if it does not already exist (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
rroux-gpsw authored and ygilquin-gpsw committed Apr 21, 2017
1 parent 858ec39 commit 27dcb79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display/image/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ FORGE.Image.prototype._setRenderMode = function(mode)
{
this._dom.style.backgroundRepeat = "no-repeat";
}
else if(this._renderMode === FORGE.Image.renderModes.CANVAS)
else if(this._renderMode === FORGE.Image.renderModes.CANVAS && this._canvas === null)
{
this._canvas = document.createElement("canvas");
this._canvas.style.position = "absolute";
Expand Down

0 comments on commit 27dcb79

Please # to comment.