Closed CosminPerRam closed 2 years ago
That was a very unpleasant sound lol.
ImPlotAxisFlags_Lock
should only be locking the min and max range, i.e. prevent panning. It was never the intention for it to also prevent dragging to the opposite side, so this actually seems like a bug -- I'll look into it. We may need a new flag, e.g. ImPlotAxisFlags_NoHover
and/or ImPlotAxisFlags_NoSwap
to do the things you want. Can you briefly describe the exact behavior you're trying to implement?
PS -- the flags passed on lines 336 and 337 will overwrite the flags passed on 335, in case you weren't aware
PS -- the flags passed on lines 336 and 337 will overwrite the flags passed on 335, in case you weren't aware
Oops, thanks for that.
[...] i.e. prevent panning. It was never the intention for it to also prevent dragging to the opposite side, so this actually seems like a bug -- I'll look into it.
Oh alright, I got a bit confused about the axis flags.
Can you briefly describe the exact behavior you're trying to implement?
I just want the label axes to not be movable and to not be highlighted when I cross my mouse over them.
Having the ImPlotAxisFlags_NoHover
flag would only be confusing (e.g. you think a axis is not movable because its not getting highlighted), but ImPlotAxisFlags_NoSwap
sounds great (and it should implicitly make the axes not highlighed on hover).
Hello again! https://github.com/epezent/implot/commit/7a470b2e174584d1d62ea5ebe713fea9c18beb6c adds ImPlotAxisFlags_NoSideSwitch
and ImPlotAxisFlags_NoHighlight
(same idea as above, different names).
I just want the label axes to not be movable and to not be highlighted when I cross my mouse over them. Having the ImPlotAxisFlags_NoHover flag would only be confusing (e.g. you think a axis is not movable because its not getting highlighted), but ImPlotAxisFlags_NoSwap sounds great (and it should implicitly make the axes not highlighed on hover).
I think hover highlighting and side switching should be separable. Highlighting can still suggest an axis is interactive (i.e. pannable, clickable) even if side switching is disabled. An argument might be made for implicitly disabling highlighting if ImPlotAxisFlags_NoSideSwitch
, ImPlotAxisFlags_Lock
, AND ImPlotAxisFlags_NoMenus
were enabled, but that feels a bit excessive to me. Seems simpler to just provide ImPlotAxisFlags_NoHighlight
so users can turn off the hover/hold highlight if they want to.
As said in the title, I would like to propose a very simple change to make the 'dragging' (or highlighting) of an axis disabled while having the ImPlotAxisFlags_Lock set, I find it a bit confusing to have the axis locked and still being able to drag(/cross over it and getting highlighted resulting) in no move. I have tried to look if there is already a way to do this but I couldn't find any (if there is already a way, sorry and please point it out).
This is a short video of what I'm talking about: https://user-images.githubusercontent.com/7972857/175363916-f39b50e8-58a0-483b-a765-0c9e5f4dc321.mp4