|
60 | 60 | showBullets: true, |
61 | 61 | /* Show tour progress? */ |
62 | 62 | showProgress: false, |
| 63 | + /* Show arrow to dialog */ |
| 64 | + showArrow: false, |
63 | 65 | /* Scroll to highlighted element? */ |
64 | 66 | scrollToElement: true, |
65 | 67 | /* Set the overlay opacity */ |
|
509 | 511 | var tooltipLayerStyleLeft = 0; |
510 | 512 | switch (currentTooltipPosition) { |
511 | 513 | case 'top': |
512 | | - arrowLayer.className = 'introjs-arrow bottom'; |
| 514 | + if (this._options.showArrow) { |
| 515 | + arrowLayer.className = 'introjs-arrow bottom'; |
| 516 | + } |
513 | 517 |
|
514 | 518 | tooltipLayerStyleLeft = 15; |
515 | 519 | _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer); |
|
520 | 524 | if (targetOffset.top + tooltipOffset.height > windowSize.height) { |
521 | 525 | // In this case, right would have fallen below the bottom of the screen. |
522 | 526 | // Modify so that the bottom of the tooltip connects with the target |
523 | | - arrowLayer.className = "introjs-arrow left-bottom"; |
| 527 | + if (this._options.showArrow) { |
| 528 | + arrowLayer.className = "introjs-arrow left-bottom"; |
| 529 | + } |
524 | 530 | tooltipLayer.style.top = "-" + (tooltipOffset.height - targetOffset.height - 20) + "px"; |
525 | 531 | } |
526 | | - else { |
| 532 | + else if (this._options.showArrow) { |
527 | 533 | arrowLayer.className = 'introjs-arrow left'; |
528 | 534 | } |
529 | 535 | break; |
|
536 | 542 | // In this case, left would have fallen below the bottom of the screen. |
537 | 543 | // Modify so that the bottom of the tooltip connects with the target |
538 | 544 | tooltipLayer.style.top = "-" + (tooltipOffset.height - targetOffset.height - 20) + "px"; |
539 | | - arrowLayer.className = 'introjs-arrow right-bottom'; |
| 545 | + if (this._options.showArrow) { |
| 546 | + arrowLayer.className = 'introjs-arrow right-bottom'; |
| 547 | + } |
540 | 548 | } |
541 | | - else { |
| 549 | + else if (this._options.showArrow) { |
542 | 550 | arrowLayer.className = 'introjs-arrow right'; |
| 551 | + |
543 | 552 | } |
544 | 553 | tooltipLayer.style.right = (targetOffset.width + 20) + 'px'; |
545 | 554 |
|
|
560 | 569 |
|
561 | 570 | break; |
562 | 571 | case 'bottom-right-aligned': |
563 | | - arrowLayer.className = 'introjs-arrow top-right'; |
| 572 | + if (this._options.showArrow) { |
| 573 | + arrowLayer.className = 'introjs-arrow top-right'; |
| 574 | + } |
564 | 575 |
|
565 | 576 | var tooltipLayerStyleRight = 0; |
566 | 577 | _checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer); |
567 | 578 | tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; |
568 | 579 | break; |
569 | 580 |
|
570 | 581 | case 'bottom-middle-aligned': |
571 | | - arrowLayer.className = 'introjs-arrow top-middle'; |
| 582 | + if (this._options.showArrow) { |
| 583 | + arrowLayer.className = 'introjs-arrow top-middle'; |
| 584 | + } |
572 | 585 |
|
573 | 586 | var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; |
574 | 587 | if (_checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) { |
|
578 | 591 | tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; |
579 | 592 | break; |
580 | 593 | default: |
581 | | - arrowLayer.className = 'introjs-arrow top'; |
| 594 | + if (this._options.showArrow) { |
| 595 | + arrowLayer.className = 'introjs-arrow top'; |
| 596 | + } |
582 | 597 |
|
583 | 598 | _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer); |
584 | 599 | tooltipLayer.style.top = (targetOffset.height + 20) + 'px'; |
|
0 commit comments