Make sure the viewport cannot be moved to a point where it would be entirely outside of the minimap bounds. A portion of the viewport bounds must always remain inside the mininamp bounds. For example, the situation given below would be allowed:
Moving the viewport further left would be disallowed.