fix bifurcation AXIS_Y bug

This commit is contained in:
Emile Clark-Boman 2025-09-11 19:27:02 +10:00
parent 79f5c5235a
commit fce84f1844

View file

@ -119,7 +119,7 @@ static int bifurcate_dims(const struct crs_node *parent,
} else {
_dims0->height *= ratio;
_dims1->height -= _dims0->height;
_dims1->y += _dims1->height;
_dims1->y += _dims0->height;
}
if (!_dims0->width || !_dims0->height || !_dims1->width || !_dims1->height) {
@ -162,8 +162,7 @@ static void resize_node(struct crs_node *node, struct crs_nodedims *new_dims) {
* axis - controls which direction the subdivision occurs
* invert_axis - invert index of the original node in the new abstract node
*/
void bifurcate_window_node(struct crs_node **node,
const enum crs_axis axis,
void bifurcate_window_node(struct crs_node **node, const enum crs_axis axis,
const int invert_axis, const float ratio) {
assert((*node)->type == NODE_WINDOW);
struct crs_nodedims *dims0, *dims1;