Socket
Socket
Sign inDemoInstall

@antv/g

Package Overview
Dependencies
Maintainers
4
Versions
349
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

dist/g-2.0.1.min.js

2

package.json
{
"name": "@antv/g",
"version": "2.0.0",
"version": "2.0.1",
"description": "A canvas library which providing 2d draw for G2.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,11 +0,19 @@

# G: a canvas library which providing 2d draw for G2
# G
## Installing
[![npm package](https://img.shields.io/npm/v/@antv/g.svg?style=flat-square)](https://www.npmjs.com/package/@antv/g)
[![NPM downloads](http://img.shields.io/npm/dm/@antv/g.svg?style=flat-square)](https://npmjs.org/package/@antv/g)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/antvis/g.svg)](http://isitmaintained.com/project/antvis/g "Percentage of issues still open")
A canvas library which providing 2d draw for G2.
## Install
`npm i @antv/g`
## Contributing
## Development
- project structure
- core style guide
- work flow
```shell
$ git clone git@github.com:antvis/g.git
$ npm install
$ npm run dev
```

@@ -14,3 +14,4 @@ const Util = require('../util/index');

lineWidth: 1,
arrow: false,
startArrow: false,
endArrow: false,
tCache: null

@@ -28,3 +29,4 @@ };

lineWidth: 1,
arrow: false
startArrow: false,
endArrow: false
};

@@ -122,4 +124,2 @@ },

const points = attrs.points;
const arrow = attrs.arrow;
const lineWidth = attrs.lineWidth;
let l;

@@ -133,2 +133,4 @@ let i;

context.beginPath();
Arrow.addStartArrow(context, attrs, points[1][0], points[1][1], points[0][0], points[0][1]);
context.moveTo(points[0][0], points[0][1]);

@@ -138,10 +140,4 @@ for (i = 1, l = points.length - 1; i < l; i++) {

}
if (arrow) {
const v = [ points[l][0] - points[l - 1][0], points[l][1] - points[l - 1][1] ];
const end = Arrow.getEndPoint(v, [ points[l][0], points[l][1] ], lineWidth);
context.lineTo(end[0], end[1]);
Arrow.makeArrow(context, v, end, lineWidth);
} else {
context.lineTo(points[l][0], points[l][1]);
}
context.lineTo(points[l][0], points[l][1]);
Arrow.addEndArrow(context, attrs, points[l - 1][0], points[l - 1][1], points[l][0], points[l][1]);
},

@@ -148,0 +144,0 @@ getPoint(t) {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc