Giter Club home page Giter Club logo

Comments (4)

ahmednooor avatar ahmednooor commented on June 14, 2024

@marthesselink hi, that is because i store the window.innerWidth as a viewport variable so that when a screen is zoomed on mobile or touch device swiping left or right does not jump to next or previous image in the zoomed mode. And when it zooms out to its default width the swipe to next or previous starts working. When the view has is changed from vertical to horizontal the new window.innerWidth does not equals with the viewport anymore thus resulting in no swipe to next/previous. if i remove this functionality zooming will either not be possible or very buggy and when you slide a zoomed image to view other parts of the image,, it instead will jump to next/previous images. An alternative could be to switch on the next previous buttons when the new window.innerWidth is not equal to viewport. Since I myself is in the process of learning JS, I will try to provide a working solution for this problem as i learn more. Thanks a lot for your input.

You can read the code regarding touch at the following link from line 295
https://github.com/ahmednooor/halkaBox.js/blob/master/src/halkaBox.js

from halkabox.js.

ahmednooor avatar ahmednooor commented on June 14, 2024

@marthesselink Please check the new url below and let me know if the bug has been fixed. thanks.

https://ahmednooor.github.io/halkaBox.js/testing/

from halkabox.js.

marthesselink avatar marthesselink commented on June 14, 2024

It's working great right now. Nice fix!

from halkabox.js.

ahmednooor avatar ahmednooor commented on June 14, 2024

@marthesselink thanks a lot. and thank you for your input :)

from halkabox.js.

Related Issues (19)

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.