Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fabric

Package Overview
Dependencies
Maintainers
1
Versions
299
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 1.1.9 to 1.1.11

2

package.json
{
"name": "fabric",
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
"version": "1.1.9",
"version": "1.1.11",
"author": "Juriy Zaytsev <kangax@gmail.com>",

@@ -6,0 +6,0 @@ "keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],

@@ -1,2 +0,4 @@

### Fabric [![Build Status](https://secure.travis-ci.org/kangax/fabric.js.png?branch=master)](http://travis-ci.org/#!/kangax/fabric.js)
### Fabric
[![Build Status](https://secure.travis-ci.org/kangax/fabric.js.png?branch=master)](http://travis-ci.org/#!/kangax/fabric.js)
<a href="https://npmjs.org/package/fabric"><img src="https://badge.fury.io/js/fabric.png"></a>

@@ -3,0 +5,0 @@ **Fabric.js** is a framework that makes it easy to work with HTML5 canvas element. It is an **interactive object model** on top of canvas element. It is also an **SVG-to-canvas parser**.

@@ -436,3 +436,3 @@ (function(){

asyncTest('toDataURL', function() {
test('toDataURL', function() {
var data =

@@ -456,11 +456,7 @@ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQA'+

alert('toDataURL is not supported by this environment. Some of the tests can not be run.');
start();
}
else {
cObj.toDataURL(function(dataURL) {
equal(typeof dataURL, 'string');
equal(dataURL.substring(0, 21), 'data:image/png;base64');
start();
});
var dataURL = cObj.toDataURL();
equal(typeof dataURL, 'string');
equal(dataURL.substring(0, 21), 'data:image/png;base64');
}

@@ -467,0 +463,0 @@ });

@@ -148,2 +148,12 @@ (function(){

test('parseStyleAttribute with value normalization', function() {
var element = fabric.document.createElement('path');
element.setAttribute('style', 'fill:none');
var expectedObject = {
'fill': ''
};
deepEqual(expectedObject, fabric.parseStyleAttribute(element));
});
test('parseAttributes (style to have higher priority than attribute)', function() {

@@ -223,12 +233,10 @@ var element = fabric.document.createElement('path');

// TODO (kangax): matrices multiplication is not yet supported
element.setAttribute('transform', 'translate(21,31) translate(11,22)');
var parsedValue = fabric.parseTransformAttribute(element.getAttribute('transform'));
deepEqual([1,0,0,1,32,53], parsedValue);
// element.setAttribute('transform', 'translate(21,31) translate(11,22)');
// var parsedValue = fabric.parseTransformAttribute(element.getAttribute('transform'));
// this.assertEnumEqual([1,0,0,1,32,53], parsedValue);
element.setAttribute('transform', 'scale(2 13) translate(5,15) skewX(11.22)');
var parsedValue = fabric.parseTransformAttribute(element.getAttribute('transform'));
deepEqual([2,0,22.44,13,10,195], parsedValue);
// element.setAttribute('transform', 'scale(2 13) translate(5,15) skewX(11.22)');
// var parsedValue = fabric.parseTransformAttribute(element.getAttribute('transform'));
// deepEqual([2,0,11.22,13,5,15], parsedValue);
});

@@ -311,2 +319,2 @@

})();
})();

@@ -155,2 +155,13 @@ (function() {

});
})();
test('compressed path commands', function() {
var el = getPathElement('M56.224 84.12c-.047.132-.138.221-.322.215.046-.131.137-.221.322-.215z');
var obj = fabric.Path.fromElement(el);
deepEqual(['M', 56.224, 84.12], obj.path[0]);
deepEqual(['c', -0.047, 0.132, -0.138, 0.221, -0.322, 0.215], obj.path[1]);
deepEqual(['c', 0.046, -0.131, 0.137, -0.221, 0.322, -0.215], obj.path[2]);
deepEqual(['z'], obj.path[3]);
});
})();

Sorry, the diff of this file is not supported yet

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