mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ffd5e3b4c1
commit
55f5dd171b
@ -1982,11 +1982,17 @@ module.CollectionTags = core.ImageGridFeatures.Feature({
|
|||||||
// load local_tags...
|
// load local_tags...
|
||||||
local_tag_names
|
local_tag_names
|
||||||
.forEach(function(tag){
|
.forEach(function(tag){
|
||||||
|
/* XXX for some reason this does not work...
|
||||||
|
tag in local_tags
|
||||||
|
&& tags.tag(tag, [...(local_tags[tag]
|
||||||
|
|| that.data.tags.values(tag))])
|
||||||
|
/*/
|
||||||
// XXX this is not correct as we can have mixed tags...
|
// XXX this is not correct as we can have mixed tags...
|
||||||
// ...use actual tag API...
|
// ...use actual tag API...
|
||||||
tags.__index[tag] = new Set(local_tags[tag]
|
tags.__index[tag] = new Set(local_tags[tag]
|
||||||
|| (that.data.tags.__index || {})[tag]
|
|| (that.data.tags.__index || {})[tag]
|
||||||
|| [])
|
|| [])
|
||||||
|
//*/
|
||||||
})
|
})
|
||||||
|
|
||||||
;(this.crop_stack || [])
|
;(this.crop_stack || [])
|
||||||
@ -2022,13 +2028,20 @@ module.CollectionTags = core.ImageGridFeatures.Feature({
|
|||||||
var local_tags = this.collections[title].local_tags = {}
|
var local_tags = this.collections[title].local_tags = {}
|
||||||
local_tag_names
|
local_tag_names
|
||||||
.forEach(function(tag){
|
.forEach(function(tag){
|
||||||
|
local_tags[tag] = (!new_set || title == MAIN_COLLECTION_TITLE) ?
|
||||||
|
// XXX this might yield a slightly wider set of values...
|
||||||
|
new Set(that.data.tags.values(tag))
|
||||||
|
: new Set()
|
||||||
|
/*
|
||||||
local_tags[tag] = (!new_set || title == MAIN_COLLECTION_TITLE) ?
|
local_tags[tag] = (!new_set || title == MAIN_COLLECTION_TITLE) ?
|
||||||
// XXX this is not correct as we can have mixed tags...
|
// XXX this is not correct as we can have mixed tags...
|
||||||
// ...use actual tag API...
|
// ...use actual tag API...
|
||||||
((that.data.tags.__index || {})[tag] || new Set())
|
((that.data.tags.__index || {})[tag] || new Set())
|
||||||
: new Set()
|
: new Set()
|
||||||
|
//*/
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// delete the .data.tags of the collections...
|
||||||
delete (this.collections[title].data || {}).__tags || {}
|
delete (this.collections[title].data || {}).__tags || {}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
@ -2043,21 +2056,10 @@ module.CollectionTags = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
// prevent global tag removal...
|
// prevent global tag removal...
|
||||||
var tags = this.data.tags
|
var tags = this.data.tags
|
||||||
// XXX do we need this??? (leftover from prev tak implementation)
|
|
||||||
//delete this.data.tags
|
|
||||||
|
|
||||||
return function(){
|
return function(){
|
||||||
tags.untag(local_tag_names, gids)
|
|
||||||
// update local tags...
|
// update local tags...
|
||||||
/*
|
tags.untag(local_tag_names, gids)
|
||||||
local_tag_names.forEach(function(tag){
|
|
||||||
// XXX this is not correct as we can have mixed tags...
|
|
||||||
// ...use actual tag API...
|
|
||||||
tags[tag] = tags[tag].subtract(gids)
|
|
||||||
})
|
|
||||||
//*/
|
|
||||||
|
|
||||||
//this.data.tags.__index = tags
|
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
// save .local_tags to json...
|
// save .local_tags to json...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user