Comparing version 5.1.0 to 5.2.1-browser
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ | ||
var fabric = fabric || { version: '5.1.0' }; | ||
var fabric = fabric || { version: '5.2.1' }; | ||
if (typeof exports !== 'undefined') { | ||
@@ -5,0 +5,0 @@ exports.fabric = fabric; |
@@ -240,3 +240,3 @@ /*: | ||
} else if (type.indexOf("on") === 0) { // to support things like "onclick" instead of "click" | ||
type = type.substr(2); | ||
type = type.slice(2); | ||
} | ||
@@ -1372,3 +1372,3 @@ | ||
var distance = Math.sqrt(dx * dx + dy * dy); | ||
// If touch start.distance from centroid is 0, scale should not be updated. | ||
// If touch start.distance from centroid is 0, scale should not be updated. | ||
// This prevents dividing by 0 in cases where start.distance is oddly 0. | ||
@@ -1375,0 +1375,0 @@ if (start.distance !== 0) { |
178
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": "5.1.0", | ||
"author": "Juriy Zaytsev <kangax@gmail.com>", | ||
"contributors": [ | ||
{ | ||
"name": "Andrea Bogazzi", | ||
"email": "andreabogazzi79@gmail.com" | ||
}, | ||
{ | ||
"name": "Steve Eberhardt", | ||
"email": "melchiar2@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": { | ||
"changelog": "auto-changelog -o change-output.md --unreleased-only", | ||
"build": "node build.js modules=ALL requirejs exclude=gestures,accessors,erasing", | ||
"build:fast": "node build.js modules=ALL requirejs fast exclude=gestures,accessors,erasing", | ||
"build:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm run build_export", | ||
"link:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm link", | ||
"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:coverage": "nyc --silent qunit test/node_test_setup.js test/lib test/unit", | ||
"test:visual:coverage": "nyc --silent --no-clean qunit test/node_test_setup.js test/lib test/visual", | ||
"coverage:report": "nyc report --reporter=lcov --reporter=text", | ||
"test": "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_gesture_to_site": "cp dist/fabric.js ../fabricjs.com/lib/fabric_with_gestures.js", | ||
"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:ci": "testem ci" | ||
}, | ||
"optionalDependencies": { | ||
"canvas": "^2.8.0", | ||
"jsdom": "^19.0.0" | ||
}, | ||
"devDependencies": { | ||
"auto-changelog": "^2.3.0", | ||
"chalk": "^2.4.1", | ||
"eslint": "4.18.x", | ||
"nyc": "^15.1.0", | ||
"onchange": "^7.1.0", | ||
"pixelmatch": "^4.0.2", | ||
"qunit": "^2.13.0", | ||
"testem": "^3.2.0", | ||
"uglify-js": "3.3.x" | ||
}, | ||
"engines": { | ||
"node": ">=14.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": "5.2.1-browser", | ||
"author": "Juriy Zaytsev <kangax@gmail.com>", | ||
"contributors": [ | ||
{ | ||
"name": "Andrea Bogazzi", | ||
"email": "andreabogazzi79@gmail.com" | ||
}, | ||
{ | ||
"name": "Steve Eberhardt", | ||
"email": "melchiar2@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": { | ||
"changelog": "auto-changelog -o change-output.md --unreleased-only", | ||
"build": "node build.js modules=ALL requirejs exclude=gestures,accessors,erasing", | ||
"build:fast": "node build.js modules=ALL requirejs fast exclude=gestures,accessors,erasing", | ||
"build:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm run build_export", | ||
"link:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm link", | ||
"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:coverage": "nyc --silent qunit test/node_test_setup.js test/lib test/unit", | ||
"test:visual:coverage": "nyc --silent --no-clean qunit test/node_test_setup.js test/lib test/visual", | ||
"coverage:report": "nyc report --reporter=lcov --reporter=text", | ||
"test": "qunit --require ./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_gesture_to_site": "cp dist/fabric.js ../fabricjs.com/lib/fabric_with_gestures.js", | ||
"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:ci": "testem ci" | ||
}, | ||
"optionalDependencies": {}, | ||
"devDependencies": { | ||
"auto-changelog": "^2.3.0", | ||
"chalk": "^2.4.1", | ||
"deep-object-diff": "^1.1.7", | ||
"eslint": "4.18.x", | ||
"nyc": "^15.1.0", | ||
"onchange": "^7.1.0", | ||
"pixelmatch": "^4.0.2", | ||
"qunit": "^2.17.2", | ||
"testem": "^3.2.0", | ||
"uglify-js": "3.3.x" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
"main": "./dist/fabric.js", | ||
"dependencies": {} | ||
} |
@@ -510,3 +510,3 @@ (function() { | ||
if (Object.prototype.toString.call(this.selectionKey) === '[object Array]') { | ||
if (Array.isArray(this.selectionKey)) { | ||
selectionKeyPressed = !!this.selectionKey.find(function(key) { return e[key] === true; }); | ||
@@ -938,2 +938,10 @@ } | ||
/** | ||
* Returns context of top canvas where interactions are drawn | ||
* @returns {CanvasRenderingContext2D} | ||
*/ | ||
getTopContext: function () { | ||
return this.contextTop; | ||
}, | ||
/** | ||
* @private | ||
@@ -940,0 +948,0 @@ */ |
@@ -29,3 +29,3 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.StaticCanvas.prototype */ { | ||
startValue: object.left, | ||
endValue: this.getCenter().left, | ||
endValue: this.getCenterPoint().x, | ||
duration: this.FX_DURATION, | ||
@@ -63,3 +63,3 @@ onChange: function(value) { | ||
startValue: object.top, | ||
endValue: this.getCenter().top, | ||
endValue: this.getCenterPoint().y, | ||
duration: this.FX_DURATION, | ||
@@ -66,0 +66,0 @@ onChange: function(value) { |
@@ -15,2 +15,6 @@ (function () { | ||
var __createBaseSVGMarkup = fabric.Object.prototype._createBaseSVGMarkup; | ||
fabric.Object.prototype.cacheProperties.push('eraser'); | ||
fabric.Object.prototype.stateProperties.push('eraser'); | ||
/** | ||
@@ -17,0 +21,0 @@ * @fires erasing:end |
@@ -81,4 +81,3 @@ (function(global) { | ||
function normalizeValue(attr, value, parentAttributes, fontSize) { | ||
var isArray = Object.prototype.toString.call(value) === '[object Array]', | ||
parsed; | ||
var isArray = Array.isArray(value), parsed; | ||
@@ -481,3 +480,3 @@ if ((attr === 'fill' || attr === 'stroke') && value === 'none') { | ||
var xlink = xlinkAttribute.substr(1), | ||
var xlink = xlinkAttribute.slice(1), | ||
x = el.getAttribute('x') || 0, | ||
@@ -754,3 +753,3 @@ y = el.getAttribute('y') || 0, | ||
xlinkAttr = 'xlink:href', | ||
xLink = gradient.getAttribute(xlinkAttr).substr(1), | ||
xLink = gradient.getAttribute(xlinkAttr).slice(1), | ||
referencedGradient = elementById(doc, xLink); | ||
@@ -757,0 +756,0 @@ if (referencedGradient && referencedGradient.getAttribute(xlinkAttr)) { |
@@ -10,3 +10,2 @@ (function(global) { | ||
clone = fabric.util.object.clone, | ||
_toString = Object.prototype.toString, | ||
toFixed = fabric.util.toFixed; | ||
@@ -65,6 +64,4 @@ | ||
_setPath: function (path, options) { | ||
var fromArray = _toString.call(path) === '[object Array]'; | ||
this.path = fabric.util.makePathSimpler( | ||
fromArray ? path : fabric.util.parsePath(path) | ||
Array.isArray(path) ? path : fabric.util.parsePath(path) | ||
); | ||
@@ -71,0 +68,0 @@ |
@@ -684,3 +684,3 @@ (function(global) { | ||
populateWithProperties: function(source, destination, properties) { | ||
if (properties && Object.prototype.toString.call(properties) === '[object Array]') { | ||
if (properties && Array.isArray(properties)) { | ||
for (var i = 0, len = properties.length; i < len; i++) { | ||
@@ -687,0 +687,0 @@ if (properties[i] in source) { |
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
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
2592110
0
60047
10
2