There isn't a built in method.  Is there a reason in your example that
facet is there?  The property doesn't appear in the data at all.

There is probably a way to do this by rewriting the facet code, but it's
not always good UI design to just hide elements, especially when an
empty facet is useful information (that is, after successive filtering,
it is useful to some to know that no property data exists for items that
match the filters).  You would instead have to remember what was there
and that it's gone if it auto-hid.

You could look in Exhibit.ListFacet.prototype.update as a method to
rewrite for your purposes; you would have to rewrite each update for
every Facet class that pertained for it to work correctly.

http://api.simile-widgets.org/exhibit/2.2.0/scripts/ui/facets/list-facet.js

If you don't want to mess with Exhibit internals, you could instead
write something that polled or watched the facet DOM for evidence that
it was empty and hide / unhide based on that.

On 11/3/11 01:34 , Paul Warner wrote:
> Hi,
> 
> I have a facet that is empty sometimes, and when it is, I would like to
> hide it.  I have searched this list, and found
> http://groups.google.com/group/simile-widgets/browse_thread/thread/9b132e9b525e1aca/b07c5be97ba55786?hl=en&lnk=gst&q=hide+facet#b07c5be97ba55786
> 
> But it does not seem to have the answer, or I have not understood it.  Is
> there a way to hide an empty facet?
> 
> http://www.hucompute.org/team/mitarbeiterinnen/publikationen-gleim?Itemid=4
> 
> Notice the empty facet at the top right, "Special Note".
> 
> Thanks for any help!!
> 
> Regards,
> Paul
> 

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to