aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Anim/MScalor.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTools/Anim/MScalor.pm')
-rw-r--r--src/MTools/Anim/MScalor.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/MTools/Anim/MScalor.pm b/src/MTools/Anim/MScalor.pm
index 4845c54..da1914d 100644
--- a/src/MTools/Anim/MScalor.pm
+++ b/src/MTools/Anim/MScalor.pm
@@ -55,7 +55,6 @@ sub new {
my ($class, %options) = @_;
my $self = new MTools::MObjet ();
bless $self, $class;
-
$self -> recordProperty ('-visible', 0);
$self -> recordProperty ('center_x', 0);
$self -> recordProperty ('center_y', 0);
@@ -123,6 +122,13 @@ sub stop {
}
}
+sub complete {
+ my ($self) = @_;
+ return if !$self->isRunning();
+ $self->__event($self -> mget ('to_x') - $self -> {__xdep}, $self -> mget ('to_y') - $self -> {__ydep});
+ $self->stop();
+}
+
sub __event {
my ($self, $x, $y) = @_;
my $cx = $self -> mget ('center_x');