Closed Magenda closed 3 years ago
Thanks.
I never thought defining width in respect to height (or vice-versa) would be useful. Is it really a common need? In any case, do you have an API suggestion for that?
This is now working. See version [1.2.12]
Parameters moveByChildWidth and moveByChildHeight can be positive or negative, and move the child horizontally and vertically, but the unit here is not pixels, but child widths and heights.
Parameters moveByContainerWidth and moveByContainerHeight can be positive or negative, and move the child horizontally and vertically, but the unit here is not pixels, but container widths and heights.
Parameters moveVerticallyByChildWidth, moveHorizontallyByChildHeight, moveVerticallyByContainerWidth and moveHorizontallyByContainerHeight allow you to move in some direction according to the size (width or height) of the orthogonal direction. For example, while moveByChildWidth: 0.2 would move horizontally by 20% of the child's width, moveVerticallyByChildWidth would move vertically by 20% of the child's width.
Is there any way to set child's height as a proportion to parent's width? This is a very common need and it would be very nice if it would be supported internally from the plugin (without writing a setState manually). Example use case: size a container with the same width and heigh that equals to 1/5 of parent's width.
Kudos for your excellent work with all your published plugins!