pub fn pan_to(&mut self, origin: Point) -> bool {
        let new_origin = self.clamp_view_origin(origin);
        if (new_origin - self.view_origin).hypot2() > 1e-12 {
            self.view_origin = new_origin;
            true
        } else {
            false
        }
    }
/// Sets the viewport origin to `pos`, while trying to keep the view rectangle inside the
/// content rectangle.
///
/// Returns true if the position changed. Note that the valid values for the viewport origin
/// are constrained by the size of the child, and so the origin might not get set to exactly
/// `pos`.
Sets the viewport origin to `pos`, while trying to keep the view rectangle inside the
content rectangle.

Returns true if the position changed. Note that the valid values for the viewport origin
are constrained by the size of the child, and so the origin might not get set to exactly
`pos`.
Sets the viewport origin to ` pos ` while trying to keep the view rectangle inside the content rectangle . Returns true if the position changed . Note that the valid values for the viewport origin are constrained by the size of the child and so the origin might not get set to exactly ` pos ` .
pub fn pan_to(&mut self, origin: Point) -> bool {
        let new_origin = self.clamp_view_origin(origin);
        if (new_origin - self.view_origin).hypot2() > 1e-12 {
            self.view_origin = new_origin;
            true
        } else {
            false
        }
    }
pub fn pan_to ( & mut self , origin : Point ) -> bool { let new_origin = self . clamp_view_origin ( origin ) ; if ( new_origin - self . view_origin ) . hypot2 ( ) > 1e-12 { self . view_origin = new_origin ; true } else { false } }
Sets the viewport origin to `pos`, while trying to keep the view rectangle inside the
content rectangle.
Sets the viewport origin to ` pos ` while trying to keep the view rectangle inside the content rectangle .
&mut self
origin
Point
&mut self
origin
Point