mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-26 02:30:26 +00:00
Build distribution. Fix unit tests. Version 0.9.27.
This commit is contained in:
parent
41997f0ce4
commit
b330c9d715
6 changed files with 22 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.9.26" };
|
||||
var fabric = fabric || { version: "0.9.27" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
20
dist/all.js
vendored
20
dist/all.js
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/* build: `node build.js modules=ALL` */
|
||||
/*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.9.26" };
|
||||
var fabric = fabric || { version: "0.9.27" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -851,10 +851,16 @@ Cufon.registerEngine('canvas', (function() {
|
|||
function renderBackground() {
|
||||
g.save();
|
||||
|
||||
g.fillStyle = options.backgroundColor;
|
||||
|
||||
var left = 0, lineNum = 0, boundaries = [{ left: 0 }];
|
||||
|
||||
if (options.backgroundColor) {
|
||||
g.save();
|
||||
g.fillStyle = options.backgroundColor;
|
||||
g.translate(0, font.ascent);
|
||||
g.fillRect(0, 0, width + 10, (-font.ascent + font.descent) * lines);
|
||||
g.restore();
|
||||
}
|
||||
|
||||
if (options.textAlign === 'right') {
|
||||
g.translate(lineOffsets[lineNum], 0);
|
||||
boundaries[0].left = lineOffsets[lineNum] * scale;
|
||||
|
|
@ -904,9 +910,10 @@ Cufon.registerEngine('canvas', (function() {
|
|||
|
||||
var charWidth = Number(glyph.w || font.w) + letterSpacing;
|
||||
|
||||
// only draw background when there's some kind of value
|
||||
if (options.backgroundColor) {
|
||||
// only draw text-background when there's some kind of value
|
||||
if (options.textBackgroundColor) {
|
||||
g.save();
|
||||
g.fillStyle = options.textBackgroundColor;
|
||||
g.translate(0, font.ascent);
|
||||
g.fillRect(0, 0, charWidth + 10, -font.ascent + font.descent);
|
||||
g.restore();
|
||||
|
|
@ -13827,7 +13834,8 @@ fabric.Image.filters.Pixelate.fromObject = function(object) {
|
|||
lineHeight: this.lineHeight,
|
||||
strokeStyle: this.strokeStyle,
|
||||
strokeWidth: this.strokeWidth,
|
||||
backgroundColor: this.backgroundColor
|
||||
backgroundColor: this.backgroundColor,
|
||||
textBackgroundColor: this.textBackgroundColor
|
||||
});
|
||||
|
||||
// update width, height
|
||||
|
|
|
|||
10
dist/all.min.js
vendored
10
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.9.26",
|
||||
"version": "0.9.27",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
'path': null,
|
||||
'strokeStyle': '',
|
||||
'backgroundColor': '',
|
||||
'textBackgroundColor': '',
|
||||
'useNative': true
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue