visualizer icon indicating copy to clipboard operation
visualizer copied to clipboard

spectraDisplayer / nmr1D and save state

Open lpatiny opened this issue 8 years ago • 1 comments

jsGraph allows to save / reload zoom state in the spectrum.


var state = graphinstance.getAxisState();
  state.left[ 0 ] = [ 10, 20 ];
  graphinstance.setAxisState( state )

It would be nice that in spectraDisplayer and nmr1D this feature is available.

The idea is that the mouse over those module will catch the keyboards event and when you press a number (1 -> 9) the first time it saves the state, the second time it reloads the state ALT + number could force the saving of the state (and replacement of a previous state)

lpatiny avatar Jun 30 '16 08:06 lpatiny

Starting from v.1.14.10-1, you can use the helper functions:

(graph) graph.saveAxisState( {String,Number} stateName );
(graph) graph.recallAxisState( {String,Number} stateName );

NPellet avatar Jun 30 '16 08:06 NPellet