How to pan with snap?

Reading this example: https://www.fusetools.com/examples/pan-zoom-rotate looks very easy, but I want more constrains? snap if x/y near 5 points? Can I extend PanGesture and set reference points?

Thank you