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

cycle-canvas

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cycle-canvas - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

40

lib/canvas-driver.js

@@ -13,2 +13,3 @@ 'use strict';

exports.rect = rect;
exports.arc = arc;
exports.text = text;

@@ -195,2 +196,34 @@ exports.line = line;

function translateArc(element, origin) {
var operations = [{ call: 'beginPath', args: [] }, { call: 'arc', args: [element.x, element.y, element.radius, element.startAngle, element.endAngle, element.anticlockwise || false] }];
element.draw.map(function (operation) {
if (operation.fill) {
operations.push({
set: 'fillStyle',
value: operation.fill || 'black'
});
operations.push({
call: 'fill',
args: []
});
}
if (operation.stroke) {
operations.push({
set: 'strokeStyle',
value: operation.stroke || 'black'
});
operations.push({
call: 'stroke',
args: []
});
}
});
return operations;
}
function translateVtreeToInstructions(element, parentEl) {

@@ -215,3 +248,4 @@ if (!element) {

polygon: translatePolygon,
image: translateImage
image: translateImage,
arc: translateArc
};

@@ -297,2 +331,6 @@

function arc(opts, children) {
return c('arc', opts, children);
}
function text(opts, children) {

@@ -299,0 +337,0 @@ var defaults = {

{
"name": "cycle-canvas",
"version": "0.5.0",
"version": "0.6.0",
"description": "A canvas driver for Cycle.js",

@@ -53,2 +53,8 @@ "main": "lib/canvas-driver.js",

"cycle-restart": "0.0.14",
"eslint": "^4.7.2",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"keycode": "^2.1.1",

@@ -55,0 +61,0 @@ "lodash": "^4.8.1",

4

README.md

@@ -71,3 +71,3 @@ # cycle-canvas [![npm version](https://badge.fury.io/js/cycle-canvas.svg)](https://badge.fury.io/js/cycle-canvas) [![Build Status](https://travis-ci.org/cyclejs-community/cycle-canvas.svg?branch=master)](https://travis-ci.org/cyclejs-community/cycle-canvas)

##API
## API

@@ -268,3 +268,3 @@ #### Creating a canvas driver

##Transformations
## Transformations
Transformations are added as a list to the `transformations` attribute to drawing shapes and text.

@@ -271,0 +271,0 @@

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