@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; top: calc(${y2}px + 0.25rem)`;
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
- let maxHeight = screenRect.height / 2 - margin;
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
- const maxHeight = screenRect.height / 2 - margin;
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; top: calc(${y2}px + 0.25rem)`;
69
+ closeButtonPos = `right: 0.5rem; bottom: calc(${margin + maxHeight}px - 1.75rem)`;
69
70
  } else {
70
71
  let myRect = null;
71
72
  if (!fresh) {
@@ -77,7 +77,6 @@ export function show(x, y, up = false) {
77
77
  setTimeout(() => {
78
78
  const rect = paletteElement.getBoundingClientRect();
79
79
  closeButtonPos = `right: 0.5rem; top: 0.25rem`;
80
- console.log("closeButtonPos", closeButtonPos);
81
80
  }, 0);
82
81
  }
83
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.7.16",
3
+ "version": "1.7.17",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",