javascript - jquery draggable containment doesn't work if draggable element has transformation applied -


i'm trying use jquery draggable's containment feature doesn't seem work if object being contained has transformation applied it.

jsfiddle example: http://jsfiddle.net/us2fr/

does know how can fix this?

after tweaks drag function, have working solution: http://jsfiddle.net/ggun9/2/

you can test changing scale , orig values. if test div smaller container stay within it's bounds. if it's larger, you'll able drag around, stay in bounds (i.e. shouldn't ever see white space inside container).

update:

i noticed today jsfiddle example above not work if css left , top values not 0px test div. i've fixed , updated fiddle: http://jsfiddle.net/ggun9/3/

hopefully in future!


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -