mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-18 13:11:05 +00:00
Fix vertical gradient rendering. Closes #108. Thanks aarr0n.
This commit is contained in:
parent
771ee6f89d
commit
c057b8b6d5
6 changed files with 21 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.7.11" };
|
||||
var fabric = fabric || { version: "0.7.12" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
19
dist/all.js
vendored
19
dist/all.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.7.11" };
|
||||
var fabric = fabric || { version: "0.7.12" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -3683,21 +3683,20 @@ fabric.util.string = {
|
|||
el,
|
||||
offset,
|
||||
colorStops = { },
|
||||
colorStopFromStyle;
|
||||
|
||||
colorStopFromStyle,
|
||||
coords = {
|
||||
x1: el.getAttribute('x1') || 0,
|
||||
y1: el.getAttribute('y1') || 0,
|
||||
x2: el.getAttribute('x2') || '100%',
|
||||
y2: el.getAttribute('y2') || 0
|
||||
};
|
||||
|
||||
for (var i = colorStopEls.length; i--; ) {
|
||||
el = colorStopEls[i];
|
||||
offset = parseInt(el.getAttribute('offset'), 10) / 100;
|
||||
colorStops[offset] = getColorStopFromStyle(el) || el.getAttribute('stop-color');
|
||||
}
|
||||
|
||||
var coords = {
|
||||
x1: el.getAttribute('x1') || 0,
|
||||
y1: el.getAttribute('y1') || 0,
|
||||
x2: el.getAttribute('x2') || '100%',
|
||||
y2: el.getAttribute('y2') || 0
|
||||
};
|
||||
|
||||
_convertPercentUnitsToValues(instance, coords);
|
||||
|
||||
return fabric.Gradient.create(ctx, {
|
||||
|
|
|
|||
4
dist/all.min.js
vendored
4
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -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.7.11",
|
||||
"version": "0.7.12",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -73,21 +73,20 @@
|
|||
el,
|
||||
offset,
|
||||
colorStops = { },
|
||||
colorStopFromStyle;
|
||||
|
||||
colorStopFromStyle,
|
||||
coords = {
|
||||
x1: el.getAttribute('x1') || 0,
|
||||
y1: el.getAttribute('y1') || 0,
|
||||
x2: el.getAttribute('x2') || '100%',
|
||||
y2: el.getAttribute('y2') || 0
|
||||
};
|
||||
|
||||
for (var i = colorStopEls.length; i--; ) {
|
||||
el = colorStopEls[i];
|
||||
offset = parseInt(el.getAttribute('offset'), 10) / 100;
|
||||
colorStops[offset] = getColorStopFromStyle(el) || el.getAttribute('stop-color');
|
||||
}
|
||||
|
||||
var coords = {
|
||||
x1: el.getAttribute('x1') || 0,
|
||||
y1: el.getAttribute('y1') || 0,
|
||||
x2: el.getAttribute('x2') || '100%',
|
||||
y2: el.getAttribute('y2') || 0
|
||||
};
|
||||
|
||||
_convertPercentUnitsToValues(instance, coords);
|
||||
|
||||
return fabric.Gradient.create(ctx, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue