Implements the resize of the element by the mouse,
Now when an element is moved, it follows the mouse.