diff --git a/lib/canvas.js b/lib/canvas.js index cc2f659..adcb393 100644 --- a/lib/canvas.js +++ b/lib/canvas.js @@ -84,7 +84,7 @@ Canvas.prototype.inspect = function(){ Canvas.prototype.getContext = function(contextId){ if ('2d' == contextId) { - var ctx = new Context2d(this); + var ctx = this._context2d || (this._context2d = new Context2d(this)); this.context = ctx; ctx.canvas = this; return ctx;