add linkAdded and fieldAdded hooks, to mirror the portalAdded hook
This commit is contained in:
@ -397,6 +397,8 @@ window.Render.prototype.createFieldEntity = function(ent) {
|
||||
addPortalLinkedField(ent[2].capturedRegion.vertexB.guid);
|
||||
addPortalLinkedField(ent[2].capturedRegion.vertexC.guid);
|
||||
|
||||
runHooks('fieldAdded',{field: poly});
|
||||
|
||||
window.fields[ent[0]] = poly;
|
||||
|
||||
// TODO? postpone adding to the layer??
|
||||
@ -440,6 +442,8 @@ window.Render.prototype.createLinkEntity = function(ent,faked) {
|
||||
data: ent[2]
|
||||
});
|
||||
|
||||
runHooks('linkAdded', {link: poly});
|
||||
|
||||
window.links[ent[0]] = poly;
|
||||
|
||||
// only add the link to the layer if it's long enough to be seen
|
||||
|
Reference in New Issue
Block a user