@qyu/reactcmp-dropdown 2.0.0 → 2.0.1

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.
@@ -485,15 +485,16 @@ const normalize_align$1 = function (params) {
485
485
  }
486
486
  else {
487
487
  const point = axis_main.container_pos + axis_main.container_size / 2;
488
+ const spacereq = axis_main.list_size / 2;
488
489
  const freespace_reverse = point;
489
490
  const freespace_direct = axis_main.screen_size - point;
490
- if (axis_main.list_size >= freespace_reverse) {
491
+ if (spacereq >= freespace_reverse) {
491
492
  params.reverse_set(false);
492
493
  axis_main.flow_direct.position_set(0);
493
494
  axis_main.flow_reverse.position_set(null);
494
495
  axis_main.size_set(axis_main.list_size);
495
496
  }
496
- else if (axis_main.list_size >= freespace_direct) {
497
+ else if (spacereq >= freespace_direct) {
497
498
  params.reverse_set(true);
498
499
  axis_main.flow_reverse.position_set(0);
499
500
  axis_main.flow_direct.position_set(null);
@@ -501,7 +502,7 @@ const normalize_align$1 = function (params) {
501
502
  }
502
503
  else {
503
504
  params.reverse_set(false);
504
- axis_main.flow_direct.position_set(point - axis_main.list_size / 2);
505
+ axis_main.flow_direct.position_set(point - spacereq);
505
506
  axis_main.flow_reverse.position_set(null);
506
507
  axis_main.size_set(axis_main.list_size);
507
508
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qyu/reactcmp-dropdown",
3
3
  "type": "module",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "main": "./build/bundle/entry/index.js",
6
6
  "description": "React Components for Dropdown Positioning",
7
7
  "keywords": [