Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "driver.js", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A light-weight, no-dependency, vanilla JavaScript library to drive the user's focus across the page", | ||
@@ -5,0 +5,0 @@ "main": "dist/driver.min.js", |
@@ -159,2 +159,3 @@ <h1 align="center"><img src="./demo/images/driver.png" /><br> Driver.js</h1> | ||
closeBtnText: 'Close', // Text on the close button for this step | ||
stageBackground: '#ffffff', // Background color for the staged behind highlighted element | ||
nextBtnText: 'Next', // Next button text for this step | ||
@@ -178,2 +179,3 @@ prevBtnText: 'Previous', // Previous button text for this step | ||
element: '#some-item', // Query selector for the item to be highlighted | ||
stageBackground: '#ffffff', // This will override the one set in driver | ||
popover: { // There will be no popover if empty or not given | ||
@@ -260,3 +262,3 @@ title: 'Title', // Title on the popover | ||
*Note –* Do not forget to add `e.stopPropagation()` to the `click` binding that triggers driver | ||
**Note –** Do not forget to add `e.stopPropagation()` to the `click` binding that triggers driver | ||
@@ -274,3 +276,3 @@ ![](./demo/images/split.png) | ||
- [ ] Add type definitions | ||
- [ ] Create wrappers for Angular and React | ||
- [ ] Create wrappers for Angular, Vue and React | ||
- [ ] Write tests | ||
@@ -277,0 +279,0 @@ |
@@ -88,4 +88,5 @@ import { CLASS_NO_ANIMATION, ID_STAGE, STAGE_HTML } from '../common/constants'; | ||
this.node.style.left = `${position.left - (requiredPadding / 2)}px`; | ||
this.node.style.backgroundColor = this.options.stageBackground; | ||
} | ||
} | ||
@@ -29,7 +29,8 @@ import Overlay from './core/overlay'; | ||
this.options = { | ||
animate: SHOULD_ANIMATE_OVERLAY, // Whether to animate or not | ||
opacity: OVERLAY_OPACITY, // Overlay opacity | ||
padding: OVERLAY_PADDING, // Spacing around the element from the overlay | ||
animate: SHOULD_ANIMATE_OVERLAY, // Whether to animate or not | ||
opacity: OVERLAY_OPACITY, // Overlay opacity | ||
padding: OVERLAY_PADDING, // Spacing around the element from the overlay | ||
scrollIntoViewOptions: null, // Options to be passed to `scrollIntoView` | ||
allowClose: SHOULD_OUTSIDE_CLICK_CLOSE, // Whether to close overlay on click outside the element | ||
stageBackground: '#ffffff', // Background color for the stage | ||
onHighlightStarted: () => { // When element is about to be highlighted | ||
@@ -284,4 +285,9 @@ }, | ||
const stage = new Stage(this.options, this.window, this.document); | ||
const stageOptions = { | ||
...this.options, | ||
...elementOptions, | ||
}; | ||
const stage = new Stage(stageOptions, this.window, this.document); | ||
return new Element({ | ||
@@ -288,0 +294,0 @@ node: domElement, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
394342
1670
285