Open smallnewer opened 5 years ago
This will be fixed when #234 is merged.
Thanks^_^ It's also not working with #234 . Maybe I did something wrong?
My steps
node_modules/react-native-macos/React
in my demo project,and copy React
(downloaded) to my demo projectI'm sure it's #234 code.
key codes:
render() {
return (
<TouchableOpacity
style={{position:"absolute", right:100,width:200,height:200,transform:[{translateY:101}],backgroundColor:"red"}}>
</TouchableOpacity>
)
}
After I delete some code at RCTView.m
,It working right:
// if (!CGSizeEqualToSize(self.bounds.size, oldSize)) {
[self.layer setNeedsDisplay];
// }
I don't know if it's appropriate to make such a change.
Nice find!
When the frame
is updated (eg: by resizing the window), the transform
needs to be reapplied.
I've added a new commit to #234, which you should try and let me know if it works. https://github.com/ptmt/react-native-macos/pull/234/commits/572a27491206a1bdc62fd108fccefc4b8a7b4b37
If it doesn't work, we can call [self.layer setNeedsDisplay]
when _transform
is not an identity transform.
It works right . Thanks @aleclarson ! 👍
Is this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
OS: macOS Sierra 10.13.6 (I only have this version) UIExplorer: downloaded in v0.5.0 tag and here
and i can reproduce this question with : react-native-macos-cli: 2.0.1 react-native-macos: 0.19.2
Steps to Reproduce
Some Prerequisites