WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@linev
Copy link
Member

@linev linev commented Nov 25, 2025

Add possibility to set draw function in hpainter

Provide demo for node.js

@linev linev self-assigned this Nov 25, 2025
@danielch02
Copy link

First of all, thank you for implementing this functionality.
Please correct me if I’m wrong, but in cases where we switch between the JSROOT environment and our 3D environment, we could first store the original/default draw function and then, when toggling between the 2D and 3D environments, swap between the default draw function and our custom one accordingly. Is that correct? If so, that should be more than sufficient for our needs, and we’ll be able to achieve the functionality from our design.

@linev
Copy link
Member Author

linev commented Nov 25, 2025

In the example I show how original draw function is called from custom one.
So you can freely define that happens in the draw.

The only special case is TTree::Draw() - there original draw first perform TTree scan and then create plots.
But this is special task and one can discuss it later.

@danielch02
Copy link

Right, understood — since we don’t need to handle special case like the TTree scan, it should work perfectly for our needs. Thanks for the clarification!

@linev linev merged commit 30c16c1 into dev Nov 25, 2025
22 of 24 checks passed
@linev linev deleted the hpainter_batch branch November 25, 2025 11:50
@mvala
Copy link
Contributor

mvala commented Nov 27, 2025

@linev we have first draft version for browser: https://ndmspc.gitlab.io/ndmspc-browser and i see now that when we click on ntuple.px, we are hitting TTree::Draw() thing. What do you recommend for handling such case? Thanks

@linev
Copy link
Member Author

linev commented Nov 27, 2025

I need to provide more global way to redefine draw function.
So I will move functionality

@linev
Copy link
Member Author

linev commented Nov 27, 2025

So I create new PR #378

It works differently and allow catch any "real" drawing.
Will be merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants