2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-04-04 05:58:22 +00:00
This commit is contained in:
2022-02-17 18:06:02 +03:00
parent 8eb67ae4fb
commit 214785a893
27 changed files with 1645 additions and 396 deletions

View File

@@ -39,7 +39,7 @@ export default class AutoMap extends IEventHandler
add(key, value)
{
if (value instanceof IDestructible)
value.on("destroy", this._item_destroyed);
value.on("destroy", this.#_item_destroyed);
this.dic[key] = value;
@@ -58,13 +58,13 @@ export default class AutoMap extends IEventHandler
{
if (this.dic[key] !== undefined) {
if (this.dic[key] instanceof IDestructible)
this.dic[key].off("destroy", this._item_destroyed);
this.dic[key].off("destroy", this.#_item_destroyed);
delete this.dic[key];
}
}
_item_destroyed(sender)
#_item_destroyed = function(sender)
{
this.remove(sender);
}