@kerkhoff-ict/solora 2.1.1 → 2.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -2067,8 +2067,8 @@ function initContextMenu() {
2067
2067
  let posY = e.clientY;
2068
2068
  const menuWidth = menu.offsetWidth;
2069
2069
  const menuHeight = menu.offsetHeight;
2070
- if (posX + menuWidth > window.innerWidth) posX -= menuWidth;
2071
- if (posY + menuHeight > window.innerHeight) posY -= menuHeight;
2070
+ posX = Math.max(0, posX);
2071
+ posY = Math.max(0, posY);
2072
2072
  menu.style.left = `${posX}px`;
2073
2073
  menu.style.top = `${posY}px`;
2074
2074
  requestAnimationFrame(() => menu.classList.add("visible"));
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@kerkhoff-ict/solora",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Simple CSS component library",
5
- "type": "module",
6
5
  "main": "dist/index.js",
7
6
  "style": "dist/index.css",
8
7
  "files": [