started work on editor state serialization...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-09-02 17:04:38 +03:00
parent 9034641745
commit c63494d736
2 changed files with 12 additions and 0 deletions

View File

@ -106,6 +106,7 @@ For more info see: <a href="./README.md">README.md</a>
<div>
<button onclick="gallery.crop('marked')" title="crop marked">select<sec>crossword</sec></button>
<button onclick="gallery.uncrop()" title="uncrop">select<sec>grid_on</sec></button>
<button onclick="gallery" title="save crop">crossword<sec>add</sec></button>
</div>
<div>
<button onclick="gallery.toggleQueueRemoval()" title="queue removal (del)">delete</button>

View File

@ -1033,6 +1033,17 @@ var Gallery = {
img.classList.contains(key)
&& (res[key] = true) }
return res }) },
// XXX add support for .load(..)...
editorJson: function(){
var data = {
varsion: 1,
gallery: this.json(),
}
// XXX get serilization handlers...
var handlers = []
for(var handler of handlers){
handler.call(this, data) }
return data },
// XXX
zip: function(){