Uses panend event instead of event.isLast.