mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 13:17:53 +00:00
Merge pull request #949 from nasa/info-error-948
[Mobile] Remove usage of element.scope()
This commit is contained in:
commit
eefd4c8669
@ -38,7 +38,6 @@ define(
|
|||||||
function InfoGestureButton($document, agentService, infoService, element, domainObject) {
|
function InfoGestureButton($document, agentService, infoService, element, domainObject) {
|
||||||
var dismissBubble,
|
var dismissBubble,
|
||||||
touchPosition,
|
touchPosition,
|
||||||
scopeOff,
|
|
||||||
body = $document.find('body');
|
body = $document.find('body');
|
||||||
|
|
||||||
function trackPosition(event) {
|
function trackPosition(event) {
|
||||||
@ -94,10 +93,6 @@ define(
|
|||||||
element.on('click', showBubble);
|
element.on('click', showBubble);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also make sure we dismiss bubble if representation is destroyed
|
|
||||||
// before the mouse actually leaves it
|
|
||||||
scopeOff = element.scope().$on('$destroy', hideBubble);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Detach any event handlers associated with this gesture.
|
* Detach any event handlers associated with this gesture.
|
||||||
@ -109,7 +104,6 @@ define(
|
|||||||
hideBubble();
|
hideBubble();
|
||||||
// ...and detach listeners
|
// ...and detach listeners
|
||||||
element.off('click', showBubble);
|
element.off('click', showBubble);
|
||||||
scopeOff();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,11 @@ define(
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://github.com/nasa/openmct/issues/948
|
||||||
|
it("does not try to access scope", function () {
|
||||||
|
expect(mockElement.scope).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user