pub fn animate(&mut self, value: T) {
        if !value.same(&self.end) {
            self.start = self.current.clone();
            self.end = value.clone();
            self.current_duration = 0.0;
            if self.full_duration == 0.0 {
                self.current = value;
                //if self.layout { ctx.request_layout(); } else { ctx.request_paint(); }
            } // else { ctx.request_anim_frame(); }
        }
    }
/// Set the new end value. If the animation is currently running, it will start from the current
/// value.
//TODO: change to RequestCtx to automatically update
Set the new end value. If the animation is currently running, it will start from the current
value.
TODO: change to RequestCtx to automatically update
Set the new end value . If the animation is currently running it will start from the current value . TODO : change to RequestCtx to automatically update
pub fn animate(&mut self, value: T) {
        if !value.same(&self.end) {
            self.start = self.current.clone();
            self.end = value.clone();
            self.current_duration = 0.0;
            if self.full_duration == 0.0 {
                self.current = value;
                //if self.layout { ctx.request_layout(); } else { ctx.request_paint(); }
            } // else { ctx.request_anim_frame(); }
        }
    }
pub fn animate ( & mut self , value : T ) { if ! value . same ( & self . end ) { self . start = self . current . clone ( ) ; self . end = value . clone ( ) ; self . current_duration = 0.0 ; if self . full_duration == 0.0 { self . current = value ; //if self.layout { ctx.request_layout(); } else { ctx.request_paint(); } } // else { ctx.request_anim_frame(); } } }
Set the new end value.
Set the new end value .
&mut self
value
T