mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor tweaks and fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
736ffac934
commit
5a5e0366ba
@ -1568,7 +1568,7 @@ function alignDataToRibbon(base_ribbon, data, start, end){
|
||||
// prepare for and fire the event...
|
||||
// XXX not sure if this is correct yet...
|
||||
var gids = []
|
||||
sections[1].forEach(function(ribbon){
|
||||
sections[1].ribbons.forEach(function(ribbon){
|
||||
gids = gids.concat(ribbon)
|
||||
})
|
||||
// XXX do we need sections[1] passed here?
|
||||
|
||||
18
ui/tags.js
18
ui/tags.js
@ -23,22 +23,28 @@ var TAGS = {}
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
function buildTagsFromImages(images, tagset){
|
||||
function buildTagsFromImages(tagset, images){
|
||||
tagset = tagset == null ? TAGS : tagset
|
||||
images = images == null ? IMAGES : images
|
||||
|
||||
for(gid in images){
|
||||
for(var gid in images){
|
||||
var tags = images[gid].tags
|
||||
if(tags == null){
|
||||
// no tags in this image...
|
||||
if(tags == null || tags.length == 0){
|
||||
continue
|
||||
}
|
||||
tags.map(function(tag){
|
||||
tags.forEach(function(tag){
|
||||
// first time we see this tag...
|
||||
if(tagset[tag] == null){
|
||||
tagset[tag] = []
|
||||
}
|
||||
tagset[tag].push(gid)
|
||||
// only update if not tagged...
|
||||
if(tagset[tag].indexOf(gid) < 0){
|
||||
tagset[tag].push(gid)
|
||||
}
|
||||
})
|
||||
}
|
||||
return tagset
|
||||
}
|
||||
|
||||
|
||||
@ -305,7 +311,7 @@ function setupTags(viewer){
|
||||
|
||||
return viewer
|
||||
.on('imagesLoaded', function(){
|
||||
TAGS = []
|
||||
TAGS = {}
|
||||
|
||||
showStatusQ('Tags: Index: building...')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user