Skip to content

Commit 9e226de

Browse files
committed
change coding style issues + change version number to 1.0.0
1 parent ed34835 commit 9e226de

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

intro.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Intro.js v0.9.0
2+
* Intro.js v1.0.0
33
* https://github.com/usablica/intro.js
44
* MIT licensed
55
*
@@ -19,7 +19,7 @@
1919
}
2020
} (this, function (exports) {
2121
//Default config/variables
22-
var VERSION = '0.9.0';
22+
var VERSION = '1.0.0';
2323

2424
/**
2525
* IntroJs main class
@@ -216,13 +216,13 @@
216216
window.addEventListener('keydown', self._onKeyDown, true);
217217
}
218218
//for window resize
219-
window.addEventListener("resize", self._onResize, true);
219+
window.addEventListener('resize', self._onResize, true);
220220
} else if (document.attachEvent) { //IE
221221
if (this._options.keyboardNavigation) {
222222
document.attachEvent('onkeydown', self._onKeyDown);
223223
}
224224
//for window resize
225-
document.attachEvent("onresize", self._onResize);
225+
document.attachEvent('onresize', self._onResize);
226226
}
227227
}
228228
return false;
@@ -343,10 +343,10 @@
343343

344344
//remove disableInteractionLayer
345345
var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');
346-
if(disableInteractionLayer){
346+
if (disableInteractionLayer) {
347347
disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);
348348
}
349-
349+
350350
//remove intro floating element
351351
var floatingElement = document.querySelector('.introjsFloatingElement');
352352
if (floatingElement) {
@@ -511,16 +511,23 @@
511511
}
512512
}
513513

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) {
517523
disableInteractionLayer = document.createElement('div');
518524
disableInteractionLayer.className = 'introjs-disableInteraction';
519525
this._targetElement.appendChild(disableInteractionLayer);
520526
}
521-
_setHelperLayerPosition.call(this, disableInteractionLayer);
522527

528+
_setHelperLayerPosition.call(this, disableInteractionLayer);
523529
}
530+
524531
/**
525532
* Show an element on the page
526533
*
@@ -634,7 +641,7 @@
634641
self.goToStep(this.getAttribute('data-stepnumber'));
635642
};
636643

637-
if (i === (targetElement.step-1)) anchorLink.className = "active";
644+
if (i === (targetElement.step-1)) anchorLink.className = 'active';
638645

639646
anchorLink.href = 'javascript:void(0);';
640647
anchorLink.innerHTML = " ";
@@ -723,9 +730,10 @@
723730
}
724731

725732
//disable interaction
726-
if (this._options.disableInteraction === true){
733+
if (this._options.disableInteraction === true) {
727734
_disableInteraction.call(self);
728735
}
736+
729737
if (this._currentStep == 0 && this._introItems.length > 1) {
730738
prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled';
731739
nextTooltipButton.className = 'introjs-button introjs-nextbutton';

0 commit comments

Comments
 (0)