title: How to snap shapes positions on dragging with Konva? layout: demo_page
This demo will demonstrate how to implement snapping of objects to all edges of the stage on to all edges of other objects.
Also I found another related demos on the internet that may be useful:
- Post: https://medium.com/@pierrebleroux/snap-to-grid-with-konvajs-c41eae97c13f
- Demo:https://codepen.io/pierrebleroux/pen/gGpvxJ
Instruction: try to drag and object. See how it snaps to other objects.
{% iframe /downloads/code/sandbox/Objects_Snapping.html %}
{% include_code Konva Custom Font sandbox/Objects_Snapping.html %}