Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

Commit

Permalink
Show images set based on non-null values
Browse files Browse the repository at this point in the history
  • Loading branch information
frabcus committed Jun 11, 2013
1 parent 6b6d4bb commit a5d7f0d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions http/facts.js
Expand Up @@ -431,15 +431,19 @@ var fact_numbers_range = function(col, group) {
var fact_image_collage = function(col, group) {
// See if we have enough images
var image_count = 0
var non_null_count = 0
$.each(group, function(ix, value) {
if (is_image_url(String(value.val))) {
image_count ++
if (value.val != null) {
non_null_count ++
if (is_image_url(String(value.val))) {
image_count ++
}
}
})
if (image_count < 1) {
return
}
if (image_count < 4 && image_count != group.length) {
if (image_count < 4 && image_count != non_null_count) {
return
}

Expand Down

0 comments on commit a5d7f0d

Please sign in to comment.