Hello there! Please take the changes!

There is an error in mouseup due to empty $viewport.find(...). I suppose to use $(this) like in mousedown