Is there any way to distinguish those two behaviors from each other? I would like to obtain different functionality clicking on the legend\'s checkbox and the other one on t