mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
32197fac12
commit
e132e7ee17
@ -424,6 +424,17 @@ var CollectionActions = actions.Actions({
|
|||||||
// optimization:
|
// optimization:
|
||||||
// avoid processing .tags as we'll
|
// avoid processing .tags as we'll
|
||||||
// overwrite them anyway later...
|
// overwrite them anyway later...
|
||||||
|
//
|
||||||
|
// XXX not sure if this has any merit
|
||||||
|
// here as we do not "save" changes
|
||||||
|
// to loaded collections unless we
|
||||||
|
// overwrite them -- they are edited
|
||||||
|
// in-place
|
||||||
|
// ...so we'll need to either clean
|
||||||
|
// out tags on unload, or forget
|
||||||
|
// about it completely...
|
||||||
|
// see:
|
||||||
|
// .collectionUnloaded()
|
||||||
delete this.tags
|
delete this.tags
|
||||||
})
|
})
|
||||||
.clear('unloaded')),
|
.clear('unloaded')),
|
||||||
@ -774,6 +785,18 @@ module.Collection = core.ImageGridFeatures.Feature({
|
|||||||
actions: CollectionActions,
|
actions: CollectionActions,
|
||||||
|
|
||||||
handlers: [
|
handlers: [
|
||||||
|
// XXX needs testing (json/load)...
|
||||||
|
// also see .saveCollection(..)
|
||||||
|
['collectionUnloaded',
|
||||||
|
function(_, title){
|
||||||
|
if(title != MAIN_COLLECTION_TITLE
|
||||||
|
&& title in this.collections
|
||||||
|
&& 'data' in this.collections[title]){
|
||||||
|
// cleanup...
|
||||||
|
delete this.collections[title].data.tags
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
|
||||||
// XXX maintain changes...
|
// XXX maintain changes...
|
||||||
// - collection-level: mark collections as changed...
|
// - collection-level: mark collections as changed...
|
||||||
// - in-collection:
|
// - in-collection:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user