It feels weird to me to have the HTML partial know about the gaLegend service. You need to do differently anyway so the service don't itself stop the event propagation.