adjust position of image dialog relative to image