mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
experimenting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d3b1af198a
commit
09b48e1d0b
@ -1950,7 +1950,22 @@ var JournalActions = actions.Actions({
|
|||||||
// for format docs see: .updateJournalableActions(..)
|
// for format docs see: .updateJournalableActions(..)
|
||||||
journal: null,
|
journal: null,
|
||||||
rjournal: null,
|
rjournal: null,
|
||||||
// XXX make this a cached prop...
|
|
||||||
|
// XXX EXPERIMENTAL...
|
||||||
|
get journalUnsaved(){
|
||||||
|
var res = []
|
||||||
|
//for(var e of (this.journal || []).slice().reverse()){
|
||||||
|
for(var i=this.journal.length-1; i >= 0; i--){
|
||||||
|
var e = this.journal[i]
|
||||||
|
// everything until a load or a save event...
|
||||||
|
if(e == 'SAVED'
|
||||||
|
|| e.type == 'save'
|
||||||
|
|| e.action == 'load'){
|
||||||
|
break }
|
||||||
|
res.unshift(e) }
|
||||||
|
return res },
|
||||||
|
|
||||||
|
// XXX make this a cached prop... (???)
|
||||||
journalable: null,
|
journalable: null,
|
||||||
|
|
||||||
// XXX docs...
|
// XXX docs...
|
||||||
@ -2041,6 +2056,7 @@ var JournalActions = actions.Actions({
|
|||||||
.map(function(action){
|
.map(function(action){
|
||||||
that.on(action+'.pre', 'journal-handler', handler(action))
|
that.on(action+'.pre', 'journal-handler', handler(action))
|
||||||
return action }) }],
|
return action }) }],
|
||||||
|
|
||||||
// XXX unify names (globally) -> .journal<Action>(..) or .<action>Journal(..)
|
// XXX unify names (globally) -> .journal<Action>(..) or .<action>Journal(..)
|
||||||
journalPush: ['- System/Journal/Add an item to journal',
|
journalPush: ['- System/Journal/Add an item to journal',
|
||||||
function(data){
|
function(data){
|
||||||
@ -2092,6 +2108,7 @@ var JournalActions = actions.Actions({
|
|||||||
// ...intuitively, yes, as undoing past these may result in an
|
// ...intuitively, yes, as undoing past these may result in an
|
||||||
// inconsistent state...
|
// inconsistent state...
|
||||||
// XXX should we implement redo as an undo of undo?
|
// XXX should we implement redo as an undo of undo?
|
||||||
|
// XXX use .journalUnsaved...
|
||||||
undo: ['Edit/Undo',
|
undo: ['Edit/Undo',
|
||||||
doc`Undo last action(s) from .journal that can be undone
|
doc`Undo last action(s) from .journal that can be undone
|
||||||
|
|
||||||
@ -2301,7 +2318,7 @@ var PersistentJournal =
|
|||||||
module.PersistentJournal = ImageGridFeatures.Feature({
|
module.PersistentJournal = ImageGridFeatures.Feature({
|
||||||
title: 'Action persistent Journal',
|
title: 'Action persistent Journal',
|
||||||
|
|
||||||
tag: 'persistent-journal',
|
tag: 'journal-persistent',
|
||||||
depends: [
|
depends: [
|
||||||
'journal',
|
'journal',
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user