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

feat: allow custom image scales on iOS#10212

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

Draft
edusperoni wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromfeat/image-scale-ios

Conversation

edusperoni
Copy link
Contributor

PR Checklist

What is the current behavior?

Images are always loaded with scale 1.0 (if they are files/resources then they're loaded with the appropriate scale when@2x.png is provided, for example)

What is the new behavior?

Allows you to set a hardcoded scale for the image.

@nx-cloud
Copy link

nx-cloudbot commentedFeb 14, 2023
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commitaf106de. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 fromNxCloud.

@cla-botcla-botbot added the cla: yes labelFeb 14, 2023
@edusperoni
Copy link
ContributorAuthor

This might be too much of a burden to support in the future (especially if we decide to support orientation as well).

This is a viable alternative that's around 0.02ms slower and doesn't require any code to support:

function setImageSourceScale(source: ImageSource, scale: number) {  const image = source.ios;  return new ImageSource(UIImage.imageWithCGImageScaleOrientation(image.CGImage, scale, image.imageOrientation));}

@NathanWalkerNathanWalker added this to the8.5 milestoneFeb 16, 2023
@NathanWalkerNathanWalker modified the milestones:8.5,8.6Mar 23, 2023
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
Projects
None yet
Milestone
9.0
Development

Successfully merging this pull request may close these issues.

2 participants
@edusperoni@NathanWalker

[8]ページ先頭

©2009-2025 Movatter.jp