Alex Rivera | Logout

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

Asked 2012-05-30T06:12:59.467
18

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 is another div called point which is positioned as shown in the figure. ( I am from a flash background . In Flash if I were to drag the inner div it would follow the mouse even if its contained inside an outer rotated div.) But in HTML the inner div does not follow the mouse as it can be seen from the fiddle. I want the div 'point' to exactly follow the mouse. Is this possible. I tried to work it using trignometry but could not get it to work.

http://jsfiddle.net/bobbyfrancisjoseph/kB4ra/8/

Edit
Report

1 Answer

0

It seems to me that if you do not rotate the div, the div exactly follows the mouse. This might be a problem with the plugin..maybe you could simulate the draggable function corretly?

answered 2012-05-30T12:39:59.547

Your Answer