Skip to content

Commit

Permalink
Version 3.5.1 (fabricjs#5975)
Browse files Browse the repository at this point in the history
* built and changelog

* built and changelog
  • Loading branch information
asturur authored and Hristo Chakarov committed Jul 27, 2021
1 parent 5323ffe commit 741cfdb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about: Create a report with a reproducible test case in a JSFIDDLE

<!-- BUG TEMPLATE -->
## Version
2.4.0
3.5.1

## Test Case
http://jsfiddle.net/fabricjs/Da7SP/
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [3.5.1]
- Fix for textbox non defined in scaleObject [#5896](https://github.com/fabricjs/fabric.js/pull/5896)
- Fix canvas pattern as background and exports [#5973](https://github.com/fabricjs/fabric.js/pull/5973)
- Fix for type error if style is null when checking if is empty [#5971](https://github.com/fabricjs/fabric.js/pull/5971)
- Fix for load from datalessJSON for svg groups with sourcePath [#5970](https://github.com/fabricjs/fabric.js/pull/5970)

## [3.5.0]
- Deprecation: deprecated 3 method of the api that will disappear in fabric 4: setPatternFill, setColor, setShadow.
- Fix: remove line dash modification for strokeUniform [#5953](https://github.com/fabricjs/fabric.js/pull/5953)
Expand Down
2 changes: 1 addition & 1 deletion HEADER.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */

var fabric = fabric || { version: '3.5.0' };
var fabric = fabric || { version: '3.5.1' };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
}
Expand Down
33 changes: 22 additions & 11 deletions dist/fabric.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* build: `node build.js modules=ALL exclude=gestures,accessors requirejs minifier=uglifyjs` */
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */

var fabric = fabric || { version: '3.5.0' };
var fabric = fabric || { version: '3.5.1' };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
}
Expand Down Expand Up @@ -7613,12 +7613,9 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
? fill.toLive(ctx, this)
: fill;
if (needsVpt) {
ctx.transform(
v[0], v[1], v[2], v[3],
v[4] + (fill.offsetX || 0),
v[5] + (fill.offsetY || 0)
);
ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);
}
ctx.transform(1, 0, 0, 1, fill.offsetX || 0, fill.offsetY || 0);
var m = fill.gradientTransform || fill.patternTransform;
m && ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
ctx.fill();
Expand Down Expand Up @@ -10231,7 +10228,7 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab

transform.newScaleX = scaleX;
transform.newScaleY = scaleY;
if (by === 'x' && target instanceof fabric.Textbox) {
if (fabric.Textbox && by === 'x' && target instanceof fabric.Textbox) {
var w = target.width * (localMouse.x / _dim.x);
if (w >= target.getMinWidth()) {
scaled = w !== target.width;
Expand Down Expand Up @@ -19689,7 +19686,19 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
* @param {Function} [callback] Callback to invoke when an group instance is created
*/
fabric.Group.fromObject = function(object, callback) {
fabric.util.enlivenObjects(object.objects, function(enlivenedObjects) {
var objects = object.objects,
options = fabric.util.object.clone(object, true);
delete options.objects;
if (typeof objects === 'string') {
// it has to be an url or something went wrong.
fabric.loadSVGFromURL(objects, function (elements) {
var group = fabric.util.groupSVGElements(elements, object, objects);
group.set(options);
callback && callback(group);
});
return;
}
fabric.util.enlivenObjects(objects, function(enlivenedObjects) {
fabric.util.enlivenObjects([object.clipPath], function(enlivedClipPath) {
var options = fabric.util.object.clone(object, true);
options.clipPath = enlivedClipPath[0];
Expand Down Expand Up @@ -29230,9 +29239,11 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
* @return {Boolean}
*/
isEmptyStyles: function(lineIndex) {
var offset = 0, nextLineIndex = lineIndex + 1, nextOffset, obj, shouldLimit = false;
var map = this._styleMap[lineIndex];
var mapNextLine = this._styleMap[lineIndex + 1];
if (!this.styles) {
return true;
}
var offset = 0, nextLineIndex = lineIndex + 1, nextOffset, obj, shouldLimit = false,
map = this._styleMap[lineIndex], mapNextLine = this._styleMap[lineIndex + 1];
if (map) {
lineIndex = map.line;
offset = map.offset;
Expand Down
2 changes: 1 addition & 1 deletion dist/fabric.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fabric",
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
"homepage": "http://fabricjs.com/",
"version": "3.5.0",
"version": "3.5.1",
"authors": "Juriy Zaytsev <[email protected]>",
"contributors": [
{
Expand Down

0 comments on commit 741cfdb

Please sign in to comment.