mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 11:54:47 +00:00
Bump version to 0.8.13.
This commit is contained in:
parent
f9568eb494
commit
505b1dba87
5 changed files with 53 additions and 20 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.12" };
|
||||
var fabric = fabric || { version: "0.8.13" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
63
dist/all.js
vendored
63
dist/all.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.12" };
|
||||
var fabric = fabric || { version: "0.8.13" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -5676,8 +5676,7 @@ fabric.util.string = {
|
|||
'ml': 'w-resize',
|
||||
'mt': 'n-resize',
|
||||
'mr': 'e-resize',
|
||||
'mb': 's-resize',
|
||||
'mtr': 'crosshair'
|
||||
'mb': 's-resize'
|
||||
},
|
||||
|
||||
utilMin = fabric.util.array.min,
|
||||
|
|
@ -5777,6 +5776,13 @@ fabric.util.string = {
|
|||
*/
|
||||
CURSOR: 'default',
|
||||
|
||||
/**
|
||||
* Cursor value used for rotation point
|
||||
* @constant
|
||||
* @type String
|
||||
*/
|
||||
ROTATION_CURSOR: 'crosshair',
|
||||
|
||||
/**
|
||||
* Default element class that's given to wrapper (div) element of canvas
|
||||
* @constant
|
||||
|
|
@ -6189,7 +6195,7 @@ fabric.util.string = {
|
|||
? 'scaleX'
|
||||
: (corner === 'mt' || corner === 'mb')
|
||||
? 'scaleY'
|
||||
: (corner === 'mtr')
|
||||
: (corner === 'mtr' || corner === 'mbr')
|
||||
? 'rotate'
|
||||
: (target.hasRotatingPoint)
|
||||
? 'scale'
|
||||
|
|
@ -6445,8 +6451,9 @@ fabric.util.string = {
|
|||
else {
|
||||
if (corner in cursorMap) {
|
||||
s.cursor = cursorMap[corner];
|
||||
}
|
||||
else {
|
||||
} else if (corner === 'mtr' || corner === 'mbr') {
|
||||
s.cursor = this.ROTATION_CURSOR
|
||||
} else {
|
||||
s.cursor = this.CURSOR;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -7712,6 +7719,10 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
|
|||
x: tl.x + (this.currentWidth/2 * cosTh),
|
||||
y: tl.y + (this.currentWidth/2 * sinTh)
|
||||
};
|
||||
var mbr = {
|
||||
x: tl.x + (this.currentWidth/2 * cosTh),
|
||||
y: tl.y + (this.currentWidth/2 * sinTh)
|
||||
};
|
||||
|
||||
// debugging
|
||||
|
||||
|
|
@ -7728,7 +7739,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
|
|||
// }, 50);
|
||||
|
||||
// clockwise
|
||||
this.oCoords = { tl: tl, tr: tr, br: br, bl: bl, ml: ml, mt: mt, mr: mr, mb: mb, mtr: mtr };
|
||||
this.oCoords = { tl: tl, tr: tr, br: br, bl: bl, ml: ml, mt: mt, mr: mr, mb: mb, mtr: mtr, mbr: mbr };
|
||||
|
||||
// set coordinates of the draggable boxes in the corners used to scale/rotate the image
|
||||
this._setCornerCoords();
|
||||
|
|
@ -8376,22 +8387,44 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
|
|||
}
|
||||
};
|
||||
|
||||
var rotationPointDistance = 40;
|
||||
coords.mtr.corner = {
|
||||
tl: {
|
||||
x: coords.mtr.x - sinHalfOffset + (sinTh * 40),
|
||||
y: coords.mtr.y - cosHalfOffset - (cosTh * 40)
|
||||
x: coords.mtr.x - sinHalfOffset + (sinTh * rotationPointDistance),
|
||||
y: coords.mtr.y - cosHalfOffset - (cosTh * rotationPointDistance)
|
||||
},
|
||||
tr: {
|
||||
x: coords.mtr.x + cosHalfOffset + (sinTh * 40),
|
||||
y: coords.mtr.y - sinHalfOffset - (cosTh * 40)
|
||||
x: coords.mtr.x + cosHalfOffset + (sinTh * rotationPointDistance),
|
||||
y: coords.mtr.y - sinHalfOffset - (cosTh * rotationPointDistance)
|
||||
},
|
||||
bl: {
|
||||
x: coords.mtr.x - cosHalfOffset + (sinTh * 40),
|
||||
y: coords.mtr.y + sinHalfOffset - (cosTh * 40)
|
||||
x: coords.mtr.x - cosHalfOffset + (sinTh * rotationPointDistance),
|
||||
y: coords.mtr.y + sinHalfOffset - (cosTh * rotationPointDistance)
|
||||
},
|
||||
br: {
|
||||
x: coords.mtr.x + sinHalfOffset + (sinTh * 40),
|
||||
y: coords.mtr.y + cosHalfOffset - (cosTh * 40)
|
||||
x: coords.mtr.x + sinHalfOffset + (sinTh * rotationPointDistance),
|
||||
y: coords.mtr.y + cosHalfOffset - (cosTh * rotationPointDistance)
|
||||
}
|
||||
};
|
||||
|
||||
var bottomRotationPointDistance = (-rotationPointDistance - this.currentHeight);
|
||||
|
||||
coords.mbr.corner = {
|
||||
tl: {
|
||||
x: coords.mbr.x - sinHalfOffset + (sinTh * bottomRotationPointDistance),
|
||||
y: coords.mbr.y - cosHalfOffset - (cosTh * bottomRotationPointDistance)
|
||||
},
|
||||
tr: {
|
||||
x: coords.mbr.x + cosHalfOffset + (sinTh * bottomRotationPointDistance),
|
||||
y: coords.mbr.y - sinHalfOffset - (cosTh * bottomRotationPointDistance)
|
||||
},
|
||||
bl: {
|
||||
x: coords.mbr.x - cosHalfOffset + (sinTh * bottomRotationPointDistance),
|
||||
y: coords.mbr.y + sinHalfOffset - (cosTh * bottomRotationPointDistance)
|
||||
},
|
||||
br: {
|
||||
x: coords.mbr.x + sinHalfOffset + (sinTh * bottomRotationPointDistance),
|
||||
y: coords.mbr.y + cosHalfOffset - (cosTh * bottomRotationPointDistance)
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
|
|||
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.8.12",
|
||||
"version": "0.8.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",
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"dependencies": {
|
||||
"canvas": ">=0.8.1",
|
||||
"jsdom": ">=0.2.3",
|
||||
"xmldom": ">=0.1.6"
|
||||
"xmldom": ">=0.1.7"
|
||||
},
|
||||
"engines": { "node": ">= 0.4.0 && <= 0.6.18" },
|
||||
"main": "./dist/all.js"
|
||||
|
|
|
|||
Loading…
Reference in a new issue