mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
[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:
parent
5b475c9f64
commit
5af3d575a2
@ -126,13 +126,6 @@ define(
|
|||||||
this.pendingBubble = this.$timeout(displayBubble, this.delay);
|
this.pendingBubble = this.$timeout(displayBubble, this.delay);
|
||||||
|
|
||||||
this.element.on('mouseleave', this.hideBubbleCallback);
|
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();
|
this.hideBubble();
|
||||||
// ...and detach listeners
|
// ...and detach listeners
|
||||||
this.element.off('mouseenter', this.showBubbleCallback);
|
this.element.off('mouseenter', this.showBubbleCallback);
|
||||||
if (this.scopeOff) {
|
|
||||||
this.scopeOff();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return InfoGesture;
|
return InfoGesture;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user