Comments (4)
So basically you want to have delays/event-occurene between two steps ?
from driver.js.
Hey, we already have the hooks to manipulate but this is out of the scope. Ideally, you should not have the animation when the Driver
is active because it will be hidden under the overlay anyway. You can maybe hook into one of the events and see if the element is hidden and is about to be shown, just show it without animation.
from driver.js.
Yeah, so I tried to "dumb down" the use case a bit
But in reality, my particular use case is that I need to dispatch an action (using NGRX/Redux) in order to change the state of the app, before highlighting an element.
Basically, imagine clicking a toolbar where clicking a button would show/hide different content in a panel. So I would start the tour with the default state, describing a thing or two, then on "next" I would need to trigger an event so that the UI would change and the tour would proceed.
I can make use of onHighlightStarted/onDeselected, but the problem is that even then, the callback is called to quickly and the DOM doesn't have time to change , so Driver is trying to highlest an element that doesn't exist yet
Is that clearer?
from driver.js.
I think this should not have been closed. This is a very cool Feature Request!
I would think of this as an interactive tutorial. For example: Driver highlights an element and forces the user to press this button. On button press and XHR call gets fired. Now it would be cool if the "onNext"-hook would expect a promise and wait for it to resolve. After the promise resolves the next step gets triggered.
EDIT: NVM i've seen the docs provide a "preventMove" for exactly this function! Nice library.
from driver.js.
Related Issues (20)
- How to add image in popover HOT 1
- 'Unable to preventDefault inside passive event listener invocation.' Console Error When Hooking into Lifecycle Methods
- Purely programmatic step?
- Add onOverlayClicked callback
- Can ‘getConfig("animate")’ be replaced with ‘isAnimatedTour’ ?
- Can ‘getConfig("animate")’ be replaced with ‘isAnimatedTour’ ?
- Is there a way to make the overlay mask fixed to an element area instead of the entire body? HOT 1
- (Re) Support the feature to move next on click outside the element
- Can the position of a popover be fixed?
- Can this work with Canvas elements? HOT 2
- How can I make the popup display while the project can be clicked normally?
- How can I customize a popover and button using MUI?
- Step positions are erratic HOT 1
- Missing data
- [Suggestion] Add disableActiveInteraction to Drive Step Configuration.
- Skip step for missing element
- [Feature Request] Expose step index in DOM HOT 1
- Hide "previous" button on step 1 HOT 1
- [Bug] Methods hasNextStep and hasPreviousStep do not return boolean HOT 1
- [Feature Request] Lifecycle events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from driver.js.