Giter VIP home page Giter VIP logo

Comments (9)

ultimatedelman avatar ultimatedelman commented on July 18, 2024

Sorry for the craziness. This is actually still an issue.

from bespoke.

markdalgleish avatar markdalgleish commented on July 18, 2024

I think your second idea is the best tradeoff of utility and size. Keeping it under 1KB could be tricky, but I can see that this would be a worthwhile change to core.

This is something I think I'll have to implement, since it touches everything- core APIs, tests, docs, and potentially other code will need to be optimised to fit in the 1KB limit.

from bespoke.

ultimatedelman avatar ultimatedelman commented on July 18, 2024

Awesome. I think you'll see my implementation in my pull request is pretty minimal and provides flexible functionality required by someone trying to discern by event type

from bespoke.

markdalgleish avatar markdalgleish commented on July 18, 2024

Yeah, thanks for the pull request. It looks to be following your first suggestion, but I think allowing custom event payloads would solve your problem in a much more minimal and flexible way, since it would allow you to provide metadata around calls to next, prev and slide.

I've begun work on this already, and so far it's looking good.

from bespoke.

ultimatedelman avatar ultimatedelman commented on July 18, 2024

Awesome! Glad I could help :)

from bespoke.

markdalgleish avatar markdalgleish commented on July 18, 2024

I just pushed v0.2.0, which supports custom event data.

You can see an example of it in the readme: https://github.com/markdalgleish/bespoke.js#custom-event-data

Thanks for the feedback, I think this is a really useful feature :)

from bespoke.

ultimatedelman avatar ultimatedelman commented on July 18, 2024

w00t!

I see the example for .next() and assume it works that way for .prev() too. What's the method signature for slide, since that takes a number for the slide index? Is it .slide(index, eventOpts)?

EDIT: a quick glance at the code shows me that this is, in fact, how you're handling it. Sweet!

from bespoke.

markdalgleish avatar markdalgleish commented on July 18, 2024

You can see the full deck API reference here: https://github.com/markdalgleish/bespoke.js#deck-instance-properties :)

from bespoke.

ultimatedelman avatar ultimatedelman commented on July 18, 2024

yep, RTFM. oops

from bespoke.

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.