Store UV/Image Editor area state (zoom factor, position etc.)?

Hi!

Is there a way to save a ‘state’ of area so it can be restored any time?
I have a script that creates/collapses UV Editor area on the right side of 3D View area, so it would be nice to not loose position ans zoom factor.

It changes when adding texture depend on it resolution… also annoying.

But if you split window and use Num0 to toggle maximize area, it will save zoom factor.
For scripting would be useful to know how to store parameters.

Start looking at this just in case you follow the same approach.

https://github.com/sobotka/blender-addons/blob/master/space_view3d_stored_views/operators.py