diff --git a/CHANGELOG.md b/CHANGELOG.md
index c954ce03..e9c30ec8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
+## [1.11.2] - 2020-11-18
+### Fixed
+- Fix in [Collection](https://chird.github.io/meteoJS/doc/module-meteoJS_base_collection.Collection.html).
+
## [1.11.1] - 2020-11-13
### Fixed
- Doc fixes in sereval base classes.
@@ -111,7 +115,8 @@ will not work anymore, until you pass a callback to `getTimeText`.
### Fixed
- Some tests with DOM usage.
-[Unreleased]: https://github.com/chird/meteoJS/compare/v1.11.1...HEAD
+[Unreleased]: https://github.com/chird/meteoJS/compare/v1.11.2...HEAD
+[1.11.2]: https://github.com/chird/meteoJS/compare/v1.11.1...v1.11.2
[1.11.1]: https://github.com/chird/meteoJS/compare/v1.11.0...v1.11.1
[1.11.0]: https://github.com/chird/meteoJS/compare/v1.10.1...v1.11.0
[1.10.1]: https://github.com/chird/meteoJS/compare/v1.10.0...v1.10.1
diff --git a/doc/Modelviewer.js.html b/doc/Modelviewer.js.html
index c5c5af8b..3f82c6e4 100644
--- a/doc/Modelviewer.js.html
+++ b/doc/Modelviewer.js.html
@@ -277,7 +277,7 @@
Source: Modelviewer.js
diff --git a/doc/RepetitiveRequests.js.html b/doc/RepetitiveRequests.js.html
index 5be4453d..e51e2921 100644
--- a/doc/RepetitiveRequests.js.html
+++ b/doc/RepetitiveRequests.js.html
@@ -368,7 +368,7 @@ Source: RepetitiveRequests.js
diff --git a/doc/Sounding.js.html b/doc/Sounding.js.html
index efc5008b..f1fecbce 100644
--- a/doc/Sounding.js.html
+++ b/doc/Sounding.js.html
@@ -277,7 +277,7 @@ Source: Sounding.js
diff --git a/doc/Synview.js.html b/doc/Synview.js.html
index 3465c9c7..1cbd6958 100644
--- a/doc/Synview.js.html
+++ b/doc/Synview.js.html
@@ -201,7 +201,7 @@ Source: Synview.js
diff --git a/doc/ThermodynamicDiagram.js.html b/doc/ThermodynamicDiagram.js.html
index 86868658..66943f95 100644
--- a/doc/ThermodynamicDiagram.js.html
+++ b/doc/ThermodynamicDiagram.js.html
@@ -300,7 +300,7 @@ Source: ThermodynamicDiagram.js
diff --git a/doc/ThermodynamicDiagramPluggable.js.html b/doc/ThermodynamicDiagramPluggable.js.html
index 8a1d727c..ffa38343 100644
--- a/doc/ThermodynamicDiagramPluggable.js.html
+++ b/doc/ThermodynamicDiagramPluggable.js.html
@@ -231,7 +231,7 @@ Source: ThermodynamicDiagramPluggable.js
diff --git a/doc/Timeline.js.html b/doc/Timeline.js.html
index df8b9b7b..85569e7e 100644
--- a/doc/Timeline.js.html
+++ b/doc/Timeline.js.html
@@ -843,7 +843,7 @@ Source: Timeline.js
diff --git a/doc/Tooltip.js.html b/doc/Tooltip.js.html
index 219cbecb..659f6d1f 100644
--- a/doc/Tooltip.js.html
+++ b/doc/Tooltip.js.html
@@ -155,7 +155,7 @@ Source: Tooltip.js
diff --git a/doc/base_Collection.js.html b/doc/base_Collection.js.html
index b9047a57..4a5a8ece 100644
--- a/doc/base_Collection.js.html
+++ b/doc/base_Collection.js.html
@@ -220,6 +220,9 @@ Source: base/Collection.js
* @fires module:meteoJS/base/collection#replace:item
*/
append(...items) {
+ const addItem = [];
+ const removeItem = [];
+ const replaceItem = [];
items.forEach(item => {
let id = item.id;
if (this.containsId(id)) {
@@ -231,20 +234,23 @@ Source: base/Collection.js
if (itemInCollection !== item) {
this._items[id] = item;
if (this.options.fireReplace)
- this.trigger('replace:item', item, itemInCollection);
+ replaceItem.push([item, itemInCollection]);
if (this.options.fireAddRemoveOnReplace) {
- this.trigger('remove:item', itemInCollection);
- this.trigger('add:item', item);
+ removeItem.push(itemInCollection);
+ addItem.push(item);
}
}
}
else {
this._itemIds.push(id);
this._items[id] = item;
- this.trigger('add:item', item);
+ addItem.push(item);
}
});
this._sort();
+ addItem.forEach(item => this.trigger('add:item', item));
+ removeItem.forEach(item => this.trigger('remove:item', item));
+ replaceItem.forEach(([item, itemInCollection]) => this.trigger('replace:item', item, itemInCollection));
return this;
}
@@ -312,7 +318,7 @@ Source: base/Collection.js
diff --git a/doc/base_Named.js.html b/doc/base_Named.js.html
index 4a56c72b..45bed9e8 100644
--- a/doc/base_Named.js.html
+++ b/doc/base_Named.js.html
@@ -162,7 +162,7 @@ Source: base/Named.js
diff --git a/doc/base_NamedCollection.js.html b/doc/base_NamedCollection.js.html
index fe4a1961..0913890e 100644
--- a/doc/base_NamedCollection.js.html
+++ b/doc/base_NamedCollection.js.html
@@ -110,7 +110,7 @@ Source: base/NamedCollection.js
diff --git a/doc/base_Unique.js.html b/doc/base_Unique.js.html
index aaa2c80f..ae985788 100644
--- a/doc/base_Unique.js.html
+++ b/doc/base_Unique.js.html
@@ -83,7 +83,7 @@ Source: base/Unique.js
diff --git a/doc/base_UniqueNamed.js.html b/doc/base_UniqueNamed.js.html
index 8585a459..3065a5ec 100644
--- a/doc/base_UniqueNamed.js.html
+++ b/doc/base_UniqueNamed.js.html
@@ -95,7 +95,7 @@ Source: base/UniqueNamed.js
diff --git a/doc/calc.js.html b/doc/calc.js.html
index a3c7b0e3..b4b97bf8 100644
--- a/doc/calc.js.html
+++ b/doc/calc.js.html
@@ -523,7 +523,7 @@ Source: calc.js
diff --git a/doc/events.js.html b/doc/events.js.html
index e1d0e610..875472e9 100644
--- a/doc/events.js.html
+++ b/doc/events.js.html
@@ -165,7 +165,7 @@ Source: Events.js
diff --git a/doc/external-Event.html b/doc/external-Event.html
index 3fd8d9ea..dbb437cb 100644
--- a/doc/external-Event.html
+++ b/doc/external-Event.html
@@ -51,7 +51,7 @@ Event
diff --git a/doc/external-HTMLElement.html b/doc/external-HTMLElement.html
index 32d298ab..4120308c 100644
--- a/doc/external-HTMLElement.html
+++ b/doc/external-HTMLElement.html
@@ -51,7 +51,7 @@ HTMLElement
diff --git a/doc/external-SVG.html b/doc/external-SVG.html
index 594fa2d0..6566bf40 100644
--- a/doc/external-SVG.html
+++ b/doc/external-SVG.html
@@ -51,7 +51,7 @@ SVG
diff --git a/doc/external-XMLHttpRequest.html b/doc/external-XMLHttpRequest.html
index 920bb374..d7b1ca8b 100644
--- a/doc/external-XMLHttpRequest.html
+++ b/doc/external-XMLHttpRequest.html
@@ -51,7 +51,7 @@ XMLHttpRequest
diff --git a/doc/external-jQuery.html b/doc/external-jQuery.html
index 3d1f0b51..007631d1 100644
--- a/doc/external-jQuery.html
+++ b/doc/external-jQuery.html
@@ -51,7 +51,7 @@ jQuery
diff --git a/doc/index.html b/doc/index.html
index b6f1df53..b6e8f05c 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -9202,7 +9202,7 @@