Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(android): Setting String Value to Width And Height#10668

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
db-r-hashimoto wants to merge2 commits intoNativeScript:main
base:main
Choose a base branch
Loading
fromdb-r-hashimoto:setting-string-value-width-height

Conversation

db-r-hashimoto
Copy link

PR Checklist

What is the current behavior?

Currently, when a string value is assigned to the width or height property of ImageAssetOptions, an error occurs on Android. This issue prevents users from specifying these properties as strings, which can be problematic in scenarios where string-based dimensions are used.

What is the new behavior?

With this update, assigning a string value to the width or height property of ImageAssetOptions no longer results in an error on Android. The system now properly handles string-based dimensions, providing a more flexible and consistent experience for users.

Fixes/Implements/Closes#6289 .

@CatchABus
Copy link
Contributor

CatchABus commentedJan 17, 2025
edited
Loading

Let me point out that this looks like a requested feature.
Docs and TypeScript definitions (even if you use JavaScript) indicate that options will expect a type of number for dimensions so as long as you use it the right way, it will work.
Also, you can always make use of functions likeparseInt orparseFloat to pass the value as a number.
Regarding the error, core could also be strict and print a warning message about it instead to let users know that one has to use numeric values.

Few things to point out:

  • Some linting rules like single quotes aren't being followed.

@db-r-hashimoto
Copy link
Author

@CatchABus Strings should use single quotes, as per the coding conventions outlinedhere. I'll fix it accordingly.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Setting string value towidth orheight of ImageAssetOptions results in an error on android
2 participants
@db-r-hashimoto@CatchABus

[8]ページ先頭

©2009-2025 Movatter.jp