Socket
Socket
Sign inDemoInstall

@antv/g

Package Overview
Dependencies
Maintainers
7
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 3.2.2 to 3.3.0

dist/g-3.3.0.min.js

16

lib/core/element.js

@@ -126,3 +126,3 @@ var Util = require('../util/index');

},
remove: function remove(destroy) {
remove: function remove(destroy, delayRemove) {
var cfg = this._cfg;

@@ -133,12 +133,12 @@ var parent = cfg.parent;

if (parent) {
if (el) {
parent._cfg.tobeRemoved.push(el);
}
Util.remove(parent.get('children'), this);
}
/* if (el) {
el.parentNode.removeChild(el);
}*/
if (el) {
if (delayRemove) {
parent && parent._cfg.tobeRemoved.push(el);
} else {
el.parentNode.removeChild(el);
}
}

@@ -145,0 +145,0 @@ if (destroy || destroy === undefined) {

@@ -7,2 +7,8 @@ var Util = require('../../util/index');

};
var colorRalaredProps = {
fill: 'fill',
stroke: 'stroke',
fillStyle: 'fillStyle',
strokeStyle: 'strokeStyle'
};

@@ -34,2 +40,5 @@ function getFromAttrs(toAttrs, shape) {

rst.matrix = props[k];
} else if (colorRalaredProps[k] && /^[r,R,L,l]{1}[\s]*\(/.test(props[k])) {
// 渐变色不支持动画
continue;
} else if (!ReservedProps[k] && attrs[k] !== props[k]) {

@@ -36,0 +45,0 @@ rst.attrs[k] = props[k];

@@ -22,3 +22,3 @@ module.exports = {

// version, etc.
version: '3.2.2'
version: '3.3.0'
};
{
"name": "@antv/g",
"version": "3.2.2",
"version": "3.3.0",
"description": "A canvas library which providing 2d draw for G2.",

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

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

},
remove(destroy) {
remove(destroy, delayRemove) {
const cfg = this._cfg;

@@ -116,10 +116,11 @@ const parent = cfg.parent;

if (parent) {
if (el) {
parent._cfg.tobeRemoved.push(el);
}
Util.remove(parent.get('children'), this);
}
/* if (el) {
el.parentNode.removeChild(el);
}*/
if (el) {
if (delayRemove) {
parent && parent._cfg.tobeRemoved.push(el);
} else {
el.parentNode.removeChild(el);
}
}
if (destroy || destroy === undefined) {

@@ -126,0 +127,0 @@ this.destroy();

const Util = require('../../util/index');
const ReservedProps = { delay: 'delay', rotate: 'rotate' };
const colorRalaredProps = { fill: 'fill', stroke: 'stroke', fillStyle: 'fillStyle', strokeStyle: 'strokeStyle' };

@@ -27,2 +28,5 @@ function getFromAttrs(toAttrs, shape) {

rst.matrix = props[k];
} else if (colorRalaredProps[k] && /^[r,R,L,l]{1}[\s]*\(/.test(props[k])) {
// 渐变色不支持动画
continue;
} else if (!ReservedProps[k] && attrs[k] !== props[k]) {

@@ -29,0 +33,0 @@ rst.attrs[k] = props[k];

@@ -22,3 +22,3 @@ module.exports = {

// version, etc.
version: '3.2.2'
version: '3.3.0'
};

Sorry, the diff of this file is not supported yet

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