|
1 | 1 | /**
|
2 |
| - * Intro.js v0.9.0 |
| 2 | + * Intro.js v1.0.0 |
3 | 3 | * https://github.com/usablica/intro.js
|
4 | 4 | * MIT licensed
|
5 | 5 | *
|
|
19 | 19 | }
|
20 | 20 | } (this, function (exports) {
|
21 | 21 | //Default config/variables
|
22 |
| - var VERSION = '0.9.0'; |
| 22 | + var VERSION = '1.0.0'; |
23 | 23 |
|
24 | 24 | /**
|
25 | 25 | * IntroJs main class
|
|
216 | 216 | window.addEventListener('keydown', self._onKeyDown, true);
|
217 | 217 | }
|
218 | 218 | //for window resize
|
219 |
| - window.addEventListener("resize", self._onResize, true); |
| 219 | + window.addEventListener('resize', self._onResize, true); |
220 | 220 | } else if (document.attachEvent) { //IE
|
221 | 221 | if (this._options.keyboardNavigation) {
|
222 | 222 | document.attachEvent('onkeydown', self._onKeyDown);
|
223 | 223 | }
|
224 | 224 | //for window resize
|
225 |
| - document.attachEvent("onresize", self._onResize); |
| 225 | + document.attachEvent('onresize', self._onResize); |
226 | 226 | }
|
227 | 227 | }
|
228 | 228 | return false;
|
|
343 | 343 |
|
344 | 344 | //remove disableInteractionLayer
|
345 | 345 | var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');
|
346 |
| - if(disableInteractionLayer){ |
| 346 | + if (disableInteractionLayer) { |
347 | 347 | disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);
|
348 | 348 | }
|
349 |
| - |
| 349 | + |
350 | 350 | //remove intro floating element
|
351 | 351 | var floatingElement = document.querySelector('.introjsFloatingElement');
|
352 | 352 | if (floatingElement) {
|
|
511 | 511 | }
|
512 | 512 | }
|
513 | 513 |
|
514 |
| - function _disableInteraction(){ |
515 |
| - disableInteractionLayer = document.querySelector('.introjs-disableInteraction'); |
516 |
| - if (disableInteractionLayer === null){ |
| 514 | + /** |
| 515 | + * Add disableinteraction layer and adjust the size and position of the layer |
| 516 | + * |
| 517 | + * @api private |
| 518 | + * @method _disableInteraction |
| 519 | + */ |
| 520 | + function _disableInteraction () { |
| 521 | + var disableInteractionLayer = document.querySelector('.introjs-disableInteraction'); |
| 522 | + if (disableInteractionLayer === null) { |
517 | 523 | disableInteractionLayer = document.createElement('div');
|
518 | 524 | disableInteractionLayer.className = 'introjs-disableInteraction';
|
519 | 525 | this._targetElement.appendChild(disableInteractionLayer);
|
520 | 526 | }
|
521 |
| - _setHelperLayerPosition.call(this, disableInteractionLayer); |
522 | 527 |
|
| 528 | + _setHelperLayerPosition.call(this, disableInteractionLayer); |
523 | 529 | }
|
| 530 | + |
524 | 531 | /**
|
525 | 532 | * Show an element on the page
|
526 | 533 | *
|
|
634 | 641 | self.goToStep(this.getAttribute('data-stepnumber'));
|
635 | 642 | };
|
636 | 643 |
|
637 |
| - if (i === (targetElement.step-1)) anchorLink.className = "active"; |
| 644 | + if (i === (targetElement.step-1)) anchorLink.className = 'active'; |
638 | 645 |
|
639 | 646 | anchorLink.href = 'javascript:void(0);';
|
640 | 647 | anchorLink.innerHTML = " ";
|
|
723 | 730 | }
|
724 | 731 |
|
725 | 732 | //disable interaction
|
726 |
| - if (this._options.disableInteraction === true){ |
| 733 | + if (this._options.disableInteraction === true) { |
727 | 734 | _disableInteraction.call(self);
|
728 | 735 | }
|
| 736 | + |
729 | 737 | if (this._currentStep == 0 && this._introItems.length > 1) {
|
730 | 738 | prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled';
|
731 | 739 | nextTooltipButton.className = 'introjs-button introjs-nextbutton';
|
|
0 commit comments