Styling updates to prevent lesion dialogs from going off screen

This commit is contained in:
Erik Ziegler committed 2015-12-21 12:11:17 -05:00
1 parent 4ae0183a9c
commit d7d4ea0394
10 files changed
+41 -42

No files matched your search

@@ -44,6 +44,14 @@ changeNonTargetResponse = function(measurementData, eventData, doneCallback) {
} else {
dialogProperty.top = eventData.currentPoints.page.y - dialog.outerHeight() - 40;
dialogProperty.left = eventData.currentPoints.page.x - dialog.outerWidth() / 2;
var pageHeight = $(window).height();
dialogProperty.top = Math.max(dialogProperty.top, 0);
dialogProperty.top = Math.min(dialogProperty.top, pageHeight - dialog.outerHeight());
var pageWidth = $(window).width();
dialogProperty.left = Math.max(dialogProperty.left, 0);
dialogProperty.left = Math.min(dialogProperty.left, pageWidth - dialog.outerWidth());
}
dialog.css(dialogProperty);