Giter Club home page Giter Club logo

Comments (4)

moghya avatar moghya commented on May 18, 2024

So basically you want to have delays/event-occurene between two steps ?

from driver.js.

kamranahmedse avatar kamranahmedse commented on May 18, 2024

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.

OClement avatar OClement commented on May 18, 2024

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.

Avejack avatar Avejack commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.