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

Various fixes to RCTView props#234

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
aleclarson wants to merge11 commits intomaster
base:master
Choose a base branch
Loading
fromlayer-props
Open

Conversation

@aleclarson
Copy link
Collaborator

@aleclarsonaleclarson commentedMar 18, 2019
edited
Loading

Fixes#232

  • move[RCTViewManager checkLayerExists:] to[NSView ensureLayerExists]
  • enable edge antialiasing only for transforms with perspective
  • stop settinglayer manually in[NSView ensureLayerExists] (let thelayer getter call[NSView makeBackingLayer] instead)
  • never setlayer.transform directly except in[RCTView displayLayer:]
  • callensureLayerExists before setting any layer-related prop
  • callensureLayerExists insidereactSetFrame: so layer props can be set
  • enforceposition andanchorPoint by setting them in[RCTView displayLayer:]
  • fix[RCTView setBackgroundColor:] strangeness

pvinis reacted with thumbs up emoji
And rename it to "ensureLayerExists"
We cannot set "layer.transform" directly except from the "displayLayer:" method, because AppKit often sets it without respecting explicit values. For example, the "setFrame:" method is one spot, but there are others.
This prevents a crash when a RCTViewManager represents a NSView subclass (instead of a RCTView subclass), which requires the subclass to implement its own "transform" property and override its "displayLayer:" method.
Ensure a layer exists before setting these props.
Otherwise, the anchor point won't be set.
Otherwise, the anchorPoint may be reverted to the top-left.
The "setFrame:" method overrides our transform, so it needs to be reapplied.
- The "_backgroundColor" ivar was not being set when called with nil.- The method assumed that the "layer" property could be nullified when "backgroundColor" is nil, which is definitely not the case.
@aleclarsonaleclarson mentioned this pull requestMar 19, 2019
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

0.19.3

Development

Successfully merging this pull request may close these issues.

UIExplorer: transforms not working with position

2 participants

@aleclarson

[8]ページ先頭

©2009-2025 Movatter.jp