[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
This commit is contained in:
Victor Woeltjen 2015-10-30 10:44:48 -07:00
parent 5b475c9f64
commit 5af3d575a2

View File

@ -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;