Giter Site home page Giter Site logo

Comments (9)

loup-brun avatar loup-brun commented on August 29, 2024 2

Great! So the only thing left is feedback from @AlexanderYW to make sure the issue has been resolved.

from swipe.

loup-brun avatar loup-brun commented on August 29, 2024

Could you be more specific about the inline styling you find should be removed?

Regarding your piece of code, you should call the setup function rather than instantiating Swipe on every resize event.

$(window).on('resize', function() {
  if($(window).width() < 800) {
    window.mySwipe.setup();
  } else {
    window.mySwipe.kill()
  }
});

I am creating a fix to remove the cloned slides on kill (special case for 2 slides).

from swipe.

loup-brun avatar loup-brun commented on August 29, 2024

There is an issue when only using the setup method: some events are not registered inside that function. Will look into it during the fix.

from swipe.

AlexanderYW avatar AlexanderYW commented on August 29, 2024

Its the inline styling on the swipe views/"pages" (.swipe -> .swipe-warp -> div <- this)

Regarding the .setup() your right, i forgot about that one, thanks!

When are your fix going live?, not sure if the NPM is updating from Github or you have to tell it to, because I'm using the one from there :)

from swipe.

AlexanderYW avatar AlexanderYW commented on August 29, 2024

About the issue with .setup(), same goes for when you are using swipe through jquery "$('#swipe').Swipe()", callback does not trigger i think it was

from swipe.

loup-brun avatar loup-brun commented on August 29, 2024

The issue should now be fixed, see the latest release (2.0.12).

Summary:

  • Inline styles applied by Swipe (transition, transition-duration, etc.) are now removed.
  • Event handlers are bound during the setup (and not only when calling a new Swipe instance).
  • Cloned slides for 2-slide scenario are tagged and removed on kill to avoid confusion with original ones.

Let me know if you still have some issues!

from swipe.

loup-brun avatar loup-brun commented on August 29, 2024

As for the other repositories, such as NPM and Bower… I guess @lyfeyaj has to push the changes there?

from swipe.

lyfeyaj avatar lyfeyaj commented on August 29, 2024

@loup-brun @AlexanderYW

Version 2.0.12 has been pushed to npm registry.
Bower will be updated automatically after bower.json changed.

from swipe.

AlexanderYW avatar AlexanderYW commented on August 29, 2024

Awesome job guys, it works like a charm now!

I'm closing this one, since the problem is solved

from swipe.

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.