@simpleangularcontrols/sac-common 10.0.0-rc.22 → 10.0.0-rc.23

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.
@@ -6912,19 +6912,19 @@
6912
6912
  ? referenceContainer.nativeElement.firstElementChild.getBoundingClientRect()
6913
6913
  : referenceContainer.nativeElement.getBoundingClientRect();
6914
6914
  var tooltipRect = popupcontentcontainer.nativeElement.firstElementChild.getBoundingClientRect();
6915
- var leftPosOk = basePosition.left - tooltipRect.width + arrowWidth * -1 > 0;
6915
+ var leftPosOk = basePosition.left - (tooltipRect.width + arrowWidth * -1) > 0;
6916
6916
  var rightPosOk = basePosition.right + tooltipRect.width + arrowWidth < window.innerWidth;
6917
- var topPosOk = basePosition.top - tooltipRect.height + arrowHeight > 0;
6917
+ var topPosOk = basePosition.top - (tooltipRect.height + arrowHeight) > 0;
6918
6918
  var bottomPosOk = basePosition.bottom + tooltipRect.height + arrowHeight < window.innerHeight;
6919
6919
  var leftHalfPosOk = basePosition.left - tooltipRect.width / 2 > 0;
6920
6920
  var rightHalfPosOk = basePosition.right + tooltipRect.width / 2 < window.innerWidth;
6921
6921
  var topHalfPosOk = basePosition.top - tooltipRect.height / 2 > 0;
6922
6922
  var bottomHalfPosOk = basePosition.bottom + tooltipRect.height / 2 < window.innerHeight;
6923
- if (leftPosOk && topPosOk) {
6923
+ if (topPosOk) {
6924
6924
  // tslint:disable-next-line:no-bitwise
6925
6925
  allowedPositions = allowedPositions | exports.TooltipPosition.topend;
6926
6926
  }
6927
- if (leftPosOk && bottomPosOk) {
6927
+ if (bottomPosOk) {
6928
6928
  // tslint:disable-next-line:no-bitwise
6929
6929
  allowedPositions = allowedPositions | exports.TooltipPosition.bottomend;
6930
6930
  }
@@ -7253,7 +7253,13 @@
7253
7253
  */
7254
7254
  SacBaseDateTimeControl.prototype.getPositionLeft = function () {
7255
7255
  var value = this.popupHelper.getPositionLeft(this.pickerbutton, this.pickercontainer, this.elementRef, this.getArrowWidth(), this.getArrowHeight(), this.position, false);
7256
- this.posPopupLeft = value;
7256
+ // Ensure that pop-ups never appear outside the visible area on the left
7257
+ if (value < 0) {
7258
+ this.posPopupLeft = 5;
7259
+ }
7260
+ else {
7261
+ this.posPopupLeft = value;
7262
+ }
7257
7263
  switch (this.GetPickerPosition()) {
7258
7264
  case exports.TooltipPosition.top:
7259
7265
  case exports.TooltipPosition.bottom:
@@ -7265,6 +7271,10 @@
7265
7271
  this.getPickerWidth() -
7266
7272
  this.getArrowWidth() / 2 -
7267
7273
  this.popupHelper.getContainerWidth(this.pickerbutton, false) / 2;
7274
+ // Correction by Arrow if popup is outside the left margin
7275
+ if (value < 0) {
7276
+ this.posArrowLeft -= value * -1 + 5;
7277
+ }
7268
7278
  break;
7269
7279
  default:
7270
7280
  this.posArrowLeft = null;