Build distribution. Version 1.1.17

This commit is contained in:
kangax 2013-06-01 13:18:33 +02:00
parent 6e41088614
commit 8d84a5c551
5 changed files with 22 additions and 15 deletions

View file

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

21
dist/all.js vendored
View file

@ -1,7 +1,7 @@
/* build: `node build.js modules=ALL exclude=gestures` */
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "1.1.16" };
var fabric = fabric || { version: "1.1.17" };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
@ -2164,6 +2164,16 @@ fabric.Collection = {
return _requestAnimFrame.apply(fabric.window, arguments);
};
/**
* Returns klass "Class" object of given fabric.Object type
* @memberOf fabric.util
* @param {String} type Type of object (eg. 'circle')
* @return {Object} klass "Class"
*/
function getKlass(type) {
return fabric[fabric.util.string.camelize(fabric.util.string.capitalize(type))];
}
/**
* Loads image element from given url and passes it to a callback
* @memberOf fabric.util
@ -2195,10 +2205,6 @@ fabric.Collection = {
*/
function enlivenObjects(objects, callback) {
function getKlass(type) {
return fabric[fabric.util.string.camelize(fabric.util.string.capitalize(type))];
}
function onLoaded() {
if (++numLoadedObjects === numTotalObjects) {
if (callback) {
@ -2215,7 +2221,7 @@ fabric.Collection = {
if (!o.type) {
return;
}
var klass = getKlass(o.type);
var klass = fabric.util.getKlass(o.type);
if (klass.async) {
klass.fromObject(o, function (o, error) {
if (!error) {
@ -2451,6 +2457,7 @@ fabric.Collection = {
fabric.util.falseFunction = falseFunction;
fabric.util.animate = animate;
fabric.util.requestAnimFrame = requestAnimFrame;
fabric.util.getKlass = getKlass;
fabric.util.loadImage = loadImage;
fabric.util.enlivenObjects = enlivenObjects;
fabric.util.groupSVGElements = groupSVGElements;
@ -5306,7 +5313,7 @@ fabric.util.string = {
if (this.type === 'linear') {
gradient = ctx.createLinearGradient(
this.coords.x1, this.coords.y1, this.coords.x2 || ctx.canvas.width, this.coords.y2);
this.coords.x1, this.coords.y1, this.coords.x2, this.coords.y2);
}
else if (this.type === 'radial') {
gradient = ctx.createRadialGradient(

12
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

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