WeakAuras

WeakAuras

206M Downloads

Allow anchor options for model

wing5wong opened this issue · 2 comments

commented

Is your feature request related to a problem? Please describe.
I have a progress bar and would like to attach a model to the spark/current progress value.

in the past i used code from here https://wago.io/UniversalPowerBar
to implement this in my bar https://wago.io/J5V9sTM0F

previous behaviour for this was the sparkle model followed the progress
current behaviour is the sparkle model sits at the end of the bar

Describe the solution you'd like
The ability to select an anchor for a model element (i.e. the spark, or current value).
ideally the model is clipped by the progress (or has the option to be clipped)

Describe alternatives you've considered
in this minimal example you can see the addition of a model subelement, and the previous code solution.
the model is positioned in the center of the bar and can not be anchored to the progress

https://wago.io/Ze-oLQ1jy

  • Adding a model element to the bar in order to anchor it to the spark, but an anchoring option is not available for model elements
  • Code based solution (but this doesnt appear to work anymore - always anchoring to the end of the bar rather than the FG)

Additional context
See here the code solution vs the addition of a model
image

When progress is changed, the model should follow the spark/current value
image

commented

The code broke because it relies on internal of how the aurabar works, those sometimes need to change. You can probably fix your code by attaching the model to fgMask instead.

WIth that being said, a more flexible positioning of the model sub element is something will eventually come, although probably not in the immediate future. The currrent options for choosing the position were done quite delibrately.

commented