This fields seems to be in pixels so we should remove the cap (even allow for negative value maybe ?)
But I think for proper display, with nmrium file sharing. This kind of offset should be stored in percentage (relative) instead pixels (absolute).
Also I wonder if drag-n-drop if peaks label should save per-spectra the offset in the view of the state.
Originally posted by @tpoisseau in #4015
- workspace migration to reset the value to 0 (%). A migration context cannot guess the height available so reset to 0 seems to best the best to do.
- Add tsdoc to the property to explicit allowed interval ([0; 100] or [0; 1])
- adapt the form. Cap the value in [0; 100] interval. (convert the interval if needed with zod codec)
Today. drag n drop the labels don't change the value in workspace, check if it is serialized / stored somewhere else, If not I suppose drag n drop should update the workspace. If it is serialized / stored somewhere else (like the view), also migrate to percentage and ensure it is serialized in the state (file-sharing).
The idea is peaks label offset should look to the same position on loading a state and responsive to different screen sizes.
Originally posted by @tpoisseau in #4015
Today. drag n drop the labels don't change the value in workspace, check if it is serialized / stored somewhere else, If not I suppose drag n drop should update the workspace. If it is serialized / stored somewhere else (like the view), also migrate to percentage and ensure it is serialized in the state (file-sharing).
The idea is peaks label offset should look to the same position on loading a state and responsive to different screen sizes.