Comparing version 4.5.0 to 4.5.1-browser
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ | ||
var fabric = fabric || { version: '4.5.0' }; | ||
var fabric = fabric || { version: '4.5.1' }; | ||
if (typeof exports !== 'undefined') { | ||
@@ -5,0 +5,0 @@ exports.fabric = fabric; |
165
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": "4.5.0", | ||
"author": "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,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.6.1", | ||
"jsdom": "^15.2.1" | ||
}, | ||
"devDependencies": { | ||
"chalk": "^2.4.1", | ||
"eslint": "4.18.x", | ||
"nyc": "^15.1.0", | ||
"onchange": "^3.x.x", | ||
"pixelmatch": "^4.0.2", | ||
"qunit": "^2.13.0", | ||
"testem": "^3.2.0", | ||
"uglify-js": "3.3.x" | ||
}, | ||
"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": "4.5.1-browser", | ||
"author": "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,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": {}, | ||
"devDependencies": { | ||
"chalk": "^2.4.1", | ||
"eslint": "4.18.x", | ||
"nyc": "^15.1.0", | ||
"onchange": "^3.x.x", | ||
"pixelmatch": "^4.0.2", | ||
"qunit": "^2.13.0", | ||
"testem": "^3.2.0", | ||
"uglify-js": "3.3.x" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"main": "./dist/fabric.js", | ||
"dependencies": {} | ||
} |
@@ -304,3 +304,3 @@ (function () { | ||
* Restores hiding an object | ||
* {@link favric.EraserBrush#hideObject} | ||
* {@link fabric.EraserBrush#hideObject} | ||
* @param {fabric.Object} object | ||
@@ -307,0 +307,0 @@ */ |
@@ -549,3 +549,3 @@ (function(global) { | ||
if (!fabric.svgViewBoxElementsRegEx.test(element.nodeName)) { | ||
return; | ||
return {}; | ||
} | ||
@@ -552,0 +552,0 @@ var viewBoxAttr = element.getAttribute('viewBox'), |
@@ -973,2 +973,3 @@ (function(global) { | ||
ctx.direction = isLtr ? 'ltr' : 'rtl'; | ||
ctx.textAlign = isLtr ? 'left' : 'right'; | ||
this._renderChar(method, ctx, lineIndex, 0, line.join(''), left, top, lineHeight); | ||
@@ -1012,2 +1013,3 @@ ctx.restore(); | ||
ctx.direction = isLtr ? 'ltr' : 'rtl'; | ||
ctx.textAlign = isLtr ? 'left' : 'right'; | ||
this._renderChar(method, ctx, lineIndex, i, charsToRender, drawingLeft, top, lineHeight); | ||
@@ -1054,3 +1056,3 @@ } | ||
if (filler.toLive) { | ||
if (filler.gradientUnits === 'percentage' || filler.gradientTrasnform || filler.patternTransform) { | ||
if (filler.gradientUnits === 'percentage' || filler.gradientTransform || filler.patternTransform) { | ||
// need to transform gradient in a pattern. | ||
@@ -1318,3 +1320,4 @@ // this is a slow process. If you are hitting this codepath, and the object | ||
maxHeight, currentFill, lastFill, path = this.path, | ||
charSpacing = this._getWidthOfCharSpacing(); | ||
charSpacing = this._getWidthOfCharSpacing(), | ||
offsetY = this.offsets[type]; | ||
@@ -1350,3 +1353,3 @@ for (var i = 0, len = this._textLines.length; i < len; i++) { | ||
-charBox.kernedWidth / 2, | ||
this.offsets[type] * _size + _dy, | ||
offsetY * _size + _dy, | ||
charBox.kernedWidth, | ||
@@ -1369,3 +1372,3 @@ this.fontSize / 15 | ||
drawStart, | ||
top + this.offsets[type] * size + dy, | ||
top + offsetY * size + dy, | ||
boxWidth, | ||
@@ -1386,6 +1389,10 @@ this.fontSize / 15 | ||
} | ||
var drawStart = leftOffset + lineLeftOffset + boxStart; | ||
if (this.direction === 'rtl') { | ||
drawStart = this.width - drawStart - boxWidth; | ||
} | ||
ctx.fillStyle = currentFill; | ||
currentDecoration && currentFill && ctx.fillRect( | ||
leftOffset + lineLeftOffset + boxStart, | ||
top + this.offsets[type] * size + dy, | ||
drawStart, | ||
top + offsetY * size + dy, | ||
boxWidth - charSpacing, | ||
@@ -1392,0 +1399,0 @@ this.fontSize / 15 |
@@ -118,4 +118,4 @@ (function(global) { | ||
rotatePoint: function(point, origin, radians) { | ||
point.subtractEquals(origin); | ||
var v = fabric.util.rotateVector(point, radians); | ||
var newPoint = new fabric.Point(point.x - origin.x, point.y - origin.y), | ||
v = fabric.util.rotateVector(newPoint, radians); | ||
return new fabric.Point(v.x, v.y).addEquals(origin); | ||
@@ -122,0 +122,0 @@ }, |
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
2529071
0
58943
2