From 1b097a63a3aff84f51ed326e53b1233283b298e5 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sun, 16 Jan 2011 18:57:45 -0600 Subject: [PATCH] Fix strict mode complaints in firefox 4. --- include/canvas.js | 5 ++++- include/webutil.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/canvas.js b/include/canvas.js index 0e15a651..00905a58 100644 --- a/include/canvas.js +++ b/include/canvas.js @@ -10,7 +10,7 @@ /*jslint browser: true, white: false, bitwise: false */ /*global window, Util, Base64 */ -Canvas = function(conf) { +function Canvas(conf) { conf = conf || {}; // Configuration var that = {}, // Public API interface @@ -391,6 +391,9 @@ that.resize = function(width, height, true_color) { that.clear = function() { that.resize(640, 20); conf.ctx.clearRect(0, 0, c_width, c_height); + + // No benefit over default ("source-over") in Chrome and firefox + //conf.ctx.globalCompositeOperation = "copy"; }; that.stop = function() { diff --git a/include/webutil.js b/include/webutil.js index 67c86678..d0f054de 100644 --- a/include/webutil.js +++ b/include/webutil.js @@ -11,7 +11,7 @@ /*global window, document */ // Globals defined here -var WebUtil = {}, $; +var WebUtil = {}, $D; /* * Simple DOM selector by ID