Version 2.0.1 (#4707)

* removed gz and require

* added changelog and changes
This commit is contained in:
Andrea Bogazzi 2018-02-10 13:39:46 +01:00 committed by GitHub
parent 75ba9e1ac8
commit 75a71e3b51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 13812 deletions

2
.gitignore vendored
View file

@ -5,3 +5,5 @@
before_commit before_commit
/coverage/ /coverage/
.idea/ .idea/
/dist/fabric.require.js
/dist/fabric.min.js.gz

View file

@ -3,6 +3,7 @@ lib/
dist/all.min.js dist/all.min.js
dist/all.min.js.gz dist/all.min.js.gz
dist/fabric.min.js dist/fabric.min.js
dist/fabric.require.js
dist/fabric.min.js.gz dist/fabric.min.js.gz
.DS_Store .DS_Store
HEADER.js HEADER.js

View file

@ -1,3 +1,8 @@
**Version 2.0.1**
- fixed filter for blend image in WEBGL [#4706](https://github.com/kangax/fabric.js/pull/4706)
- fixed interactions between canvas toDataURL and multiplier + retina [#4705](https://github.com/kangax/fabric.js/pull/4705)
- fixed bug with originX and originY not invalidating the transform [#4703](https://github.com/kangax/fabric.js/pull/4703)
- fixed unwanted mutation on object enliving in fabric.Image [#4699](https://github.com/kangax/fabric.js/pull/4699)
**Version 2.0.0** **Version 2.0.0**
- final - final
- fix dataurl and svg export on retina and rounding [#4674](https://github.com/kangax/fabric.js/pull/4674) - fix dataurl and svg export on retina and rounding [#4674](https://github.com/kangax/fabric.js/pull/4674)

View file

@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ /*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: '2.0.0' }; var fabric = fabric || { version: '2.0.1' };
if (typeof exports !== 'undefined') { if (typeof exports !== 'undefined') {
exports.fabric = fabric; exports.fabric = fabric;
} }

18
dist/fabric.js vendored
View file

@ -1,7 +1,7 @@
/* build: `node build.js modules=ALL exclude=gestures,accessors minifier=uglifyjs` */ /* build: `node build.js modules=ALL exclude=gestures,accessors minifier=uglifyjs` */
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ /*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: '2.0.0-rc.4' }; var fabric = fabric || { version: '2.0.1' };
if (typeof exports !== 'undefined') { if (typeof exports !== 'undefined') {
exports.fabric = fabric; exports.fabric = fabric;
} }
@ -11629,7 +11629,7 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
var format = options.format || 'png', var format = options.format || 'png',
quality = options.quality || 1, quality = options.quality || 1,
multiplier = options.multiplier || options.enableRetinaScaling ? 1 : 1 / this.getRetinaScaling(), multiplier = (options.multiplier || 1) * (options.enableRetinaScaling ? 1 : 1 / this.getRetinaScaling()),
cropping = { cropping = {
left: options.left || 0, left: options.left || 0,
top: options.top || 0, top: options.top || 0,
@ -14246,7 +14246,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
* Returns coordinates of object's bounding rectangle (left, top, width, height) * Returns coordinates of object's bounding rectangle (left, top, width, height)
* the box is intented as aligned to axis of canvas. * the box is intented as aligned to axis of canvas.
* @param {Boolean} [absolute] use coordinates without viewportTransform * @param {Boolean} [absolute] use coordinates without viewportTransform
* @param {Boolean} [calculate] use coordinates of current position instead of .oCoords * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords / .aCoords
* @return {Object} Object with left, top, width, height properties * @return {Object} Object with left, top, width, height properties
*/ */
getBoundingRect: function(absolute, calculate) { getBoundingRect: function(absolute, calculate) {
@ -14433,7 +14433,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
prefix = this.group.transformMatrixKey(skipGroup) + sep; prefix = this.group.transformMatrixKey(skipGroup) + sep;
}; };
return prefix + this.top + sep + this.left + sep + this.scaleX + sep + this.scaleY + return prefix + this.top + sep + this.left + sep + this.scaleX + sep + this.scaleY +
sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.originX + sep + this.originY +
sep + this.width + sep + this.height + sep + this.strokeWidth + this.flipX + this.flipY; sep + this.width + sep + this.height + sep + this.strokeWidth + this.flipX + this.flipY;
}, },
@ -19351,7 +19351,8 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
* @param {Object} object Object to create an instance from * @param {Object} object Object to create an instance from
* @param {Function} callback Callback to invoke when an image instance is created * @param {Function} callback Callback to invoke when an image instance is created
*/ */
fabric.Image.fromObject = function(object, callback) { fabric.Image.fromObject = function(_object, callback) {
var object = fabric.util.object.clone(_object);
fabric.util.loadImage(object.src, function(img, error) { fabric.util.loadImage(object.src, function(img, error) {
if (error) { if (error) {
callback && callback(null, error); callback && callback(null, error);
@ -22121,13 +22122,12 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
alpha: 1, alpha: 1,
vertexSource: 'attribute vec2 aPosition;\n' + vertexSource: 'attribute vec2 aPosition;\n' +
'attribute vec2 aTexCoord;\n' +
'varying vec2 vTexCoord;\n' + 'varying vec2 vTexCoord;\n' +
'varying vec2 vTexCoord2;\n' + 'varying vec2 vTexCoord2;\n' +
'uniform mat3 uTransformMatrix;\n' + 'uniform mat3 uTransformMatrix;\n' +
'void main() {\n' + 'void main() {\n' +
'vTexCoord = aTexCoord;\n' + 'vTexCoord = aPosition;\n' +
'vTexCoord2 = (uTransformMatrix * vec3(aTexCoord, 1.0)).xy;\n' + 'vTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\n' +
'gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n' + 'gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n' +
'}', '}',

2
dist/fabric.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/fabric.min.js.gz vendored

Binary file not shown.

13800
dist/fabric.require.js vendored

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
"name": "fabric", "name": "fabric",
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.", "description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
"homepage": "http://fabricjs.com/", "homepage": "http://fabricjs.com/",
"version": "2.0.0", "version": "2.0.1",
"author": "Juriy Zaytsev <kangax@gmail.com>", "author": "Juriy Zaytsev <kangax@gmail.com>",
"contributors": [ "contributors": [
{ {