leefsmp / Re-Flex

Resizable Flex layout container components for advanced React web applications
https://leefsmp.github.io/Re-Flex/index.html
MIT License
639 stars 72 forks source link

Pane size not quite right when using size aware elements #140

Closed markhats closed 3 years ago

markhats commented 3 years ago

I'm trying to use size aware elements as per the demo but am finding that often the size of the pane content in the ReflexElement is not quite correct. This can been seen if the content div has a border. In the following screenshot this manifests as a pixel wide white line to the bottom and right of the pane.

image

I think this is due to the width/height truncation happening in the following lines:

https://github.com/leefsmp/Re-Flex/blob/850e1153ae3bddd3b0b1143b9fdb72a185027fd9/src/lib/ReflexElement.js#L42-L43

Basically in the following devtools screenshot, the div with class reflex-size-aware has a width/height of 691.578x190.922. However, by the time this gets injected into the style of the child div, it is truncated to 691x190. If I force the child div to have the untruncated width/height, then the white lines on the right/bottom of the pane disappear and everything is OK.

image

leefsmp commented 3 years ago

fixed in v 4.0.3