Comparing version 3.5.0 to 3.5.1-browser
/*! 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') { | ||
@@ -5,0 +5,0 @@ exports.fabric = fabric; |
157
package.json
{ | ||
"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", | ||
"authors": "Juriy Zaytsev <kangax@gmail.com>", | ||
"contributors": [ | ||
{ | ||
"name": "Andrea Bogazzi", | ||
"email": "andreabogazzi79@gmail.com" | ||
} | ||
], | ||
"keywords": [ | ||
"canvas", | ||
"graphic", | ||
"graphics", | ||
"SVG", | ||
"node-canvas", | ||
"parser", | ||
"HTML5", | ||
"object model" | ||
], | ||
"browser": { | ||
"canvas": false, | ||
"fs": false, | ||
"jsdom": false, | ||
"jsdom/lib/jsdom/living/generated/utils": false, | ||
"jsdom/lib/jsdom/utils": false, | ||
"http": false, | ||
"https": false, | ||
"xmldom": false, | ||
"url": false | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fabricjs/fabric.js" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/fabricjs/fabric.js/issues" | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "node build.js modules=ALL requirejs exclude=gestures,accessors", | ||
"build:fast": "node build.js modules=ALL requirejs fast exclude=gestures,accessors", | ||
"build:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm run build_export", | ||
"build_with_gestures": "node build.js modules=ALL exclude=accessors", | ||
"build_export": "npm run build:fast && npm run export_dist_to_site", | ||
"test:single": "qunit test/node_test_setup.js test/lib", | ||
"test": "nyc qunit test/node_test_setup.js test/lib test/unit", | ||
"test:visual": "qunit test/node_test_setup.js test/lib test/visual", | ||
"test:visual:single": "qunit test/node_test_setup.js test/lib", | ||
"test:all": "npm run test && npm run test:visual", | ||
"lint": "eslint --config .eslintrc.json src", | ||
"lint_tests": "eslint test/unit --config .eslintrc_tests && eslint test/visual --config .eslintrc_tests", | ||
"export_dist_to_site": "cp dist/fabric.js ../fabricjs.com/lib/fabric.js && cp package.json ../fabricjs.com/lib/package.json && cp -r src HEADER.js lib ../fabricjs.com/build/files/", | ||
"export_tests_to_site": "cp test/unit/*.js ../fabricjs.com/test/unit && cp -r test/visual/* ../fabricjs.com/test/visual && cp -r test/fixtures/* ../fabricjs.com/test/fixtures && cp -r test/lib/* ../fabricjs.com/test/lib", | ||
"all": "npm run build && npm run test && npm run test:visual && npm run lint && npm run lint_tests && npm run export_dist_to_site && npm run export_tests_to_site", | ||
"testem": "testem .", | ||
"testem:visual": "testem --file testem-visual.json", | ||
"testem:ci": "testem ci" | ||
}, | ||
"optionalDependencies": { | ||
"canvas": "^2.6.0", | ||
"jsdom": "^15.1.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "4.18.x", | ||
"nyc": "13.3.x", | ||
"onchange": "^3.x.x", | ||
"qunit": "2.9.2", | ||
"testem": "^1.18.4", | ||
"uglify-js": "3.3.x", | ||
"pixelmatch": "^4.0.2", | ||
"chalk": "^2.4.1" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"main": "./dist/fabric.js", | ||
"dependencies": {} | ||
} | ||
"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.1-browser", | ||
"authors": "Juriy Zaytsev <kangax@gmail.com>", | ||
"contributors": [ | ||
{ | ||
"name": "Andrea Bogazzi", | ||
"email": "andreabogazzi79@gmail.com" | ||
} | ||
], | ||
"keywords": [ | ||
"canvas", | ||
"graphic", | ||
"graphics", | ||
"SVG", | ||
"node-canvas", | ||
"parser", | ||
"HTML5", | ||
"object model" | ||
], | ||
"browser": { | ||
"canvas": false, | ||
"fs": false, | ||
"jsdom": false, | ||
"jsdom/lib/jsdom/living/generated/utils": false, | ||
"jsdom/lib/jsdom/utils": false, | ||
"http": false, | ||
"https": false, | ||
"xmldom": false, | ||
"url": false | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fabricjs/fabric.js" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/fabricjs/fabric.js/issues" | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "node build.js modules=ALL requirejs exclude=gestures,accessors", | ||
"build:fast": "node build.js modules=ALL requirejs fast exclude=gestures,accessors", | ||
"build:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm run build_export", | ||
"build_with_gestures": "node build.js modules=ALL exclude=accessors", | ||
"build_export": "npm run build:fast && npm run export_dist_to_site", | ||
"test:single": "qunit test/node_test_setup.js test/lib", | ||
"test": "nyc qunit test/node_test_setup.js test/lib test/unit", | ||
"test:visual": "qunit test/node_test_setup.js test/lib test/visual", | ||
"test:visual:single": "qunit test/node_test_setup.js test/lib", | ||
"test:all": "npm run test && npm run test:visual", | ||
"lint": "eslint --config .eslintrc.json src", | ||
"lint_tests": "eslint test/unit --config .eslintrc_tests && eslint test/visual --config .eslintrc_tests", | ||
"export_dist_to_site": "cp dist/fabric.js ../fabricjs.com/lib/fabric.js && cp package.json ../fabricjs.com/lib/package.json && cp -r src HEADER.js lib ../fabricjs.com/build/files/", | ||
"export_tests_to_site": "cp test/unit/*.js ../fabricjs.com/test/unit && cp -r test/visual/* ../fabricjs.com/test/visual && cp -r test/fixtures/* ../fabricjs.com/test/fixtures && cp -r test/lib/* ../fabricjs.com/test/lib", | ||
"all": "npm run build && npm run test && npm run test:visual && npm run lint && npm run lint_tests && npm run export_dist_to_site && npm run export_tests_to_site", | ||
"testem": "testem .", | ||
"testem:visual": "testem --file testem-visual.json", | ||
"testem:ci": "testem ci" | ||
}, | ||
"optionalDependencies": {}, | ||
"devDependencies": { | ||
"eslint": "4.18.x", | ||
"nyc": "13.3.x", | ||
"onchange": "^3.x.x", | ||
"qunit": "2.9.2", | ||
"testem": "^1.18.4", | ||
"uglify-js": "3.3.x", | ||
"pixelmatch": "^4.0.2", | ||
"chalk": "^2.4.1" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"main": "./dist/fabric.js", | ||
"dependencies": {} | ||
} |
@@ -910,3 +910,3 @@ (function() { | ||
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); | ||
@@ -913,0 +913,0 @@ if (w >= target.getMinWidth()) { |
@@ -571,3 +571,15 @@ (function(global) { | ||
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) { | ||
@@ -574,0 +586,0 @@ var options = fabric.util.object.clone(object, true); |
@@ -166,5 +166,7 @@ (function(global) { | ||
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) { | ||
@@ -171,0 +173,0 @@ lineIndex = map.line; |
@@ -1016,8 +1016,5 @@ (function () { | ||
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; | ||
@@ -1024,0 +1021,0 @@ m && ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2379510
0
56202
2