Zoom and drag function on press

i’m working on a map file

i have controls set up to pan left, right, up and down. but i’d also like to be able to drag the map within the bounds on press and stop dragging on release

imagine if you will, a bounding box with a draggable box that is larger than the bounds. the right bound of the box must never be less than the x position of the right side of the box … and so on

does this make sense?

can anyone help?