comparison ui/AmrUiScrollFrame.lua @ 133:a0894ffebd15 v62

Bug fixes and tweaks for 8.0.
author yellowfive
date Wed, 25 Jul 2018 12:17:24 -0700
parents 0515882856f1
children
comparison
equal deleted inserted replaced
132:2279d58793c6 133:a0894ffebd15
9 9
10 local Amr = LibStub("AceAddon-3.0"):GetAddon("AskMrRobot") 10 local Amr = LibStub("AceAddon-3.0"):GetAddon("AskMrRobot")
11 11
12 -- Lua APIs 12 -- Lua APIs
13 local pairs, assert, type = pairs, assert, type 13 local pairs, assert, type = pairs, assert, type
14 local min, max, floor, abs = math.min, math.max, math.floor, math.abs 14 local min, max, floor = math.min, math.max, math.floor
15 15
16 -- WoW APIs 16 -- WoW APIs
17 local CreateFrame, UIParent = CreateFrame, UIParent 17 local CreateFrame, UIParent = CreateFrame, UIParent
18 18
19 --[[----------------------------------------------------------------------------- 19 --[[-----------------------------------------------------------------------------
105 if self.updateLock then return end 105 if self.updateLock then return end
106 self.updateLock = true 106 self.updateLock = true
107 local status = self.status or self.localstatus 107 local status = self.status or self.localstatus
108 local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight() 108 local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
109 local offset = status.offset or 0 109 local offset = status.offset or 0
110 local curvalue = self.scrollbar:GetValue() 110 --local curvalue = self.scrollbar:GetValue()
111 -- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys 111 -- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys
112 -- No-one is going to miss 2 pixels at the bottom of the frame, anyhow! 112 -- No-one is going to miss 2 pixels at the bottom of the frame, anyhow!
113 if viewheight < height + 2 then 113 if viewheight < height + 2 then
114 if self.scrollBarShown then 114 if self.scrollBarShown then
115 self.scrollBarShown = nil 115 self.scrollBarShown = nil