Mouse handling for legend and metadata.