Change Origin of Mesh When Dragging

Hey I have object i want to move but my object is snapping to cursor center when dragging.
I want to change the pivot point of the object so where i click that will be the new origin point of the object.
Something like this:

Can you share a repro on the playground ?