From b4c6dc6107da08e67d9bb0158801288ebb023956 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 1 Sep 2023 16:25:21 +0300 Subject: [PATCH] basic buttons now work... Signed-off-by: Alex A. Naanou --- README.md | 9 +++++---- grid-n-view.html | 4 ++-- grid-n-view.js | 8 +++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 94ab484..dcefa65 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,11 @@ Gallery(dom, urls[, options]) ``` - **Gallery: view crop** - - open/change/close - - crop stack (a-la ImageGrid.Viewer) - - actions: - - "from selection" + - ~~crop stack (a-la ImageGrid.Viewer)~~ + - ~~GUI: basic buttons~~ + - ~~named crop~~ + - GUI: level indicators (a-la ImageGrid.Viewer) + - GUI: named crop list - ~~Gallery: drag-n-drop~~ - ~~drop files/images~~ - ~~drag to sort~~ diff --git a/grid-n-view.html b/grid-n-view.html index eb6d6e0..933c836 100644 --- a/grid-n-view.html +++ b/grid-n-view.html @@ -104,8 +104,8 @@ For more info see: README.md
- - + +
diff --git a/grid-n-view.js b/grid-n-view.js index 069f820..d849501 100644 --- a/grid-n-view.js +++ b/grid-n-view.js @@ -1103,15 +1103,13 @@ var Gallery = { var state = this.json() stack.push(state) if(lst){ - lst = this.getImages(...lst) - // XXX filter state... - // XXX - } + state = this.json(this.getImages(lst)) } this.load(state) return this }, uncrop: function(lst){ var state = this.__crop_stack?.pop() - state.length == 0 + state + && state.length == 0 && (delete this.__crop_stack) state && this.load(state)