These are chat archives for taye/interact.js

19th
Nov 2015
Kai Liu (Victor)
@vickailiu
Nov 19 2015 10:44
This message was deleted
Hi @taye , one small question. I was trying to create a function such that when the ctrl key is held during dragging, the rectangle can rotate 90 degree. But the problem is snapping. For example, if the rectangle is of size 1x2, and the grid size is 1. Then once I rotate 90 degree, then it becomes 2x1 and it will only snap to every half of the horizontal grid. Hope I state the problem clearly, any idea to bypass it?
Kai Liu (Victor)
@vickailiu
Nov 19 2015 12:09
Hey @taye , I figured out some walk around for that. So I just append a child on the draggable such that the drggable will handle the overall movement, while the inner child will handle rotation and possibly the offset.
Great library :clap: