fabric.js/HEADER.js

24 lines
748 B
JavaScript
Raw Normal View History

2012-01-20 19:29:51 +00:00
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.8.28" };
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
}
/**
* True when in environment that supports touch events
* @property isTouchSupported
* @type boolean
*/
2011-09-21 23:29:00 +00:00
fabric.isTouchSupported = "ontouchstart" in fabric.document.documentElement;