Skip to content

Commit

Permalink
fixed a regression when hiding the toolbar from web.config
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrozor committed Nov 13, 2020
1 parent 87534d1 commit 86c6d9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Myrtille.Web/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ function Display(base, config, dialog)
}

// image quality selector
document.getElementById('imageQuality').value = config.getImageQuality();
var imageQuality = document.getElementById('imageQuality');
if (imageQuality != null)
{
imageQuality.value = config.getImageQuality();
}

// reasonable number of images to display when using divs
dialog.showStat(dialog.getShowStatEnum().IMAGE_COUNT_OK, (config.getDisplayMode() == config.getDisplayModeEnum().CANVAS ? 'N/A' : config.getImageCountOk()));
Expand Down
2 changes: 1 addition & 1 deletion Myrtille.Web/js/user/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Mouse(base, config, dialog, display, network, user)
mouseY = (e.pageY ? e.pageY : e.clientY + scrollTop) - display.getVerticalOffset();

// the mouse event is within the toolbar area
if (mouseY <= toolbar.clientHeight)
if (toolbar != null && mouseY <= toolbar.clientHeight)
return false;

//dialog.showDebug('mouse X: ' + mouseX + ', Y: ' + mouseY);
Expand Down

0 comments on commit 86c6d9c

Please sign in to comment.