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 transform origin#821

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

Merged
Freddy03h merged 2 commits intomainfromfix-transform-origin
Dec 10, 2024
Merged

Fix transform origin#821

Freddy03h merged 2 commits intomainfromfix-transform-origin
Dec 10, 2024

Conversation

@Freddy03h
Copy link
Member

The typescript type ontransformOrigin is very weak

  transformOrigin?: Array<string | number> | string | undefined;

https://github.com/facebook/react-native/blob/4165884b700341ba549ed8385480fd98128e7bb1/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts#L296

Compare to theprocessTransformOrigin function that analyse the transformOrigin value on DEV mode
https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/StyleSheet/processTransformOrigin.js

@cknitt
Copy link
Member

Ok, I get the split in x and y 👍, but can't we keep| @as("left") Left instead of| @as("0%") Left?

@Freddy03h
Copy link
MemberAuthor

Freddy03h commentedDec 9, 2024
edited
Loading

No because I found that those keywords aren't handled in the array syntax :(
(that's why I split the change in 2 different commits)

I'll open an issue on thereact-native repo, but, since theprocessTransformOrigin function transform those keywords to0%,50% and100% for the string syntax. I think it's ok to be handled this way, instead of removing the keywords.

@Freddy03hFreddy03h merged commitfd631f4 intomainDec 10, 2024
2 checks passed
@Freddy03hFreddy03h deleted the fix-transform-origin branchDecember 10, 2024 08:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cknittcknittcknitt approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Freddy03h@cknitt

[8]ページ先頭

©2009-2025 Movatter.jp