Open ltalirz opened 4 years ago
Initial version in https://github.com/dwsideriusNIST/isotherm-digitizer-panel/tree/feature-reset
Currently a reset for the self.figure_image widget is not working.
Thanks Dan! I had a quick look and I would hope that I can simplify things a bit so that one does not have to reproduce the list of input elements multiple times. I'll look into this when I find time
Leo, I agree: that list of form elements appears several places in the code and I was thinking of something along the same lines. Given the way it is used differently in the reset
and load_json
operations, it may need to be a tuple or similar. (I was already leaning that way for reset
operation to genericize the for loop.)
I looked at this more closely today and don't have a good solution yet. Here is where the list of form elements would be useful:
load_isotherm_json
(pre-fill)self.layout = pn.Column(
A list of tuples could be useful, where each tuple contains the element's form object, the reset value, and a mapping of that element to the appropriate JSON key. I'm sure there would be a cluster of "non-standard" operations that would have to be written for specific form elements.
workaround: simply reload the page