View Single Post
05/04/22, 02:00 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,999
Looks like the map update then uses a SetDrawTier and layer and level to bring the map on the top again.
So you also need to update your labels again at that point if they are not anchored to the same map control and would just stay the same they were before.

Maybe this sort of stuff would help, if not too performance intensive:

Lua Code:
  1. CALLBACK_MANAGER:RegisterCallbacks("OnWorldMapChanged", function()
  2.  --update your DrawTier of the controls again, maybe a bit delayed by 1 frame if needed via zo_callLater(function()
  3.     --Update here
  4.    end, 0 )
  5. end)

But I'm unsure if this is the correct callback for your rightclicking, maybe it fires too often and you should simple react on the rightclick event and set your clicked control/all needed controls on top again (maybe delayed).

Last edited by Baertram : 05/04/22 at 02:03 AM.
  Reply With Quote