Code Monkey home page Code Monkey logo

hstack-snap-to-scroll's People

Contributors

flxfischer avatar rocxteady avatar trentguillory avatar ulazdins avatar zmetser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hstack-snap-to-scroll's Issues

HStack alignment

Is there a way to align all the items to the top.
Normally HStack alignment is used to align the items inside to the desired position.
For HStackSnap it is used for where it should snap.

I'm trying to recreate what you have in example 2 but with 3 items above each other. My search result doesn't always give me a multiple of 3 since sometimes there are only 8 results. when this happens the last 2 are aligned in the middle

stuck in the center issue

Hi there,

I found an issue, if you scroll it fast in the beginning, it will stuck in the center sometimes.

I know this is because of ScrollView. When you trigger the ScrollView's scrolling, the Views which are inside the ScrollView, cannot get the DragGesture anymore. But before that, they have already started part of the scrolling, so they cannot finish it. If you use other Containers, like LIst (it also has a similar vertical scrolling behavior), there's no problem like this. Do you have any idea about this?

You could have a look at the effect here.
https://jmp.sh/SdccqRX

Thanks.

It is not working on orientation change.

If you change orientation to landscape, HStackSnap not working as expected. I think there is a problem because the width of the stack is changed. Is there any solution for this?

HStackSnap(alignment: .leading(20)) {
  ForEachWithIndex(elements: self.dayStore.days) { index, day in
      GeometryReader { cardGeo in
          VStack {
              Text("cao \(index)")
          }
          .frame(maxWidth: .infinity)
          .frame(maxHeight: .infinity)
          .background(RoundedCorners(color: Color("Neutral White"), tl: 20, tr: 20, bl: 20, br: 20))
          .rotation3DEffect(Angle(degrees: (Double(cardGeo.frame(in: .global).minX))) / -30, axis: (x: 0, y: 10.0, z: 0))
          .snapAlignmentHelper(id: day.id)
      }
      .frame(width: abs(geo.size.width - 80))
      .frame(maxHeight: .infinity)
  }
}
.padding(.top, 10)
.padding(.bottom, 10)

Slider in View causes HStack to move also

I have a Slider in the View and when I move the slider, the View in the HStack also moves in the direction that I have moved the slider. Is there anyway to disable the gesture action in this lib while the Slider is moving?

Let me know if any more information is required

Does not work when nested in a `NavigationView`

Hello! I'm noticing an issue where the library doesn't work when nested in a NavigationView. The views are displayed correctly, however I am unable to scroll only when nested in a NavigationView. I have included a very simple implementation reusing your demo to show what is happening.
card test.zip

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.