refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-07-15 20:40:27 +02:00
parent a9290f2885
commit 54eb2a67ef
15 changed files with 724 additions and 725 deletions
+3 -5
View File
@@ -1,6 +1,4 @@
local private, public = {}, {}
Aux.item_listing = public
local m, private, public = Aux.module'item_listing'
local ROW_HEIGHT = 38
@@ -53,7 +51,7 @@ function public.create(parent, on_click, on_enter, on_leave, selected)
local scroll_frame = CreateFrame('ScrollFrame', name..'ScrollFrame', parent, 'FauxScrollFrameTemplate')
scroll_frame:SetScript('OnVerticalScroll', function(self, offset)
FauxScrollFrame_OnVerticalScroll(ROW_HEIGHT, function() public.render(this.item_listing) end)
FauxScrollFrame_OnVerticalScroll(ROW_HEIGHT, function() m.render(this.item_listing) end)
end)
scroll_frame:SetPoint('TOPLEFT', content, 'TOPLEFT', 0, 15)
scroll_frame:SetPoint('BOTTOMRIGHT', content, 'BOTTOMRIGHT', -4, -15)
@@ -117,5 +115,5 @@ end
function public.populate(item_listing, item_records)
item_listing.item_records = item_records
public.render(item_listing)
m.render(item_listing)
end