mirror of
https://github.com/Insality/druid
synced 2025-09-28 02:22:19 +02:00
Scroll refactoring process
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
-- @tfield vector3 border_offer The border offset for correct anchor calculations
|
||||
|
||||
local Event = require("druid.event")
|
||||
local const = require("druid.const")
|
||||
local helper = require("druid.helper")
|
||||
local component = require("druid.component")
|
||||
|
||||
local M = component.create("grid")
|
||||
@@ -37,7 +37,7 @@ function M.init(self, parent, element, in_row)
|
||||
|
||||
self.offset = vmath.vector3(0)
|
||||
|
||||
local pivot = const.PIVOTS[gui.get_pivot(self.parent)]
|
||||
local pivot = helper.get_pivot_offset(gui.get_pivot(self.parent))
|
||||
self.anchor = vmath.vector3(0.5 + pivot.x, 0.5 - pivot.y, 0)
|
||||
|
||||
self.in_row = in_row or 1
|
||||
|
Reference in New Issue
Block a user