From 0c6540648e5b7244da3dd3e43cdf5e5512313d8d Mon Sep 17 00:00:00 2001 From: hjleesm Date: Thu, 8 Oct 2020 17:32:44 +0900 Subject: [PATCH 1/2] Remove clipPath Element in defs When an element is removed, the clipPath of the element should be also removed. Otherwise the clippath of the element remains persistent. --- dev/raphael.svg.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/raphael.svg.js b/dev/raphael.svg.js index b5fcfeea..e88dae90 100644 --- a/dev/raphael.svg.js +++ b/dev/raphael.svg.js @@ -916,6 +916,9 @@ define(["./raphael.core"], function(R) { if (this.gradient) { paper.defs.removeChild(this.gradient); } + if (this.clip) { + paper.defs.removeChild(this.clip.parentElement); + } R._tear(this, paper); node.parentNode.removeChild(node); From e81fd68f3b1203be7f13b0f11a1ae8b6c2b8912b Mon Sep 17 00:00:00 2001 From: hjleesm Date: Thu, 12 Nov 2020 17:15:30 +0900 Subject: [PATCH 2/2] Change parentElement to parentNode --- dev/raphael.svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/raphael.svg.js b/dev/raphael.svg.js index e88dae90..355520e5 100644 --- a/dev/raphael.svg.js +++ b/dev/raphael.svg.js @@ -917,7 +917,7 @@ define(["./raphael.core"], function(R) { paper.defs.removeChild(this.gradient); } if (this.clip) { - paper.defs.removeChild(this.clip.parentElement); + paper.defs.removeChild(this.clip.parentNode); } R._tear(this, paper);