diff --git a/raphael.free_transform.js b/raphael.free_transform.js index a167aa7..22b78d1 100644 --- a/raphael.free_transform.js +++ b/raphael.free_transform.js @@ -1086,16 +1086,16 @@ ft.attrs.translate.x += ft.opts.boundary.x - ( ft.attrs.center.x + ft.attrs.translate.x ); } - if ( ft.attrs.center.y + ft.attrs.translate.y < ft.opts.boundary ) { - ft.attrs.translate.y += ft.opts.boundary - ( ft.attrs.center.y + ft.attrs.translate.y ); + if ( ft.attrs.center.y + ft.attrs.translate.y < ft.opts.boundary.y ) { + ft.attrs.translate.y += ft.opts.boundary.y - ( ft.attrs.center.y + ft.attrs.translate.y ); } if ( ft.attrs.center.x + ft.attrs.translate.x > ft.opts.boundary.x + ft.opts.boundarywidth ) { ft.attrs.translate.x += ft.opts.boundary.x + ft.opts.boundarywidth - ( ft.attrs.center.x + ft.attrs.translate.x ); } - if ( ft.attrs.center.y + ft.attrs.translate.y > ft.opts.boundary + ft.opts.boundaryheight ) { - ft.attrs.translate.y += ft.opts.boundary + ft.opts.boundaryheight - ( ft.attrs.center.y + ft.attrs.translate.y ); + if ( ft.attrs.center.y + ft.attrs.translate.y > ft.opts.boundary.y + ft.opts.boundaryheight ) { + ft.attrs.translate.y += ft.opts.boundary.y + ft.opts.boundaryheight - ( ft.attrs.center.y + ft.attrs.translate.y ); } }