Remove reference to window in util/misc.js for node compat.

This commit is contained in:
kangax 2011-12-09 16:24:37 -05:00
parent 326d662eec
commit cb7a4bdf86
8 changed files with 20 additions and 20 deletions

View file

@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.7.3" };
var fabric = fabric || { version: "0.7.4" };
if (typeof exports != 'undefined') {
exports.fabric = fabric;

16
dist/all.js vendored
View file

@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.7.3" };
var fabric = fabric || { version: "0.7.4" };
if (typeof exports != 'undefined') {
exports.fabric = fabric;
@ -1870,13 +1870,13 @@ fabric.Observable = {
* @param {DOMElement} element optional Element to associate with animation
*/
var requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
return fabric.window.requestAnimationFrame ||
fabric.window.webkitRequestAnimationFrame ||
fabric.window.mozRequestAnimationFrame ||
fabric.window.oRequestAnimationFrame ||
fabric.window.msRequestAnimationFrame ||
function(callback, element) {
window.setTimeout(callback, 1000 / 60);
fabric.window.setTimeout(callback, 1000 / 60);
};
})();
@ -11475,7 +11475,7 @@ fabric.Image.filters.RemoveWhite.fromObject = function(object) {
request(url, 'binary', function(body) {
var img = new Image();
img.src = new Buffer(body, 'binary');
callback(new fabric.Image(img));
callback(img);
});
};

4
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -46,7 +46,7 @@
request(url, 'binary', function(body) {
var img = new Image();
img.src = new Buffer(body, 'binary');
callback(new fabric.Image(img));
callback(img);
});
};

View file

@ -1,7 +1,7 @@
{
"name": "fabric",
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
"version": "0.7.3",
"version": "0.7.4",
"author": "Juriy Zaytsev <kangax@gmail.com>",
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
"repository": "git://github.com/kangax/fabric.js",

2
site

@ -1 +1 @@
Subproject commit f6eb9271f353c22f0ae061b5f9d6a06c53027281
Subproject commit 911dc61a4f96af50d519bb8ec45ba4a5362ce49b

View file

@ -121,13 +121,13 @@
* @param {DOMElement} element optional Element to associate with animation
*/
var requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
return fabric.window.requestAnimationFrame ||
fabric.window.webkitRequestAnimationFrame ||
fabric.window.mozRequestAnimationFrame ||
fabric.window.oRequestAnimationFrame ||
fabric.window.msRequestAnimationFrame ||
function(callback, element) {
window.setTimeout(callback, 1000 / 60);
fabric.window.setTimeout(callback, 1000 / 60);
};
})();