Oh yeah, I have noticed that too. For m it still works locally, because I copied the beta JS file back then. Also for this script: http://codepen.io/osublake/pen/6d3b6653862f81c2cf7e9891bedc35e7?editors=0010, it doesn't work anymore like it used to. I'm sure that it initially didn't let the box out of the container. Even just yesterday, the box was kinda jumping between the container and the outside position on the mouse when I tested it -- today you can drag it outside without any problem.
So technically, it should work with that snap feature? Because for me now, the main problem is, that the element doesn't correctly stick to the wall, once it rotates.
When now thinking about it... I guess I probably need to apply the offset after the rotation?
For now it looks like this:
- https://ibb.co/mo5wRF (before the corner)
- https://ibb.co/frk7Yv (when it initially sticks to the "next" wall)
- https://ibb.co/i4V7Yv (when I move it a little further, it sticks back to the first wall -- that's the "jumping" I was talking about; it does the 2. and 3. step quite a lot of times, until it's not fully sticked to the next wall -- after it does stick to the next wall, everything it fine)
Also, it this formula correct -- I'm currently using it, to recalculate the offset when dropping the item into the container... it kinda works, but I'm not 100% sure if that is the right way.
if (
self.target._gsTransform.rotation === 90 ||
self.target._gsTransform.rotation === 270
) {
var elHeight = self.target.clientHeight;
var elWidth = self.target.clientWidth;
var rotationValue = elWidth > elHeight
? (elWidth - elHeight) / 2
: (elHeight - elWidth) / 2;
elementRotationOffsetX = rotationValue;
elementRotationOffsetY = -rotationValue;
}