@humandialog/forms.svelte 1.7.16 → 1.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -122,7 +122,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
122
122
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
123
123
|
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
124
124
|
}
|
|
125
|
-
closeButtonPos = `right: 0.5rem;
|
|
125
|
+
closeButtonPos = `right: 0.5rem; bottom: calc(${margin + maxHeight}px - 1.75rem)`;
|
|
126
126
|
} else {
|
|
127
127
|
let myRect = null;
|
|
128
128
|
if (!fresh) {
|
|
@@ -50,8 +50,9 @@ function calculatePosition(x2, y2, visible2, fresh) {
|
|
|
50
50
|
myRect = null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
let maxHeight;
|
|
53
54
|
if (myRect) {
|
|
54
|
-
|
|
55
|
+
maxHeight = screenRect.height / 2 - margin;
|
|
55
56
|
if (myRect.height < maxHeight)
|
|
56
57
|
maxHeight = myRect.height;
|
|
57
58
|
const width = screenRect.width - 2 * margin;
|
|
@@ -59,13 +60,13 @@ function calculatePosition(x2, y2, visible2, fresh) {
|
|
|
59
60
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
60
61
|
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
61
62
|
} else {
|
|
62
|
-
|
|
63
|
+
maxHeight = screenRect.height / 2 - margin;
|
|
63
64
|
const width = screenRect.width - 2 * margin;
|
|
64
65
|
x2 = margin;
|
|
65
66
|
y2 = screenRect.bottom - maxHeight - margin;
|
|
66
67
|
result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
|
|
67
68
|
}
|
|
68
|
-
closeButtonPos = `right: 0.5rem;
|
|
69
|
+
closeButtonPos = `right: 0.5rem; bottom: calc(${margin + maxHeight}px - 1.75rem)`;
|
|
69
70
|
} else {
|
|
70
71
|
let myRect = null;
|
|
71
72
|
if (!fresh) {
|