@tetacom/ng-components 1.0.144 → 1.0.145

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.
@@ -1154,9 +1154,11 @@ class PositionUtil {
1154
1154
  rect.minWidth = containerWidth;
1155
1155
  }
1156
1156
  if (verticalAlign === VerticalAlign.auto) {
1157
- if (containerPosition.bottom +
1158
- (elementPosition.bottom - elementPosition.top) <=
1159
- window.innerHeight) {
1157
+ if (containerPosition.bottom <=
1158
+ window.innerHeight / 2 ||
1159
+ containerPosition.bottom +
1160
+ (elementPosition.bottom - elementPosition.top) <=
1161
+ window.innerHeight) {
1160
1162
  verticalAlign = VerticalAlign.bottom;
1161
1163
  }
1162
1164
  else {
@@ -1164,9 +1166,11 @@ class PositionUtil {
1164
1166
  }
1165
1167
  }
1166
1168
  if (verticalAlign === VerticalAlign.innerAuto) {
1167
- if (containerPosition.bottom +
1168
- (elementPosition.bottom - elementPosition.top) <=
1169
- window.innerHeight) {
1169
+ if (containerPosition.bottom <=
1170
+ window.innerHeight / 2 ||
1171
+ containerPosition.bottom +
1172
+ (elementPosition.bottom - elementPosition.top) <=
1173
+ window.innerHeight) {
1170
1174
  verticalAlign = VerticalAlign.innerBottom;
1171
1175
  }
1172
1176
  else {