mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 03:44:45 +00:00
Fix gradient positioning in fabric.Gradient.forObject.
This commit is contained in:
parent
f3a3e81ea2
commit
6d376dd588
4 changed files with 11 additions and 11 deletions
|
|
@ -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
10
dist/all.js
vendored
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue