Comparing version 3.2.2 to 3.3.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1134328
29985