|
@@ -76,7 +76,7 @@ export default class Collection {
|
|
|
* @param {Object} item
|
|
* @param {Object} item
|
|
|
* @param {Number} [index] The position of the item in the collection. The item
|
|
* @param {Number} [index] The position of the item in the collection. The item
|
|
|
* is pushed to the collection when `index` not specified.
|
|
* is pushed to the collection when `index` not specified.
|
|
|
- * @fires #add
|
|
|
|
|
|
|
+ * @fires add
|
|
|
*/
|
|
*/
|
|
|
add( item, index ) {
|
|
add( item, index ) {
|
|
|
let itemId;
|
|
let itemId;
|
|
@@ -157,7 +157,7 @@ export default class Collection {
|
|
|
*
|
|
*
|
|
|
* @param {Object|Number|String} subject The item to remove, its id or index in the collection.
|
|
* @param {Object|Number|String} subject The item to remove, its id or index in the collection.
|
|
|
* @returns {Object} The removed item.
|
|
* @returns {Object} The removed item.
|
|
|
- * @fires #remove
|
|
|
|
|
|
|
+ * @fires remove
|
|
|
*/
|
|
*/
|
|
|
remove( subject ) {
|
|
remove( subject ) {
|
|
|
let index, id, item;
|
|
let index, id, item;
|
|
@@ -262,14 +262,14 @@ export default class Collection {
|
|
|
/**
|
|
/**
|
|
|
* Fired when an item is added to the collection.
|
|
* Fired when an item is added to the collection.
|
|
|
*
|
|
*
|
|
|
- * @event module:utils/collection~Collection#add
|
|
|
|
|
|
|
+ * @event add
|
|
|
* @param {Object} item The added item.
|
|
* @param {Object} item The added item.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Fired when an item is removed from the collection.
|
|
* Fired when an item is removed from the collection.
|
|
|
*
|
|
*
|
|
|
- * @event module:utils/collection~Collection#remove
|
|
|
|
|
|
|
+ * @event remove
|
|
|
* @param {Object} item The removed item.
|
|
* @param {Object} item The removed item.
|
|
|
*/
|
|
*/
|
|
|
}
|
|
}
|