Inner div inside an outer rotated div does not follow mouse in case dragging with jQuery UI

后端 未结 6 716
温柔的废话
温柔的废话 2021-02-07 05:04

I have an inner div inside an outer div. The inner div is draggable and outer is rotated through 40 degree. This is a test case. In an actual case it could be any angle. There i

6条回答
  •  遇见更好的自我
    2021-02-07 05:44

    This basically will do what you need though it is buggy. Bind the drag event handler, intercept the ui object and modify it to use the offset X and Y of the parent element. All of the X, Y, top, left etc. are in those objects. I will try to get you a better example sometime when today when I get a bit more time. Good luck!

    http://jsfiddle.net/kB4ra/107/

提交回复
热议问题