AlbertoPdRF / root-file-viewer

View ROOT files directly in VS Code!
https://marketplace.visualstudio.com/items?itemName=albertopdrf.root-file-viewer
MIT License
49 stars 5 forks source link

Histogram List not a shortcut anymore #27

Closed JJTR2 closed 12 months ago

JJTR2 commented 1 year ago

Hi, I noticed that if you have multiple histograms open, you can't jump to a specific histogram anymore (that is already open) by clicking it on the histogram list on the left.

I know that this is the behavior for TGraphs for some time now, but I do find it more practical if you jump back to the open histogram by using the histogram list

dnwerner commented 1 year ago

To add to this: I just realized that when you close a histogram and try to re-open it through the list on the left side, it doesn't work, but only expands the list-entry.

AlbertoPdRF commented 12 months ago

Thanks @euCitizn and @dnwerner for reporting these! @linev I can reproduce both behaviors at https://jsroot.gsi.de/latest/api.htm#url_syntax_tabs_layout. Is the first one intended? The second one definitely looks like a bug.

dnwerner commented 12 months ago

I hope the first one is not intended behavior. Nothing happening vs (previously) jumping to the correct histo feels like a regression, since it makes quickly jumping to a histo more tedious ("try to open a histo to compare some data" -> "nothing happens" -> "realize that the histo must have been opened before" -> "try to find the open tab" -> "open the histo" is quite a bit slower than "try to open a histo" -> "open the histo")

linev commented 12 months ago

It is side effect of changes I made for histogram classes. Now histogram can be "expand" in the hierarchy browser and therefore second click on the item tries to expand histogram object. I will try to improve this.

AlbertoPdRF commented 12 months ago

Maybe something like:

click -> previous behavior double-click (instead of second click) -> new behavior

could be implemented instead?

linev commented 12 months ago

No, I need to fix logic of normal click. It was done for geometry viewer where default action is "expand" of volumes hierarchy. But it had side effect after I allow to expand histograms. Fix is simple and I will submit it soon.

dnwerner commented 12 months ago

Awesome, thanks for the quick update!

linev commented 12 months ago

Should be improved in jsroot 7.5.1 release

https://github.com/root-project/jsroot/releases/tag/7.5.1

AlbertoPdRF commented 12 months ago

Awesome, thanks! 🚀