Added remove events for portals/links/fields.

This commit is contained in:
Joseph Verburg
2015-04-08 17:03:53 +02:00
parent c7595c85f8
commit de5b689ee6
2 changed files with 7 additions and 0 deletions

View File

@ -240,6 +240,7 @@ window.Render.prototype.deletePortalEntity = function(guid) {
window.ornaments.removePortal(p);
this.removePortalFromMapLayer(p);
delete window.portals[guid];
window.runHooks('portalRemoved', {portal: p, data: p.options.data });
}
}
@ -248,6 +249,7 @@ window.Render.prototype.deleteLinkEntity = function(guid) {
var l = window.links[guid];
linksFactionLayers[l.options.team].removeLayer(l);
delete window.links[guid];
window.runHooks('linkRemoved', {link: l, data: l.options.data });
}
}
@ -259,6 +261,7 @@ window.Render.prototype.deleteFieldEntity = function(guid) {
fieldsFactionLayers[f.options.team].removeLayer(f);
delete window.fields[guid];
window.runHooks('fieldRemoved', {field: f, data: f.options.data });
}
}