diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 7230e8e1..047768cc 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -259,10 +259,10 @@ function RootView:on_mouse_moved(x, y, dx, dy) if self.dragged_divider then local node = self.dragged_divider if node.type == "hsplit" then - x = common.clamp(x, 0, self.root_node.size.x * 0.95) + x = common.clamp(x - node.position.x, 0, self.root_node.size.x * 0.95) resize_child_node(node, "x", x, dx) elseif node.type == "vsplit" then - y = common.clamp(y, 0, self.root_node.size.y * 0.95) + y = common.clamp(y - node.position.y, 0, self.root_node.size.y * 0.95) resize_child_node(node, "y", y, dy) end node.divider = common.clamp(node.divider, 0.01, 0.99)