isn't it possible to reuse isPanning instead ?