2012-07-19 11:34:32 +00:00
|
|
|
/*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
2011-07-15 22:16:14 +00:00
|
|
|
|
2012-10-30 23:19:13 +00:00
|
|
|
var fabric = fabric || { version: "0.9.20" };
|
2011-08-05 23:00:26 +00:00
|
|
|
|
|
|
|
|
if (typeof exports != 'undefined') {
|
|
|
|
|
exports.fabric = fabric;
|
2011-08-11 19:18:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (typeof document != 'undefined' && typeof window != 'undefined') {
|
|
|
|
|
fabric.document = document;
|
|
|
|
|
fabric.window = window;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// assume we're running under node.js when document/window are not present
|
|
|
|
|
fabric.document = require("jsdom").jsdom("<!DOCTYPE html><html><head></head><body></body></html>");
|
|
|
|
|
fabric.window = fabric.document.createWindow();
|
2011-09-21 23:29:00 +00:00
|
|
|
}
|
|
|
|
|
|
2011-09-22 16:40:31 +00:00
|
|
|
/**
|
|
|
|
|
* True when in environment that supports touch events
|
|
|
|
|
* @property isTouchSupported
|
|
|
|
|
* @type boolean
|
|
|
|
|
*/
|
2012-07-29 10:38:01 +00:00
|
|
|
fabric.isTouchSupported = "ontouchstart" in fabric.document.documentElement;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* True when in environment that's probably Node.js
|
|
|
|
|
* @property isLikelyNode
|
|
|
|
|
* @type boolean
|
|
|
|
|
*/
|
|
|
|
|
fabric.isLikelyNode = typeof Buffer !== 'undefined' && typeof window === 'undefined';
|