Skip to content

Commit

Permalink
jQuery Zoom:
Browse files Browse the repository at this point in the history
- ensure that Livedata will be hidden as long as contextmenu is open.
  • Loading branch information
browniebraun committed Feb 9, 2025
1 parent bf2f092 commit 3a66ba0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/js/jquery.zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@
}

function zoomLiveData_show(e) {
if (zoom.raw.data.length > 0) {
if (zoom.raw.data.length > 0 && zoom.refs.menu.css('display') === 'none') {
if (e.type === 'mousemove' || e.type === 'mouseenter') {
let container_y_pos = e.pageY;
let container_y_offset = 10;
Expand Down Expand Up @@ -1354,6 +1354,9 @@
let menu_height_level_1 = Math.abs($('.zoom-menu .first_li span').outerHeight());
let menu_height_level_2 = Math.abs($('.zoom-menu .sec_li span').outerHeight());

/* hide livedata */
zoomLiveData_hide();

/* let the menu occur on the right per default if possible, otherwise move it to the left: */
if (( menu_x_pos + menu_x_offset + menu_width) > window_size_x_2 ) {
menu_x_offset += (-1*menu_width);
Expand All @@ -1380,7 +1383,6 @@
function zoomContextMenu_toggle(e){
(zoom.refs.menu.css('display') === 'none') ? zoomContextMenu_show(e) : zoomContextMenu_hide();
}

};

})(jQuery);

0 comments on commit 3a66ba0

Please sign in to comment.