diff options
author | Idan Amit <ia096e@intl.att.com> | 2018-05-07 15:55:00 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2018-05-08 13:33:05 +0000 |
commit | ecd3d712aad4ac37f399c90f4bf9258bfe483b9a (patch) | |
tree | 39e51c55bd99177fa59bb782ccded341420ed67f /catalog-ui/src/app/models/base-pubsub.ts | |
parent | 787ee0846bacaffedb40d481347762001c3146bd (diff) |
Developed disable navigation mechanism
Added a mechanism to disable and enable the navigation when waiting for a response from a plugin
Change-Id: I11cba9a7fc2a32e3d3d32fb9cf9f0590900fe73b
Issue-ID: SDC-1277
Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/models/base-pubsub.ts')
-rw-r--r-- | catalog-ui/src/app/models/base-pubsub.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/base-pubsub.ts b/catalog-ui/src/app/models/base-pubsub.ts index b9ff788a57..c4b109f1d5 100644 --- a/catalog-ui/src/app/models/base-pubsub.ts +++ b/catalog-ui/src/app/models/base-pubsub.ts @@ -97,6 +97,12 @@ export class BasePubSub { } } + public isWaitingForEvent(eventName: string) : boolean { + return Array.from(this.eventsToWait.values()).some((eventsList: Array<string>) => + eventsList.indexOf(eventName) !== -1 + ); + } + protected onMessage(event: any) { if (this.subscribers.has(event.data.originId)) { this.eventsCallbacks.forEach((callback: Function) => { |