jsROOT ; toggle button placement

Dear all

I have a very trivial question. In the jsROOT example [https://jsroot.gsi.de/latest/?nobrowser&file=../files/hsimple.root&item=ntuple;1&opt=px:py::pz>4 ] the buttons for toggling the log scale and additional functionalities are placed on the bottom left. Is there a way to ask it to be placed at bottom right ?

Cheers

Rohin

Hi Rohin,

Not, but this is can be easily implemented.
Actually, in any canvas sub-pad buttons situated in bottom-right corner.

https://root.cern/js/latest/examples.htm#tcanvas_roofit

I will try this soon.

Regards,
Sergey

This is exactly what I am looking for. Let me know once you propagate the changes to a release

Hi,

This is how it looks in “dev” version now:

http://jsroot.gsi.de/dev/?nobrowser&toolbar=right&file=../files/rf107.root&item=rf107_plotstyles;1

One need to add “&toolbar=right” in URL or just specify in JavaScript:

JSROOT.gStyle.ToolBarSide = "right";

Will appear in next JSROOT release - most probably end of June.

Regards,
Sergey

1 Like

Hi Sergey.

The option “&toobar=right” doesn’t seem to have the desired effect. Did something else break the change in the dev branch ?

Cheers

Rohin

Hi Rohin,

It has desired effect, but you probably confused by buttons associated with subpads.
These buttons appears in opposite corner to the canvas buttons.

Also one side effect - buttons on right side not hidden by default.

Sergey

Now fixed in dev branch - buttons on right side are hidden by default

Hi Sergey.
Lets check this URL

https://root.cern/js/dev/?nobrowser&file=../files/hsimple.root&item=hpx&toolbar=right

One should expect the menu buttons to appear on the right… no ? [notice that I have the appropriate query string]

Cheers
Rohin

Sorry, we not always update dev versions on http://jsroot.gsi.de and https://root.cern/js/ website synchronously.
Now it is there (thanks to @bellenot)

Hi Sergey

May I request another feature ?

Currently the buttons are placed horizontally (parallel to the x-axis), Would it be easy to add another option to place the buttons aligned along the y-axis ? (that is vertically )

Cheers

Rohin

Hi Rohin,

I will try to implement this.

Sergey

Now it is possible in dev version:

http://jsroot.gsi.de/dev/?nobrowser&file=../files/fitslicesy.root&item=c1;1&toolbar=vert

Thanks Sergey

Could you please propagate these changes to https://root.cern.ch/js/dev//scripts/JSRootCore

cheers

Rohin

Now changes also applied on https://root.cern/js/dev/ server

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.