Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose widget frame count #827

Merged
merged 1 commit into from
Jul 31, 2023
Merged

Conversation

dinosaursrarr
Copy link
Contributor

Saw this issue asking for a way to get the frame count for an Animation or Marquee widget #823

Looks like that's defined for all widgets (and is 1 in case it's not animated). This just updates the template for the render module to expose it as a readonly method, following the way size() is available for Text widgets.

Added test cases. Also checked that it gives a sensible answer for marquees in particular, which gets longer as the text gets longer.

@netlify
Copy link

netlify bot commented Jul 27, 2023

Deploy Preview for pixlet ready!

Name Link
🔨 Latest commit f7c5bfb
🔍 Latest deploy log https://app.netlify.com/sites/pixlet/deploys/64c375a10f961e00081de218
😎 Deploy Preview https://deploy-preview-827--pixlet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Saw this issue asking for a way to get the frame count for an Animation or Marquee widget tidbyt#823

Looks like that's defined for all widgets (and is 1 in case it's not animated). This just updates the template for the render module to expose it as a readonly method, following the way size() is available for Text widgets.

Added test cases. Also checked that it gives a sensible answer for marquees in particular, which gets longer as the text gets longer.
@betterengineering betterengineering merged commit 62848ce into tidbyt:main Jul 31, 2023
11 checks passed
dinosaursrarr added a commit to dinosaursrarr/tidbyt.dev that referenced this pull request Apr 27, 2024
Realised I had a few PRs on that updated docs on the main repo, but not here where more people will see them:
- tidbyt/pixlet#826
- tidbyt/pixlet#827
- tidbyt/pixlet#853
rohansingh pushed a commit to tidbyt/tidbyt.dev that referenced this pull request May 15, 2024
Realised I had a few PRs on that updated docs on the main repo, but not here where more people will see them:
- tidbyt/pixlet#826
- tidbyt/pixlet#827
- tidbyt/pixlet#853
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants