Fix mouse drag condition in Frame and set default vOffset in List render function
This commit is contained in:
@@ -117,7 +117,7 @@ end
|
|||||||
--- @return boolean handled Whether the event was handled
|
--- @return boolean handled Whether the event was handled
|
||||||
--- @protected
|
--- @protected
|
||||||
function Frame:mouse_drag(button, x, y)
|
function Frame:mouse_drag(button, x, y)
|
||||||
if self.get("clicked") and self.dragging then
|
if self:hasState("clicked") and self.dragging then
|
||||||
local newX = x - self.dragStartX
|
local newX = x - self.dragStartX
|
||||||
local newY = y - self.dragStartY
|
local newY = y - self.dragStartY
|
||||||
|
|
||||||
|
|||||||
@@ -318,6 +318,7 @@ end
|
|||||||
--- @shortDescription Renders the list
|
--- @shortDescription Renders the list
|
||||||
--- @protected
|
--- @protected
|
||||||
function List:render(vOffset)
|
function List:render(vOffset)
|
||||||
|
vOffset = vOffset or 0
|
||||||
Collection.render(self)
|
Collection.render(self)
|
||||||
|
|
||||||
local items = self.get("items")
|
local items = self.get("items")
|
||||||
|
|||||||
Reference in New Issue
Block a user