mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Fix drag node scene koefs
This commit is contained in:
parent
4de50591f8
commit
9b53314fa7
@ -205,13 +205,13 @@ function M.is_enabled(node)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Check if node is enabled in gui hierarchy.
|
--- Get cumulative parent's node scale
|
||||||
-- Return false, if node or any his parent is disabled
|
-- @function helper.get_scene_scale
|
||||||
-- @function helper.is_enabled
|
|
||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
|
-- @tparam bool include_node_scale
|
||||||
-- @treturn bool Is enabled in hierarchy
|
-- @treturn bool Is enabled in hierarchy
|
||||||
function M.get_scene_scale(node)
|
function M.get_scene_scale(node, include_node_scale)
|
||||||
local scale = gui.get_scale(node)
|
local scale = include_node_scale and gui.get_scale(node) or vmath.vector3(1)
|
||||||
local parent = gui.get_parent(node)
|
local parent = gui.get_parent(node)
|
||||||
while parent do
|
while parent do
|
||||||
scale = vmath.mul_per_elem(scale, gui.get_scale(parent))
|
scale = vmath.mul_per_elem(scale, gui.get_scale(parent))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user