From e61ee56e425cc7bd0c878729ec84b746a96c7e24 Mon Sep 17 00:00:00 2001 From: marion Date: Fri, 20 Jul 2007 14:50:25 +0000 Subject: Déplacement du plisten pour supprimer warning --- src/MTools/Anim/MPath.pm | 57 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'src/MTools/Anim') diff --git a/src/MTools/Anim/MPath.pm b/src/MTools/Anim/MPath.pm index eb8b221..6d73cff 100644 --- a/src/MTools/Anim/MPath.pm +++ b/src/MTools/Anim/MPath.pm @@ -98,34 +98,35 @@ sub pathchanged { } sub start { - my ($self) = @_; - - my @points = @{$self -> mget ('path')}; - if (!@points) {return;} - $self -> {__x} = $points [0] -> [0]; - $self -> {__y} = $points [0] -> [1]; - my $pacing = new Anim::Pacing::Linear (-duration => $self -> mget ('duration')); - $self -> {__percentage} = 0; - my $animationpath = new Anim::Path::Rectilinear ( - -xdep => 0, - -ydep => 0, - -xdest => 100, - -ydest => 0, - ); - $self -> {__animation} = my $animation = new Anim ( - -pacing => $pacing, - -resources => [ - $animationpath, - -command => sub { $self -> __event (@_)}, - -endcommand => sub {$self -> notify ('ANIMATION_END'); $self -> {__animation} = undef;}, - ], - -stopcommand => sub { - $self -> notify ('ANIMATION_ABORD', $self -> __getPoint ($self -> {__percentage})); - $self -> {__animation} = undef; - }, - -loop => $self -> mget ('loop'), - ); - $animation -> start (); + my ($self) = @_; + + my @points = @{$self -> mget ('path')}; + if (!@points) {return;} + $self -> {__x} = $points [0] -> [0]; + $self -> {__y} = $points [0] -> [1]; + my $pacing = new Anim::Pacing::Linear (-duration => $self -> mget ('duration')); + $self -> {__percentage} = 0; + my $animationpath = new Anim::Path::Rectilinear ( + -xdep => 0, + -ydep => 0, + -xdest => 100, + -ydest => 0, + ); + $self -> {__animation} = my $animation = new Anim ( + -pacing => $pacing, + -resources => [ + $animationpath, + -command => sub { $self -> __event (@_)}, + -endcommand => sub {$self -> notify ('ANIMATION_END'); + $self -> {__animation} = undef;}, + ], + -stopcommand => sub { + $self -> notify ('ANIMATION_ABORD', $self -> __getPoint ($self -> {__percentage})); + $self -> {__animation} = undef; + }, + -loop => $self -> mget ('loop'), + ); + $animation -> start (); } sub stop { -- cgit v1.1