Git Product home page Git Product logo

marquee's People

Contributors

catchzeng 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

Watchers

 avatar  avatar  avatar

marquee's Issues

Continuous text/ initial start position?

Love this plugin, it's exactly what I'm looking for. I've got 4 tickers stacked, I have the duration set to 20000 as I"m looking for a very very slow ticker.

Here's the problem, with it sliding in from the right, it takes about a minute to reach:

image

Of course, it's an extremely slow ticker. But I would like it to start from the position left aligned and slide from there, e.g.

image

also, when the text ends, you get a long blank period before the text repeats. Any way of reducing this gap to zero so that the text is continuous?

I'm happy to roll up my sleeves and have a go at updating the code if you can give me some pointers and I could submit a PR.

One other thing FYI I am occasionally getting some flickering and data cut off with long text - this one counts from item 1 to item 100:

image

vertical alignment does not appear to be fixed

I have this code:

VStack(alignment: .leading) {
                Marquee {
                    Text("Tag \(viewModel.courseDay.indexRank) - \(viewModel.courseDay.title ?? "KEIN TITEL GEGEBEN!")") //TODO: add marqueeText to entire app
                        .font(.headline)
                        .fontWeight(.semibold)
                        .foregroundColor(.primary)
                }.marqueeDuration(9)
                
                Text(viewModel.courseDay.description ?? "")
                    .font(.body)
                    .fontWeight(.light)
                    .foregroundColor(.secondary)
            }
            .padding(.all, 16)

This however causes the text to be shifted downwards ...
Screenshot 2021-05-02 at 11 45 17

Unable to run a ForEach loop into it

Been looking for something like this for ages tonight but ive found an annoying bug? when I run the ForEach with the code below the marquee restarts the instant the first text hits the edge of the frame.

Im trying to create a Marquee of game resutls but the second the edge of the first one hits the edge of the box it restarts the loop.

Marquee { HStack{ ForEach(function.lastTen(), id: \.matchRecord.id) {index in HStack { Text("\(function.playerName(for: index.matchRecord.playerId))") Text("VS") Text("\(index.winnerName)") Image(systemName: "trophy.fill") } .padding(.trailing, 50) .font(.system(size: 20)) .foregroundColor(.white) } } } .frame(width: 200, height: 50) .background(Color.mint.opacity(0.8)) .marqueeDuration(duration)

If I run the code below without the external HStack however it loops round perfectlly like expected, but now my ForEach loop is displaying stacked ontop of each other not horizontally.

Delay and Repeats Parameter

This is neat; thanks for sharing.

There's a couple features that I think would make this even better.

  1. Have a delay paramter, so that the text starts in the initial idle alignment position, and only starts to move after the delay has been met.

  2. Have a repeats parameter that allows for the setting of the number or repeats, including infinity.

It looks like this PR woud take care of the delay bit.

Is this package still maintained?

@CatchZeng is this repo/package still maintained?

I opened two PRs over a year ago with no response. I love using this package in my own Apps, and I also add some fixes and additional features to it and wanted to give it back to the community. However, it's hard to do so if there is no maintainer.

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.