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

canvas-5-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-5-polyfill - npm Package Compare versions

Comparing version

to
0.1.1

.npmignore

22

canvasv5.js

@@ -12,2 +12,13 @@ /**

*/
if (CanvasRenderingContext2D.prototype.ellipse == undefined) {
CanvasRenderingContext2D.prototype.ellipse = function(x, y, radiusX, radiusY, rotation, startAngle, endAngle, antiClockwise) {
this.save();
this.translate(x, y);
this.rotate(rotation);
this.scale(radiusX, radiusY);
this.arc(0, 0, 1, startAngle, endAngle, antiClockwise);
this.restore();
}
}
if (typeof Path2D !== 'function') {

@@ -39,12 +50,2 @@ (function() {

if (CanvasRenderingContext2D.prototype.ellipse == undefined) {
CanvasRenderingContext2D.prototype.ellipse = function(x, y, radiusX, radiusY, rotation, startAngle, endAngle, antiClockwise) {
this.save();
this.translate(x, y);
this.rotate(rotation);
this.scale(radiusX, radiusY);
this.arc(0, 0, 1, startAngle, endAngle, antiClockwise);
this.restore();
}
}

@@ -176,1 +177,2 @@ // Path methods that map simply to the CanvasRenderingContext2D.

}
{
"name": "canvas-5-polyfill",
"version": "0.1.0",
"version": "0.1.1",
"description": "Polyfill for HTML 5 Canvas features.",

@@ -5,0 +5,0 @@ "main": "canvas.js",

@@ -21,10 +21,9 @@ describe('AddPath Test Suite.',

tr = {
a: 0,
b: 1,
c: 2,
d: 3,
e: 4,
f: 5
};
var tr = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix();
tr.a = 0;
tr.b = 1;
tr.c = 2;
tr.d = 3;
tr.e = 4;
tr.f = 5;
path.addPath(toadd, tr);

@@ -31,0 +30,0 @@ assert.equal(path.ops_.length, 4);

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