Styling updates to prevent lesion dialogs from going off screen
This commit is contained in:
1 parent
4ae0183a9c
commit
d7d4ea0394
10 files changed
+41
-42
No files matched your search
+9
@@ -94,6 +94,14 @@ function getLesionLocationCallback(measurementData, eventData) {
|
||||
display: 'block'
|
||||
};
|
||||
|
||||
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());
|
||||
|
||||
// Device is touch device or not
|
||||
// If device is touch device, set position center of screen vertically and horizontally
|
||||
if (isTouchDevice()) {
|
||||
@@ -103,6 +111,7 @@ function getLesionLocationCallback(measurementData, eventData) {
|
||||
dialogProperty.left = 0;
|
||||
dialogProperty.right = 0;
|
||||
dialogProperty.bottom = 0;
|
||||
dialogProperty.margin = 'auto';
|
||||
}
|
||||
|
||||
dialog.css(dialogProperty);
|
||||
|
||||
Reference in new issue
Block a user