mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-25 05:33:44 +00:00
Fix node text rendering. Version 1.1.14
This commit is contained in:
parent
c65b1f5e7d
commit
0be6a5d556
6 changed files with 9 additions and 29 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "1.1.13" };
|
||||
var fabric = fabric || { version: "1.1.14" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
14
dist/all.js
vendored
14
dist/all.js
vendored
|
|
@ -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.13" };
|
||||
var fabric = fabric || { version: "1.1.14" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -10995,24 +10995,14 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
var hypotHalf = this.getWidth() / 2;
|
||||
var xHalf = Math.cos(angle) * hypotHalf;
|
||||
var yHalf = Math.sin(angle) * hypotHalf;
|
||||
|
||||
var hypotFull = this.getWidth();
|
||||
var xFull = Math.cos(angle) * hypotFull;
|
||||
var yFull = Math.sin(angle) * hypotFull;
|
||||
|
||||
var x = this.left;
|
||||
var y = this.top;
|
||||
|
||||
if (this.originX === 'center') {
|
||||
if (this.originX === 'center' || this.originX === 'right') {
|
||||
// move half left
|
||||
x -= xHalf;
|
||||
y -= yHalf;
|
||||
}
|
||||
else if (this.originX === 'right') {
|
||||
// move full left
|
||||
x -= xFull;
|
||||
y -= yFull;
|
||||
}
|
||||
|
||||
return { x: x, y: y };
|
||||
}
|
||||
|
|
|
|||
8
dist/all.min.js
vendored
8
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": "1.1.13",
|
||||
"version": "1.1.14",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -203,24 +203,14 @@
|
|||
var hypotHalf = this.getWidth() / 2;
|
||||
var xHalf = Math.cos(angle) * hypotHalf;
|
||||
var yHalf = Math.sin(angle) * hypotHalf;
|
||||
|
||||
var hypotFull = this.getWidth();
|
||||
var xFull = Math.cos(angle) * hypotFull;
|
||||
var yFull = Math.sin(angle) * hypotFull;
|
||||
|
||||
var x = this.left;
|
||||
var y = this.top;
|
||||
|
||||
if (this.originX === 'center') {
|
||||
if (this.originX === 'center' || this.originX === 'right') {
|
||||
// move half left
|
||||
x -= xHalf;
|
||||
y -= yHalf;
|
||||
}
|
||||
else if (this.originX === 'right') {
|
||||
// move full left
|
||||
x -= xFull;
|
||||
y -= yFull;
|
||||
}
|
||||
|
||||
return { x: x, y: y };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue