Restricting movment in 2D map view mode

When the camera is fully zoomed out I would like to restrict the map to be centered with a little strip of black across the top and bottom and the user is unable to move the map up or down but can still endless scroll left or right. Then when the user zooms in they are able to move up and down up to the point designated as the upper or lower limit. I’ve tried adding an EventListener to the that checks if the camera.positionCartographic is outside of the limits but that creates some bugs. Is there a variable I can set that stops the map from being able to be moved outside of the window? like how you can set maximum and minimun zoom distance. Thanks for you help!