Reset child position/sizes before calculating layout
This commit is contained in:
13
src/Layout.h
13
src/Layout.h
@@ -137,8 +137,8 @@ struct css_node {
|
||||
int children_count;
|
||||
int line_index;
|
||||
|
||||
css_node_t* next_absolute_child;
|
||||
css_node_t* next_flex_child;
|
||||
css_node_t *next_absolute_child;
|
||||
css_node_t *next_flex_child;
|
||||
|
||||
css_dim_t (*measure)(void *context, float width, float height);
|
||||
void (*print)(void *context);
|
||||
@@ -147,7 +147,6 @@ struct css_node {
|
||||
void *context;
|
||||
};
|
||||
|
||||
|
||||
// Lifecycle of nodes and children
|
||||
css_node_t *new_css_node(void);
|
||||
void init_css_node(css_node_t *node);
|
||||
@@ -161,8 +160,12 @@ typedef enum {
|
||||
} css_print_options_t;
|
||||
void print_css_node(css_node_t *node, css_print_options_t options);
|
||||
|
||||
// Function that computes the layout!
|
||||
void layoutNode(css_node_t *node, float maxWidth, float maxHeight, css_direction_t parentDirection);
|
||||
bool isUndefined(float value);
|
||||
|
||||
// Function that computes the layout!
|
||||
void layoutNode(css_node_t *node, float maxWidth, float maxHeight, css_direction_t parentDirection);
|
||||
|
||||
// Reset the calculated layout values for a given node. You should call this before `layoutNode`.
|
||||
void resetNodeLayout(css_node_t *node);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user