From 219980d0469a294db784cbbb2ab4c5592fe5310d Mon Sep 17 00:00:00 2001 From: Roberto Ferro Date: Mon, 29 Dec 2014 17:52:15 +0100 Subject: [PATCH 1/2] Make sure fabric is always global Later code assumes fabric is a gloabl symbol --- HEADER.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HEADER.js b/HEADER.js index 9a2cef3a..efb9fa9b 100644 --- a/HEADER.js +++ b/HEADER.js @@ -8,6 +8,8 @@ if (typeof exports !== 'undefined') { if (typeof document !== 'undefined' && typeof window !== 'undefined') { fabric.document = document; fabric.window = window; + // ensure globality even if entire library were function wrapped + window.fabric = fabric; } else { // assume we're running under node.js when document/window are not present From d2b435da16bd60a341a3d10434270ab5badf4673 Mon Sep 17 00:00:00 2001 From: Roberto Ferro Date: Wed, 31 Dec 2014 12:32:32 +0100 Subject: [PATCH 2/2] Make sure fabric is always global Later code assumes fabric is a global symbol and this fails when library is function wrapped as in Meteor.js packaging system. --- HEADER.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HEADER.js b/HEADER.js index efb9fa9b..24a98105 100644 --- a/HEADER.js +++ b/HEADER.js @@ -8,7 +8,7 @@ if (typeof exports !== 'undefined') { if (typeof document !== 'undefined' && typeof window !== 'undefined') { fabric.document = document; fabric.window = window; - // ensure globality even if entire library were function wrapped + // ensure globality even if entire library were function wrapped (as in Meteor.js packaging system) window.fabric = fabric; } else {