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

@antv/g6-core

Package Overview
Dependencies
Maintainers
64
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g6-core - npm Package Compare versions

Comparing version 0.8.11-beta.0 to 0.8.12

4

es/element/edge.js

@@ -417,4 +417,4 @@ /**

if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;
if (isArray(this.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];
if (isArray(this.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];
if (isArray(cfg.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];
if (isArray(cfg.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];
var innerPoint = getControlPoint(startPoint, endPoint, cfg.curvePosition, cfg.curveOffset);

@@ -421,0 +421,0 @@ controlPoints = [innerPoint];

@@ -226,15 +226,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

var _a, _b;
var group = item.getContainer();
var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,
labelCfg = _c === void 0 ? {} : _c;
var labelClassName = this.itemType + CLS_LABEL_SUFFIX;
var label = group['shapeMap'][labelClassName] || group.find(function (ele) {
return ele.get('className') === labelClassName;
});
var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;
var labelBg = group['shapeMap'][labelBgClassname] || group.find(function (ele) {
return ele.get('className') === labelBgClassname;
});
if (label && cfg.label === undefined) {
group.removeChild(label);
delete group['shapeMap'][labelClassName];
if (labelBg) {
group.removeChild(labelBg);
delete group['shapeMap'][labelBgClassname];
}
}
// 防止 cfg.label = "" 的情况
if (cfg.label || cfg.label === '') {
var group = item.getContainer();
var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,
labelCfg = _c === void 0 ? {} : _c;
var labelClassName_1 = this.itemType + CLS_LABEL_SUFFIX;
var label = group['shapeMap'][labelClassName_1] || group.find(function (ele) {
return ele.get('className') === labelClassName_1;
});
var labelBgClassname_1 = this.itemType + CLS_LABEL_BG_SUFFIX;
var labelBg = group['shapeMap'][labelBgClassname_1] || group.find(function (ele) {
return ele.get('className') === labelBgClassname_1;
});
// 若传入的新配置中有 label,(用户没传入但原先有 label,label 也会有值)

@@ -244,4 +252,4 @@ if (!label) {

var newLabel = this.drawLabel(cfg, group);
newLabel.set('className', labelClassName_1);
group['shapeMap'][labelClassName_1] = newLabel;
newLabel.set('className', labelClassName);
group['shapeMap'][labelClassName] = newLabel;
} else {

@@ -278,4 +286,4 @@ // 若原先存在 label,则更新样式。与 getLabelStyle 不同在于这里需要融合当前 label 的样式

labelBg = this.drawLabelBg(cfg, group, label);
labelBg.set('classname', labelBgClassname_1);
group['shapeMap'][labelBgClassname_1] = labelBg;
labelBg.set('classname', labelBgClassname);
group['shapeMap'][labelBgClassname] = labelBg;
label.toFront();

@@ -282,0 +290,0 @@ }

@@ -50,3 +50,3 @@ var subjectColor = 'rgb(95, 149, 255)';

export default {
version: '0.8.11-beta.0',
version: '0.8.12',
rootContainerClassName: 'root-container',

@@ -53,0 +53,0 @@ nodeContainerClassName: 'node-container',

@@ -421,4 +421,4 @@ "use strict";

if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;
if ((0, _util.isArray)(this.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];
if ((0, _util.isArray)(this.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];
if ((0, _util.isArray)(cfg.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];
if ((0, _util.isArray)(cfg.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];
var innerPoint = (0, _path.getControlPoint)(startPoint, endPoint, cfg.curvePosition, cfg.curveOffset);

@@ -425,0 +425,0 @@ controlPoints = [innerPoint];

@@ -234,15 +234,23 @@ "use strict";

var _a, _b;
var group = item.getContainer();
var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,
labelCfg = _c === void 0 ? {} : _c;
var labelClassName = this.itemType + CLS_LABEL_SUFFIX;
var label = group['shapeMap'][labelClassName] || group.find(function (ele) {
return ele.get('className') === labelClassName;
});
var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;
var labelBg = group['shapeMap'][labelBgClassname] || group.find(function (ele) {
return ele.get('className') === labelBgClassname;
});
if (label && cfg.label === undefined) {
group.removeChild(label);
delete group['shapeMap'][labelClassName];
if (labelBg) {
group.removeChild(labelBg);
delete group['shapeMap'][labelBgClassname];
}
}
// 防止 cfg.label = "" 的情况
if (cfg.label || cfg.label === '') {
var group = item.getContainer();
var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,
labelCfg = _c === void 0 ? {} : _c;
var labelClassName_1 = this.itemType + CLS_LABEL_SUFFIX;
var label = group['shapeMap'][labelClassName_1] || group.find(function (ele) {
return ele.get('className') === labelClassName_1;
});
var labelBgClassname_1 = this.itemType + CLS_LABEL_BG_SUFFIX;
var labelBg = group['shapeMap'][labelBgClassname_1] || group.find(function (ele) {
return ele.get('className') === labelBgClassname_1;
});
// 若传入的新配置中有 label,(用户没传入但原先有 label,label 也会有值)

@@ -252,4 +260,4 @@ if (!label) {

var newLabel = this.drawLabel(cfg, group);
newLabel.set('className', labelClassName_1);
group['shapeMap'][labelClassName_1] = newLabel;
newLabel.set('className', labelClassName);
group['shapeMap'][labelClassName] = newLabel;
} else {

@@ -286,4 +294,4 @@ // 若原先存在 label,则更新样式。与 getLabelStyle 不同在于这里需要融合当前 label 的样式

labelBg = this.drawLabelBg(cfg, group, label);
labelBg.set('classname', labelBgClassname_1);
group['shapeMap'][labelBgClassname_1] = labelBg;
labelBg.set('classname', labelBgClassname);
group['shapeMap'][labelBgClassname] = labelBg;
label.toFront();

@@ -290,0 +298,0 @@ }

@@ -56,3 +56,3 @@ "use strict";

var _default = {
version: '0.8.11-beta.0',
version: '0.8.12',
rootContainerClassName: 'root-container',

@@ -59,0 +59,0 @@ nodeContainerClassName: 'node-container',

{
"name": "@antv/g6-core",
"version": "0.8.11-beta.0",
"version": "0.8.12",
"description": "A Graph Visualization Framework in JavaScript",

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

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