Added detection for slidedirection