@easyquery/ui 7.3.5-rc02 → 7.3.5-rc03
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.
package/dist/easyquery.ui.cjs.js
CHANGED
|
@@ -1436,14 +1436,14 @@ class MenuLevel {
|
|
|
1436
1436
|
this.scrollDiv.style.width = "auto";
|
|
1437
1437
|
this.scrollDiv.style.height = "auto";
|
|
1438
1438
|
const useMaxSpace = this.parentMenu.options.useMaxSpace;
|
|
1439
|
-
const viewportHeight =
|
|
1439
|
+
const viewportHeight = ui.getViewportSize().height;
|
|
1440
1440
|
const top = y - scrollY;
|
|
1441
1441
|
const bottom = viewportHeight - top;
|
|
1442
1442
|
const anchorRect = anchor ? anchor.getBoundingClientRect() : null;
|
|
1443
1443
|
const anchorHeight = anchorRect ? anchorRect.height : 0;
|
|
1444
1444
|
const magic = 24;
|
|
1445
|
-
if (this.levelIndex
|
|
1446
|
-
let maxHeight = viewportHeight;
|
|
1445
|
+
if (this.levelIndex > 0 || useMaxSpace) {
|
|
1446
|
+
let maxHeight = viewportHeight - 30;
|
|
1447
1447
|
if (this.searchDiv) {
|
|
1448
1448
|
maxHeight -= this.searchDiv.scrollHeight;
|
|
1449
1449
|
}
|
|
@@ -1458,10 +1458,10 @@ class MenuLevel {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
else {
|
|
1460
1460
|
if (top < bottom) {
|
|
1461
|
-
levelStyle.top = y - top + 'px';
|
|
1461
|
+
levelStyle.top = y - top + 5 + 'px';
|
|
1462
1462
|
}
|
|
1463
1463
|
else {
|
|
1464
|
-
levelStyle.top = Math.max(
|
|
1464
|
+
levelStyle.top = Math.max(5, viewportHeight - levelDivHeight - 30) + 'px';
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
package/dist/easyquery.ui.esm.js
CHANGED
|
@@ -1434,14 +1434,14 @@ class MenuLevel {
|
|
|
1434
1434
|
this.scrollDiv.style.width = "auto";
|
|
1435
1435
|
this.scrollDiv.style.height = "auto";
|
|
1436
1436
|
const useMaxSpace = this.parentMenu.options.useMaxSpace;
|
|
1437
|
-
const viewportHeight =
|
|
1437
|
+
const viewportHeight = getViewportSize().height;
|
|
1438
1438
|
const top = y - scrollY;
|
|
1439
1439
|
const bottom = viewportHeight - top;
|
|
1440
1440
|
const anchorRect = anchor ? anchor.getBoundingClientRect() : null;
|
|
1441
1441
|
const anchorHeight = anchorRect ? anchorRect.height : 0;
|
|
1442
1442
|
const magic = 24;
|
|
1443
|
-
if (this.levelIndex
|
|
1444
|
-
let maxHeight = viewportHeight;
|
|
1443
|
+
if (this.levelIndex > 0 || useMaxSpace) {
|
|
1444
|
+
let maxHeight = viewportHeight - 30;
|
|
1445
1445
|
if (this.searchDiv) {
|
|
1446
1446
|
maxHeight -= this.searchDiv.scrollHeight;
|
|
1447
1447
|
}
|
|
@@ -1456,10 +1456,10 @@ class MenuLevel {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
else {
|
|
1458
1458
|
if (top < bottom) {
|
|
1459
|
-
levelStyle.top = y - top + 'px';
|
|
1459
|
+
levelStyle.top = y - top + 5 + 'px';
|
|
1460
1460
|
}
|
|
1461
1461
|
else {
|
|
1462
|
-
levelStyle.top = Math.max(
|
|
1462
|
+
levelStyle.top = Math.max(5, viewportHeight - levelDivHeight - 30) + 'px';
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyquery/ui",
|
|
3
|
-
"version": "7.3.5-
|
|
3
|
+
"version": "7.3.5-rc03",
|
|
4
4
|
"description": "EasyQuery.JS Community UI widgets",
|
|
5
5
|
"types": "./dist/types/public_api.d.ts",
|
|
6
6
|
"main": "./dist/easyquery.ui.cjs.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"bugs": "https://korzh.com/support",
|
|
31
31
|
"license": "LGPL-3.0",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@easyquery/core": "^7.3.5-
|
|
33
|
+
"@easyquery/core": "^7.3.5-rc03"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|