Fix gradient positioning in fabric.Gradient.forObject.

This commit is contained in:
kangax 2011-11-20 12:34:36 -05:00
parent f3a3e81ea2
commit 6d376dd588
4 changed files with 11 additions and 11 deletions

View file

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

10
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.6.12" };
var fabric = fabric || { version: "0.6.13" };
if (typeof exports != 'undefined') {
exports.fabric = fabric;
@ -3614,10 +3614,10 @@ fabric.util.string = {
_convertPercentUnitsToValues(obj, options);
var gradient = fabric.Gradient.create(ctx, {
x1: options.x1 - (obj.width / 2),
y1: options.y1 - (obj.height / 2),
x2: options.x2 - (obj.width / 2),
y2: options.y2 - (obj.height / 2),
x1: options.x1,
y1: options.y1,
x2: options.x2,
y2: options.y2,
colorStops: options.colorStops
});

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.6.12",
"version": "0.6.13",
"author": "Juriy Zaytsev <kangax@gmail.com>",
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
"repository": "git://github.com/kangax/fabric.js",

View file

@ -109,10 +109,10 @@
_convertPercentUnitsToValues(obj, options);
var gradient = fabric.Gradient.create(ctx, {
x1: options.x1 - (obj.width / 2),
y1: options.y1 - (obj.height / 2),
x2: options.x2 - (obj.width / 2),
y2: options.y2 - (obj.height / 2),
x1: options.x1,
y1: options.y1,
x2: options.x2,
y2: options.y2,
colorStops: options.colorStops
});