From 5af3d575a200170a351beb9f3e211d646f5fa888 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 30 Oct 2015 10:44:48 -0700 Subject: [PATCH] [Representation] Remove redundant listener The event is already listened-for at the representation level to trigger cleanup, including gestures, so the info gesture does not need to listen for it as well. Per code review feedback, nasa/openmctweb#222 --- platform/commonUI/inspect/src/gestures/InfoGesture.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/platform/commonUI/inspect/src/gestures/InfoGesture.js b/platform/commonUI/inspect/src/gestures/InfoGesture.js index 6be25e646d..688a27cb6c 100644 --- a/platform/commonUI/inspect/src/gestures/InfoGesture.js +++ b/platform/commonUI/inspect/src/gestures/InfoGesture.js @@ -126,13 +126,6 @@ define( this.pendingBubble = this.$timeout(displayBubble, this.delay); this.element.on('mouseleave', this.hideBubbleCallback); - - // Also make sure we dismiss bubble if representation is destroyed - // before the mouse actually leaves it - this.scopeOff = - this.element.scope() && - this.element.scope().$on('$destroy', this.hideBubbleCallback); - }; @@ -145,9 +138,6 @@ define( this.hideBubble(); // ...and detach listeners this.element.off('mouseenter', this.showBubbleCallback); - if (this.scopeOff) { - this.scopeOff(); - } }; return InfoGesture;