Skip to content

Commit 9bb7f19

Browse files
committed
Add opacity option
1 parent 10fab7d commit 9bb7f19

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

intro.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
/* Show tour bullets? */
5656
showBullets: true,
5757
/* Scroll to highlighted element? */
58-
scrollToElement: true
58+
scrollToElement: true,
59+
/* Set the overlay opacity */
60+
overlayOpacity: .8
5961
};
6062
}
6163

@@ -554,7 +556,7 @@
554556

555557
//show the tooltip
556558
oldtooltipContainer.style.opacity = 1;
557-
oldHelperNumberLayer.style.opacity = 1;
559+
if (oldHelperNumberLayer) oldHelperNumberLayer.style.opacity = 1;
558560
}, 350);
559561

560562
} else {
@@ -848,9 +850,10 @@
848850
};
849851

850852
setTimeout(function() {
851-
styleText += 'opacity: .8;';
853+
styleText += 'opacity: ' + self._options.overlayOpacity.toString() + ';';
852854
overlayLayer.setAttribute('style', styleText);
853855
}, 10);
856+
854857
return true;
855858
}
856859

0 commit comments

Comments
 (0)