New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fabric

Package Overview
Dependencies
Maintainers
2
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabric - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

6

CHANGELOG.md

@@ -0,1 +1,7 @@

**Version 2.0.3**
- Fix: now sub target check can work with subclasses of fabric.Group [#4753](https://github.com/kangax/fabric.js/pull/4753)
- Improvement: PencilBrush is now compexity 1 instead of complexity N during draw [#4743](https://github.com/kangax/fabric.js/pull/4743)
- Fix the cleanStyle was not checking for the right property to exist [#4751](https://github.com/kangax/fabric.js/pull/4751)
- Fix onBeforeScaleRotate with canvas zoom [#4748](https://github.com/kangax/fabric.js/pull/4748)
**Version 2.0.2**

@@ -2,0 +8,0 @@ - fixed image toSVG support for crop [#4738](https://github.com/kangax/fabric.js/pull/4738)

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "http://fabricjs.com/",
"version": "2.0.2",
"version": "2.0.3",
"author": "Juriy Zaytsev <kangax@gmail.com>",

@@ -8,0 +8,0 @@ "contributors": [

@@ -339,2 +339,22 @@ (function() {

QUnit.test('text cleanStyle with different sub styles styles', function(assert) {
var text = new fabric.Text('xxxxxx\nx y');
text.styles = { 1: { 0: { fill: 'red' }, 1: { stroke: 'red' }}};
text.stroke = 'red';
text.cleanStyle('stroke');
assert.equal(text.stroke, 'red', 'the stroke stays red');
assert.equal(text.styles[1][0].fill, 'red', 'the style has not been changed since it\'s a different property');
assert.equal(text.styles[1][0].stroke, undefined, 'the style has been cleaned since stroke was equal to text property');
assert.equal(text.styles[1][1], undefined, 'the style remains undefined');
});
QUnit.test('text cleanStyle with undefined and set styles', function(assert) {
var text = new fabric.Text('xxxxxx\nx y');
text.styles = { 1: { 1: { stroke: 'red' }, 3: { stroke: 'red' }}};
text.stroke = 'red';
text.cleanStyle('stroke');
assert.equal(text.stroke, 'red', 'the stroke stays red');
assert.equal(text.styles[1], undefined, 'the style has been cleaned since stroke was equal to text property');
});
QUnit.test('text cleanStyle with empty styles', function(assert) {

@@ -358,2 +378,16 @@ var text = new fabric.Text('xxxxxx\nx y');

QUnit.test('text cleanStyle with no relevant style', function(assert) {
var text = new fabric.Text('xxx');
text.styles = { 0: { 0: { other: 'value1' }, 1: { other: 'value2' }, 2: { other: 'value3' }}};
text.fill = 'black';
text.cleanStyle('fill');
assert.equal(text.fill, 'black', 'the fill remains black');
assert.equal(text.styles[0][0].other, 'value1', 'style remains the same');
assert.equal(text.styles[0][0].full, undefined, 'style remains undefined');
assert.equal(text.styles[0][1].other, 'value2', 'style remains the same');
assert.equal(text.styles[0][1].full, undefined, 'style remains undefined');
assert.equal(text.styles[0][2].other, 'value3', 'style remains the same');
assert.equal(text.styles[0][2].full, undefined, 'style remains undefined');
});
QUnit.test('text removeStyle with some style', function(assert) {

@@ -360,0 +394,0 @@ var text = new fabric.Text('xxx');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc