Slow-remove tiles, pay attention to parentNode, refs #686

This commit is contained in:
Tom MacWright
2013-02-08 13:48:51 -05:00
parent 8d8ec84316
commit 5139de969e
+5 -2
View File
@@ -112,8 +112,11 @@ iD.Background = function() {
.each(function() {
var tile = this;
window.setTimeout(function() {
tile.parentNode.removeChild(tile);
});
// this tile may already be removed
if (tile.parentNode) {
tile.parentNode.removeChild(tile);
}
}, 300);
});
image.enter().append('img')