gthmb / jquery-free-transform

provides simple controls that allows you to move/rotate/scale a DOM element. kinda like a simple version of the free transform tool in Flash or Photoshop.
133 stars 58 forks source link

After re-sizing the element position center of parent #19

Open AnurajRicky opened 10 years ago

AnurajRicky commented 10 years ago

I need to align the element center of parent div when i click the button. Before re-sizing this working fine but after re-sizing having trouble. Can you please help me for fix this?

See the fiddle: http://jsfiddle.net/mpanuraj/xUtq6/3/

gthmb commented 10 years ago

you'd want to use the 'getBounds' method of the freetrans object instead of the outerWidth/Height methods. this plugin modifies scale with the CSS3 transform class - which does not affect the DOM's traditional width/height properties.

http://jsfiddle.net/xUtq6/4/

gthmb commented 10 years ago

hmm, the height does not seem to be working as expected...

AnurajRicky commented 10 years ago

Yeah,the horizontal alignment function working perfectly. But I am expecting the vertical too.