Quantcast

Fix POI integration with scaled POIs

James Whitehead II [12-20-09 - 10:41]
Fix POI integration with scaled POIs
Filename
TomTom.lua
TomTom_POIIntegration.lua
diff --git a/TomTom.lua b/TomTom.lua
index cf8ac5f..78806fe 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -240,10 +240,10 @@ function TomTom:ShowHideWorldCoords()
 		if not TomTomWorldFrame then
 			TomTomWorldFrame = CreateFrame("Frame", nil, WorldMapFrame)
 			TomTomWorldFrame.Player = TomTomWorldFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
-			TomTomWorldFrame.Player:SetPoint("BOTTOMLEFT", WorldMapPositioningGuide, "BOTTOMLEFT", 20, 11)
+			TomTomWorldFrame.Player:SetPoint("RIGHT", WorldMapPositioningGuide, "BOTTOM", -15, 2)

 			TomTomWorldFrame.Cursor = TomTomWorldFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
-			TomTomWorldFrame.Cursor:SetPoint("BOTTOMLEFT", WorldMapPositioningGuide, "BOTTOMLEFT", 150, 11)
+			TomTomWorldFrame.Cursor:SetPoint("LEFT", WorldMapPositioningGuide, "BOTTOM", 15, 2)

 			TomTomWorldFrame:SetScript("OnUpdate", WorldMap_OnUpdate)
 		end
diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua
index e6a5d71..4ebdb89 100644
--- a/TomTom_POIIntegration.lua
+++ b/TomTom_POIIntegration.lua
@@ -3,7 +3,7 @@ local function POIAnchorToCoord(poiframe)
     local frame = WorldMapDetailFrame
     local width = frame:GetWidth()
     local height = frame:GetHeight()
-    local scale = frame:GetScale()
+    local scale = frame:GetScale() / poiframe:GetScale()
     local cx = (x / scale) / width
     local cy = (-y / scale) / height