diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c879a1..7a6042c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ ## 1.1.0 -- After lots of shuffling around, there is now *finally* a consistent API for adding and removing shapes. Groups have `addChild()` and `removeChild()`, shapes have `removeParent()` and `addParent()`. -- Fixed a giant bug with re-rendering of children. +- Fixed a giant bug with re-rendering of children if they were removed/added to a group. ## 1.0.3 diff --git a/dist/rune.js b/dist/rune.js index faf347f..6f71e72 100644 --- a/dist/rune.js +++ b/dist/rune.js @@ -2631,7 +2631,8 @@ var Parent = { }, removeChild: function(child) { - this.children = without(this.children, child); + this.renderedChildren.splice(child.childId, 1); + this.children.splice(child.childId, 1); this.changedChildren = without(this.changedChildren, child.childId); // Lower id's of all children above by one diff --git a/package.json b/package.json index e8b5d26..3f76a6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rune.js", - "version": "1.0.3", + "version": "1.1.0", "description": "A JavaScript library for programming graphic design systems with SVG", "repository": { "type": "git",