Comparing version 3.6.2 to 3.6.3-browser
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ | ||
var fabric = fabric || { version: '3.6.2' }; | ||
var fabric = fabric || { version: '3.6.3' }; | ||
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.6.2", | ||
"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.1", | ||
"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.6.3-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": {} | ||
} |
@@ -137,2 +137,6 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOptions, doc) { | ||
} | ||
else { | ||
// if clip-path does not resolve to any element, delete the property. | ||
delete obj.clipPath; | ||
} | ||
}; | ||
@@ -139,0 +143,0 @@ |
@@ -604,2 +604,3 @@ (function() { | ||
var isTextChanged = (this._textBeforeEdit !== this.text); | ||
var hiddenTextarea = this.hiddenTextarea; | ||
this.selected = false; | ||
@@ -610,8 +611,7 @@ this.isEditing = false; | ||
if (this.hiddenTextarea) { | ||
this.hiddenTextarea.blur && this.hiddenTextarea.blur(); | ||
this.canvas && this.hiddenTextarea.parentNode.removeChild(this.hiddenTextarea); | ||
this.hiddenTextarea = null; | ||
if (hiddenTextarea) { | ||
hiddenTextarea.blur && hiddenTextarea.blur(); | ||
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea); | ||
} | ||
this.hiddenTextarea = null; | ||
this.abortCursorAnimation(); | ||
@@ -618,0 +618,0 @@ this._restoreEditingProps(); |
@@ -150,3 +150,3 @@ (function() { | ||
var wh = this._calculateCurrentDimensions(), | ||
strokeWidth = 1 / this.borderScaleFactor, | ||
strokeWidth = this.borderScaleFactor, | ||
width = wh.x + strokeWidth, | ||
@@ -198,3 +198,3 @@ height = wh.y + strokeWidth, | ||
styleOverride = styleOverride || {}; | ||
var p = this._getNonTransformedDimensions(), | ||
var p = { x: this.width, y: this.height }, | ||
matrix = fabric.util.composeMatrix({ | ||
@@ -206,6 +206,8 @@ scaleX: options.scaleX, | ||
wh = fabric.util.transformPoint(p, matrix), | ||
strokeWidth = 1 / this.borderScaleFactor, | ||
width = wh.x + strokeWidth, | ||
height = wh.y + strokeWidth; | ||
strokeWidth = this.strokeWidth, | ||
borderScaleFactor = this.borderScaleFactor, | ||
width = | ||
wh.x + strokeWidth * (this.strokeUniform ? this.canvas.getZoom() : options.scaleX) + borderScaleFactor, | ||
height = | ||
wh.y + strokeWidth * (this.strokeUniform ? this.canvas.getZoom() : options.scaleY) + borderScaleFactor; | ||
ctx.save(); | ||
@@ -212,0 +214,0 @@ this._setLineDash(ctx, styleOverride.borderDashArray || this.borderDashArray, null); |
@@ -12,3 +12,3 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prototype */ { | ||
} | ||
else { | ||
else if (this.canvas) { | ||
this.canvas.sendToBack(this); | ||
@@ -28,3 +28,3 @@ } | ||
} | ||
else { | ||
else if (this.canvas) { | ||
this.canvas.bringToFront(this); | ||
@@ -45,3 +45,3 @@ } | ||
} | ||
else { | ||
else if (this.canvas) { | ||
this.canvas.sendBackwards(this, intersecting); | ||
@@ -62,3 +62,3 @@ } | ||
} | ||
else { | ||
else if (this.canvas) { | ||
this.canvas.bringForward(this, intersecting); | ||
@@ -79,3 +79,3 @@ } | ||
} | ||
else { | ||
else if (this.canvas) { | ||
this.canvas.moveTo(this, index); | ||
@@ -82,0 +82,0 @@ } |
@@ -105,7 +105,5 @@ /* _TO_SVG_START_ */ | ||
getSvgTextDecoration: function(style) { | ||
if ('overline' in style || 'underline' in style || 'linethrough' in style) { | ||
return (style.overline ? 'overline ' : '') + | ||
(style.underline ? 'underline ' : '') + (style.linethrough ? 'line-through ' : ''); | ||
} | ||
return ''; | ||
return ['overline', 'underline', 'line-through'].filter(function(decoration) { | ||
return style[decoration.replace('-', '')]; | ||
}).join(' '); | ||
}, | ||
@@ -112,0 +110,0 @@ |
@@ -969,4 +969,4 @@ (function(global) { | ||
for (i = 0, len = styles.length; i < len; i++) { | ||
// IE9 doesn't support textContent, but provides text instead. | ||
var styleContents = styles[i].textContent || styles[i].text; | ||
// <style/> could produce `undefined`, covering this case with '' | ||
var styleContents = styles[i].textContent || ''; | ||
@@ -973,0 +973,0 @@ // remove comments |
@@ -306,4 +306,4 @@ (function(global) { | ||
willDrawShadow: function() { | ||
if (this.shadow) { | ||
return fabric.Object.prototype.willDrawShadow.call(this); | ||
if (fabric.Object.prototype.willDrawShadow.call(this)) { | ||
return true; | ||
} | ||
@@ -310,0 +310,0 @@ for (var i = 0, len = this._objects.length; i < len; i++) { |
@@ -959,2 +959,15 @@ (function(global) { | ||
/** | ||
* Finds the scale for the object source to fit inside the object destination, | ||
* keeping aspect ratio intact. | ||
* respect the total allowed area for the cache. | ||
* @memberOf fabric.util | ||
* @param {Object | fabric.Object} source | ||
* @param {Number} source.height natural unscaled height of the object | ||
* @param {Number} source.width natural unscaled width of the object | ||
* @param {Object | fabric.Object} destination | ||
* @param {Number} destination.height natural unscaled height of the object | ||
* @param {Number} destination.width natural unscaled width of the object | ||
* @return {Number} scale factor to apply to source to fit into destination | ||
*/ | ||
findScaleToFit: function(source, destination) { | ||
@@ -964,2 +977,15 @@ return Math.min(destination.width / source.width, destination.height / source.height); | ||
/** | ||
* Finds the scale for the object source to cover entirely the object destination, | ||
* keeping aspect ratio intact. | ||
* respect the total allowed area for the cache. | ||
* @memberOf fabric.util | ||
* @param {Object | fabric.Object} source | ||
* @param {Number} source.height natural unscaled height of the object | ||
* @param {Number} source.width natural unscaled width of the object | ||
* @param {Object | fabric.Object} destination | ||
* @param {Number} destination.height natural unscaled height of the object | ||
* @param {Number} destination.width natural unscaled width of the object | ||
* @return {Number} scale factor to apply to source to cover destination | ||
*/ | ||
findScaleToCover: function(source, destination) { | ||
@@ -966,0 +992,0 @@ return Math.max(destination.width / source.width, destination.height / source.height); |
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
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
2399250
0
56556
2