allow this to be used w/ Browserify

This commit is contained in:
Nick Desaulniers
2015-09-18 10:36:52 -07:00
parent 6891f79753
commit c722fd3520
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -5,7 +5,7 @@
* Copyright (c) 2014 Vadim Namniak
*/
(function() {
(function(root) {
'use strict';
var EL_WIDTH,EL_HEIGHT,MAX_TXT_WIDTH,MAX_TXT_HEIGHT;
@@ -284,5 +284,9 @@
}
};
window.CanvasTextWrapper = CanvasTextWrapper;
})();
if ('module' in root && 'exports' in module) {
module.exports = CanvasTextWrapper;
} else {
root.CanvasTextWrapper = CanvasTextWrapper;
}
})(this);
+1 -1
View File
File diff suppressed because one or more lines are too long