Socket
Socket
Sign inDemoInstall

@antv/g2

Package Overview
Dependencies
Maintainers
4
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g2 - npm Package Compare versions

Comparing version 3.0.0-rc5.13 to 3.0.0-rc5.14

2

package.json
{
"name": "@antv/g2",
"version": "3.0.0-rc5.13",
"version": "3.0.0-rc5.14",
"description": "the Grammar of Graphics in Javascript",

@@ -5,0 +5,0 @@ "main": "build/g2.js",

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

Util.each(labels, label => {
const labelData = label.get('attrs').point;
const labelData = label.get('origin') || [];
if ((labelData[xField] === shapeData[xField]) && (labelData[yField] === shapeData[yField])) {

@@ -142,0 +142,0 @@ label.set('visible', visible);

@@ -118,2 +118,3 @@ /**

} else {
const origin = cfg.point;
delete cfg.point; // 临时解决,否则影响动画

@@ -123,2 +124,3 @@ labelShape = this.addShape('text', {

});
labelShape.setSilent('origin', origin);
labelShape.name = 'label'; // 用于事件标注

@@ -125,0 +127,0 @@ return labelShape;

@@ -42,3 +42,3 @@ /**

});
} else {
} else if (!Util.isNil(obj.y)) {
geomShape = shapeFactory.drawShape(shape, cfg, container);

@@ -45,0 +45,0 @@ geomShape.setSilent('index', index);

@@ -188,2 +188,8 @@ /**

const attrs = getFillAttrs(cfg);
const coord = this._coord;
// 曲线的限制
cfg.constraint = [
[ coord.start.x, coord.end.y ],
[ coord.end.x, coord.start.y ]
];
let path = getPath(cfg, true);

@@ -190,0 +196,0 @@ path = this.parsePath(path, false);

@@ -40,4 +40,5 @@ /**

// 获取带有上下区间的 path
function getRangePath(points, smooth, isInCircle, isStack) {
function getRangePath(points, smooth, isInCircle, cfg) {
const topPoints = [];
const isStack = cfg.isStack;
const bottomPoints = [];

@@ -50,4 +51,4 @@ for (let i = 0; i < points.length; i++) {

}
const topPath = getSinglePath(topPoints, smooth, isInCircle);
const bottomPath = getSinglePath(bottomPoints, smooth, isInCircle);
const topPath = getSinglePath(topPoints, smooth, isInCircle, cfg);
const bottomPath = getSinglePath(bottomPoints, smooth, isInCircle, cfg);
if (isStack) {

@@ -61,3 +62,3 @@ return topPath;

// 单条 path
function getSinglePath(points, smooth, isInCircle) {
function getSinglePath(points, smooth, isInCircle, cfg) {
let path;

@@ -67,3 +68,5 @@ if (!smooth) {

} else {
path = PathUtil.getSplinePath(points, false);
// 直角坐标系下绘制曲线时限制最大值、最小值
const constraint = isInCircle ? null : cfg.constraint;
path = PathUtil.getSplinePath(points, false, constraint);
}

@@ -82,5 +85,5 @@ if (isInCircle) {

if (Util.isArray(first.y)) {
path = getRangePath(points, smooth, isInCircle, cfg.isStack);
path = getRangePath(points, smooth, isInCircle, cfg);
} else {
path = getSinglePath(points, smooth, isInCircle);
path = getSinglePath(points, smooth, isInCircle, cfg);
}

@@ -246,2 +249,8 @@ return path;

const attrs = getAttrs(cfg);
const coord = this._coord;
// 曲线的限制
cfg.constraint = [
[ coord.start.x, coord.end.y ],
[ coord.end.x, coord.start.y ]
];
const path = getPath(cfg, true);

@@ -248,0 +257,0 @@ return container.addShape('path', {

@@ -10,3 +10,3 @@ /**

const Default = {
version: '3.0.0-rc5.13',
version: '3.0.0-rc5.14',
trackable: true,

@@ -13,0 +13,0 @@ animate: true,

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 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