hamzus-ui 0.0.122 → 0.0.123

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.122",
3
+ "version": "0.0.123",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -173,8 +173,12 @@
173
173
  }
174
174
 
175
175
  // si il est hors de la vue (horizontalement) alors on le set a droite (fix pour la table)
176
- if (triggerRight <= 0) {
177
- leftCalc = window.innerWidth - contentWidth
176
+ if (triggerRight <= ((contentWidth - triggerWidth) / 2)) {
177
+ leftCalc = window.innerWidth - contentWidth - padding
178
+ }
179
+
180
+ if (triggerLeft <= ((contentWidth - triggerWidth) / 2)) {
181
+ leftCalc = padding
178
182
  }
179
183
 
180
184
  top = topCalc;
@@ -206,6 +210,15 @@
206
210
  // on contraint la max height du dropdown
207
211
  }
208
212
 
213
+ // si il est hors de la vue (horizontalement) alors on le set a droite (fix pour la table)
214
+ if (triggerRight <= ((contentWidth - triggerWidth) / 2)) {
215
+ leftCalc = window.innerWidth - contentWidth - padding
216
+ }
217
+
218
+ if (triggerLeft <= ((contentWidth - triggerWidth) / 2)) {
219
+ leftCalc = padding
220
+ }
221
+
209
222
  top = topCalc;
210
223
  left = leftCalc;
211
224
  },