comparison FlightMap.lua @ 53:44baf4f35c7c

- Fix missing pin numerals in the flight map. - Make use of nudge factors in flight map overlays.
author Nenue
date Fri, 30 Dec 2016 20:43:58 -0500
parents 6439015d74b1
children 0749e38081e7
comparison
equal deleted inserted replaced
52:6439015d74b1 53:44baf4f35c7c
37 end 37 end
38 38
39 function WorldPlanDataProvider:OnLoad() 39 function WorldPlanDataProvider:OnLoad()
40 40
41 self:SetNudgeTargetFactor(0.015); 41 self:SetNudgeTargetFactor(0.015);
42 self:SetNudgeZoomedOutFactor(1.0); 42 self:SetNudgeZoomedOutFactor(0.5);
43 self:SetNudgeZoomedInFactor(0.25); 43 self:SetNudgeZoomedInFactor(0.15);
44 end 44 end
45 45
46 function WorldPlanDataProvider:OnShow() 46 function WorldPlanDataProvider:OnShow()
47 assert(self.ticker == nil); 47 assert(self.ticker == nil);
48 self.ticker = C_Timer.NewTicker(10, function() self:RefreshAllData() end); 48 self.ticker = C_Timer.NewTicker(10, function() self:RefreshAllData() end);
114 frame.pin = pin 114 frame.pin = pin
115 115
116 -- sticking it onto the MapCanvas pin 116 -- sticking it onto the MapCanvas pin
117 pin.throttle = 1 117 pin.throttle = 1
118 pin.isStale = true 118 pin.isStale = true
119 pin:SetParent(frame) 119 pin:SetAnchor(frame)
120 pin:ClearAllPoints()
121 pin:SetPoint('CENTER')
122 pin.Overlay:SetParent(frame)
123 pin.Overlay:ClearAllPoints()
124 pin.Overlay:SetPoint('TOPLEFT', pin, 'TOPLEFT', 0, 4)
125 pin.Overlay:SetPoint('BOTTOMRIGHT', pin, 'BOTTOMRIGHT', 0, -4)
126 pin.Overlay:SetShown(true)
127 --print(pin.Overlay:IsShown(), pin.Overlay:GetPoint(1)) 120 --print(pin.Overlay:IsShown(), pin.Overlay:GetPoint(1))
128 end 121 end
129 pin:SetShown(pin.used) 122 pin:SetShown(pin.used)
130 end 123 end
131 124