|
@ -84,7 +84,7 @@ Canvas.prototype.inspect = function(){ |
|
|
|
|
|
|
|
|
Canvas.prototype.getContext = function(contextId){ |
|
|
Canvas.prototype.getContext = function(contextId){ |
|
|
if ('2d' == contextId) { |
|
|
if ('2d' == contextId) { |
|
|
var ctx = new Context2d(this); |
|
|
var ctx = this._context2d || (this._context2d = new Context2d(this)); |
|
|
this.context = ctx; |
|
|
this.context = ctx; |
|
|
ctx.canvas = this; |
|
|
ctx.canvas = this; |
|
|
return ctx; |
|
|
return ctx; |
|
|