Resizing of board using a directive for DOM manipulation