Comparing version 3.3.1 to 3.3.2
@@ -172,3 +172,3 @@ var Util = require('./util/index'); | ||
var el = self.get('el'); | ||
var events = ['mouseout', 'mouseover', 'mousemove', 'mousedown', 'mouseleave', 'mouseover', 'mouseup', 'click', 'dblclick']; | ||
var events = ['mouseout', 'mouseover', 'mousemove', 'mousedown', 'mouseleave', 'mouseup', 'click', 'dblclick']; | ||
Util.each(events, function (event) { | ||
@@ -175,0 +175,0 @@ el.addEventListener(event, function (e) { |
@@ -478,7 +478,7 @@ var Util = require('../util/index'); | ||
}, | ||
clear: function clear() { | ||
clear: function clear(delayRemove) { | ||
var children = this._cfg.children; | ||
for (var i = children.length - 1; i >= 0; i--) { | ||
children[i].remove(); | ||
children[i].remove(true, delayRemove); | ||
} | ||
@@ -485,0 +485,0 @@ |
@@ -22,3 +22,3 @@ module.exports = { | ||
// version, etc. | ||
version: '3.3.1' | ||
version: '3.3.2' | ||
}; |
@@ -15,3 +15,5 @@ /** | ||
el.id = this.id; | ||
el.appendChild(cfg._cfg.el); | ||
var shapeEl = cfg._cfg.el; // just in case the clip shape is also a shape needs to be drawn | ||
el.appendChild(shapeEl.cloneNode(true)); | ||
this.cfg = cfg; | ||
@@ -18,0 +20,0 @@ return this; |
@@ -13,2 +13,8 @@ /** | ||
}; | ||
var SHADOW_DIMENSION = { | ||
x: '-40%', | ||
y: '-40%', | ||
width: '200%', | ||
height: '200%' | ||
}; | ||
@@ -19,4 +25,8 @@ var Shadow = | ||
function Shadow(cfg) { | ||
this.type = 'shadow'; | ||
var el = document.createElementNS('http://www.w3.org/2000/svg', 'filter'); | ||
this.type = 'filter'; | ||
var el = document.createElementNS('http://www.w3.org/2000/svg', 'filter'); // expand the filter region to fill in shadows | ||
Util.each(SHADOW_DIMENSION, function (v, k) { | ||
el.setAttribute(k, v); | ||
}); | ||
this.el = el; | ||
@@ -23,0 +33,0 @@ this.id = Util.uniqueId('filter_'); |
@@ -108,3 +108,3 @@ var Util = require('../../util'); | ||
try { | ||
self._drawChildren(model, false); | ||
self._drawGroup(model, false); | ||
} catch (ev) { | ||
@@ -111,0 +111,0 @@ // 绘制时异常,中断重绘 |
{ | ||
"name": "@antv/g", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "A canvas library which providing 2d draw for G2.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -151,3 +151,2 @@ const Util = require('./util/index'); | ||
'mouseleave', | ||
'mouseover', | ||
'mouseup', | ||
@@ -154,0 +153,0 @@ 'click', |
@@ -430,6 +430,6 @@ const Util = require('../util/index'); | ||
}, | ||
clear() { | ||
clear(delayRemove) { | ||
const children = this._cfg.children; | ||
for (let i = children.length - 1; i >= 0; i--) { | ||
children[i].remove(); | ||
children[i].remove(true, delayRemove); | ||
} | ||
@@ -436,0 +436,0 @@ this._cfg.children = []; |
@@ -22,3 +22,3 @@ module.exports = { | ||
// version, etc. | ||
version: '3.3.1' | ||
version: '3.3.2' | ||
}; |
@@ -13,3 +13,5 @@ /** | ||
el.id = this.id; | ||
el.appendChild(cfg._cfg.el); | ||
const shapeEl = cfg._cfg.el; | ||
// just in case the clip shape is also a shape needs to be drawn | ||
el.appendChild(shapeEl.cloneNode(true)); | ||
this.cfg = cfg; | ||
@@ -16,0 +18,0 @@ return this; |
@@ -14,6 +14,18 @@ /** | ||
const SHADOW_DIMENSION = { | ||
x: '-40%', | ||
y: '-40%', | ||
width: '200%', | ||
height: '200%' | ||
}; | ||
class Shadow { | ||
constructor(cfg) { | ||
this.type = 'shadow'; | ||
this.type = 'filter'; | ||
const el = document.createElementNS('http://www.w3.org/2000/svg', 'filter'); | ||
// expand the filter region to fill in shadows | ||
Util.each(SHADOW_DIMENSION, function(v, k) { | ||
el.setAttribute(k, v); | ||
}); | ||
this.el = el; | ||
@@ -20,0 +32,0 @@ this.id = Util.uniqueId('filter_'); |
@@ -99,3 +99,3 @@ const Util = require('../../util'); | ||
try { | ||
self._drawChildren(model, false); | ||
self._drawGroup(model, false); | ||
} catch (ev) { // 绘制时异常,中断重绘 | ||
@@ -102,0 +102,0 @@ console.warn('error in draw canvas, detail as:'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1141544
30192