Send viewport activation trigger on mouse enter only if there is no focused dropdown
This commit is contained in:
1 parent
e839619493
commit
cea3a77b52
1 file changed
+9
-2
+9
-2
@@ -403,11 +403,18 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
|
||||
$element.trigger(customEvent, eventData);
|
||||
};
|
||||
|
||||
// Handle mouseenter event to send viewport activation trigger only if there is no focused dropdown
|
||||
const onMouseEnter = () => {
|
||||
if ($(':focus').closest('.dropdown').length) return;
|
||||
|
||||
sendActivationTrigger();
|
||||
};
|
||||
|
||||
// Attach the sendActivationTrigger function to all of the Cornerstone interaction events
|
||||
$element.off(allCornerstoneEvents, sendActivationTrigger);
|
||||
$element.on(allCornerstoneEvents, sendActivationTrigger);
|
||||
$element.off('mouseenter', sendActivationTrigger);
|
||||
$element.on('mouseenter', sendActivationTrigger);
|
||||
$element.off('mouseenter', onMouseEnter);
|
||||
$element.on('mouseenter', onMouseEnter);
|
||||
|
||||
OHIF.viewer.data.loadedSeriesData = layoutManager.viewportData;
|
||||
|
||||
|
||||
Reference in new issue
Block a user