Added ability to pass a filter function to the Delete control, which
determines which layers it will be applied to.