issue regarding resizable resize event behavior

issue regarding resizable resize event behavior

Hi all, I have some widget using jQuery draggable and resizable. I currently have collision detection algorithm done such that for example on the drag event in draggable. I can manually set the ui.position.top and ui.position.left to prevent the widget from moving further if blocked. However in the resize event of resizable if I manually set ui.size.width and ui.size.height when I detect collision. It still continue to resize. Am I missing something? or is there compatibility issues with draggable and resizable?

Thanks

James