mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cd2dabac38
commit
ed52f7dc33
@ -2281,7 +2281,6 @@ var TagsWithDictPrototype = {
|
|||||||
// consistent with tags above...
|
// consistent with tags above...
|
||||||
// XXX can we avoid normalizing twice???
|
// XXX can we avoid normalizing twice???
|
||||||
var names = this.normalize(this.subTags(...tags))
|
var names = this.normalize(this.subTags(...tags))
|
||||||
|
|
||||||
// populate the dict...
|
// populate the dict...
|
||||||
;(names instanceof Array ? names : [names])
|
;(names instanceof Array ? names : [names])
|
||||||
.forEach(function(tag, i){
|
.forEach(function(tag, i){
|
||||||
@ -2293,7 +2292,6 @@ var TagsWithDictPrototype = {
|
|||||||
&& (dict[tag] = (dict[tag] || [])
|
&& (dict[tag] = (dict[tag] || [])
|
||||||
.concat([value])
|
.concat([value])
|
||||||
.unique()) })
|
.unique()) })
|
||||||
|
|
||||||
return res },
|
return res },
|
||||||
|
|
||||||
// Translate normalized tag to the dict form...
|
// Translate normalized tag to the dict form...
|
||||||
@ -2330,7 +2328,6 @@ var TagsWithDictPrototype = {
|
|||||||
tags = tags.length == 0 ?
|
tags = tags.length == 0 ?
|
||||||
Object.keys(dict)
|
Object.keys(dict)
|
||||||
: this.normalize(this.subTags(normalizeSplit(tags)))
|
: this.normalize(this.subTags(normalizeSplit(tags)))
|
||||||
|
|
||||||
// check all...
|
// check all...
|
||||||
// XXX tune the threshold or make it dynamic...
|
// XXX tune the threshold or make it dynamic...
|
||||||
// XXX do we need both branches???
|
// XXX do we need both branches???
|
||||||
@ -2347,11 +2344,9 @@ var TagsWithDictPrototype = {
|
|||||||
tags = tags
|
tags = tags
|
||||||
.filter(function(tag){
|
.filter(function(tag){
|
||||||
return that.match(tag).length == 0 }) }
|
return that.match(tag).length == 0 }) }
|
||||||
|
|
||||||
tags
|
tags
|
||||||
.forEach(function(tag){
|
.forEach(function(tag){
|
||||||
delete dict[tag] })
|
delete dict[tag] })
|
||||||
|
|
||||||
return this },
|
return this },
|
||||||
|
|
||||||
|
|
||||||
@ -2363,8 +2358,7 @@ var TagsWithDictPrototype = {
|
|||||||
untag: function(tags, value){
|
untag: function(tags, value){
|
||||||
var res = object.parentCall(TagsWithDictPrototype.untag, this, ...arguments)
|
var res = object.parentCall(TagsWithDictPrototype.untag, this, ...arguments)
|
||||||
this.removeOrphansFromDict(tags)
|
this.removeOrphansFromDict(tags)
|
||||||
return res
|
return res },
|
||||||
},
|
|
||||||
replace: function(tag, to, ...tags){
|
replace: function(tag, to, ...tags){
|
||||||
// XXX can we avoid doing this here???
|
// XXX can we avoid doing this here???
|
||||||
if(tag instanceof Function){
|
if(tag instanceof Function){
|
||||||
@ -2453,11 +2447,10 @@ module.TagsWithDict =
|
|||||||
|
|
||||||
var Tags =
|
var Tags =
|
||||||
module.Tags =
|
module.Tags =
|
||||||
//TagsWithHandlers
|
|
||||||
//BaseTags
|
|
||||||
object.Constructor('Tags',
|
object.Constructor('Tags',
|
||||||
BaseTagsClassPrototype,
|
BaseTagsClassPrototype,
|
||||||
object.mixin(BaseTagsPrototype,
|
object.mixin({},
|
||||||
|
BaseTagsPrototype,
|
||||||
TagsWithHandlersPrototype,
|
TagsWithHandlersPrototype,
|
||||||
// XXX not sure if this should be on by default...
|
// XXX not sure if this should be on by default...
|
||||||
TagsWithPersistentPathsPrototype,
|
TagsWithPersistentPathsPrototype,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user