From 91399b50ef971cc4479866c4340017cca8e28ba7 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Wed, 29 Jun 2011 03:00:23 +0200 Subject: [PATCH] Use the shadow method in Fonts.ctx --- fonts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fonts.js b/fonts.js index 19d16cbed..e25b2ae2d 100644 --- a/fonts.js +++ b/fonts.js @@ -84,10 +84,9 @@ var Fonts = { }, get ctx() { - delete this.ctx; var ctx = document.createElement("canvas").getContext("2d"); ctx.scale(1 / kScalePrecision, 1); - return this.ctx = ctx; + return shadow(this, "ctx", ctx); }, measureText: function fonts_measureText(text) {