add dragWithinParent() and example sketch

also update the example DragWithinParent is based on to simplify it