Merge branch 'master' into dev

This commit is contained in:
jgmdev 2021-06-16 18:06:02 -04:00
commit 66081571e6
2 changed files with 11 additions and 1 deletions

View File

@ -246,7 +246,7 @@ function RootView:on_mouse_pressed(button, x,y, clicks)
if button == "middle" or node.hovered_close == idx then
node:close_view(self.root_node, node.views[idx])
else
self.dragged_node = idx
self.dragged_node = { node, idx or #node.views }
node:set_active_view(node.views[idx])
end
else

View File

@ -58,6 +58,9 @@ local function set_scale(scale)
core.redraw = true
end
local function get_scale()
return current_scale
end
local on_mouse_wheel = RootView.on_mouse_wheel
@ -98,3 +101,10 @@ keymap.add {
["ctrl+="] = "scale:increase",
}
return {
["set"] = set_scale,
["get"] = get_scale,
["increase"] = inc_scale,
["decrease"] = dec_scale,
["reset"] = res_scale
}