Last active
November 11, 2018 00:28
-
-
Save gskachkov/077b24f879e8580ed3a1f2ecefdb8991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimpleLayoutWorlet | |
*intrinsicSizes() {} | |
*layout(children, edges, constraintSpace, styles) { | |
const childFragments = [] | |
for(const child of children) { | |
const childFragment = yield child.layoutNextFragment(); | |
... | |
} | |
return { | |
childFragments | |
}; | |
} | |
} | |
registerLayout('simpleLayout', SimpleLayoutWorlet); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment