@touchpoll/tp-survey 0.0.43 → 0.0.44

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.
@@ -510,7 +510,6 @@ class AlternativesContainerDirective {
510
510
  const containerHeightFull = this.elementRef.nativeElement.offsetHeight;
511
511
  // const alternativeColumnCount = question.TabletViewAlternativeColumnCount ?? 1;
512
512
  let alternativeColumnCount;
513
- debugger;
514
513
  if (isMobile) {
515
514
  alternativeColumnCount = this.question().MobileViewAlternativeColumnCount ?? 1; //if 0 will be 1
516
515
  }
@@ -543,10 +542,14 @@ class AlternativesContainerDirective {
543
542
  width = question.AlternativeWidth ?? 300;
544
543
  height = question.AlternativeHeight ?? 50;
545
544
  }
546
- const deltaVertical = containerHeightFull - height * rowCount - verticalDistance * (rowCount - 1);
545
+ let deltaVertical = containerHeightFull - height * rowCount - verticalDistance * (rowCount - 1);
547
546
  const deltaHorizontal = (containerWidthFull - width * columnCount - horizontalDistance * (columnCount - 1)) / 2 - defaultHorizontalPadding;
547
+ if (isMobile && deltaVertical < 0) {
548
+ deltaVertical = 0;
549
+ }
548
550
  let rowNum = -1;
549
551
  let colNum = 0;
552
+ console.log(containerHeightFull, height * rowCount, verticalDistance, (rowCount - 1));
550
553
  alternatives.forEach((alt, index) => {
551
554
  let left = 0;
552
555
  let top = 0;