oUF

97.2k Downloads

Player auras, not updating position when .size or .num changes

Elv22 opened this issue ยท 6 comments

commented

As the title says, changing the .size or .num of the aura element and forcing an update doesn't update the position of the auras relative to each other. I can post a screenshot later if you don't understand what I mean.

commented

I'm guessing this is with the master branch. On 1.6.x you will have to call :SetPosition() yourself when you change these values.

.num changes should be accounted for when you run Update however.

commented

I'm not able to re-create .num not being respected. How are you doing this?

commented

its probably not .num, just .size

this is pretty much all im doing:

https://github.com/Elv22/ElvUI-Beta/blob/master/ElvUI/modules/unitframes/units/player.lua

line 385ish is the block that sets the aura variables, initially it works perfectly, however after changing the width of the frame, which in turn recalculates how big the auras are the auras are not correctly positioned side by side next to each other, they retain their positions and resize correctly.

frame:UpdateAllElements() is called at the end of the file

this method works fine when i reverted the file to this state:

https://github.com/Elv22/ElvUI-Beta/commit/82d7c5c2aa14061c09b572d438b069aabfb518ee

commented

that would be cool if you could do that

commented

This is intended behavior. I've refactored how :SetPosition is used in 1.6.x so its called a lot less. Basically only when the aura positions might have been sorted and when new icons are added.

I can however wrap the Update function, so it also calls :SetPosition() when :UpdateAllElements() is used.

commented

Both should be fixed with e131f27 and 931f148.