diff options
Diffstat (limited to 'src/MTools/Anim')
-rw-r--r-- | src/MTools/Anim/MOpacity.pm | 9 | ||||
-rw-r--r-- | src/MTools/Anim/MPath.pm | 9 | ||||
-rw-r--r-- | src/MTools/Anim/MScalor.pm | 9 | ||||
-rw-r--r-- | src/MTools/Anim/MTranslator.pm | 9 |
4 files changed, 32 insertions, 4 deletions
diff --git a/src/MTools/Anim/MOpacity.pm b/src/MTools/Anim/MOpacity.pm index d7aba19..cbb5571 100644 --- a/src/MTools/Anim/MOpacity.pm +++ b/src/MTools/Anim/MOpacity.pm @@ -129,7 +129,14 @@ sub __event { } for (my $i = 0; $i < @targets; $i++) { - $targets [$i] -> mconfigure ('-alpha' => $opacity); + if (ref($targets [$i]) eq '') + { + mconfigure ($targets[$i], '-alpha' => $opacity); + } + else + { + $targets [$i] -> mconfigure ('-alpha' => $opacity); + } } $self -> {__opacity} = $opacity; $self -> notify ('OPACITY_CHANGED', $opacity); diff --git a/src/MTools/Anim/MPath.pm b/src/MTools/Anim/MPath.pm index d24e740..910cfb5 100644 --- a/src/MTools/Anim/MPath.pm +++ b/src/MTools/Anim/MPath.pm @@ -177,7 +177,14 @@ sub __event { } for (my $i = 0; $i < @targets; $i++) { - $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y}); + if (ref($targets [$i]) eq '') + { + translate ($targets [$i], $x - $self -> {__x}, $y - $self -> {__y}); + } + else + { + $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y}); + } } $self -> {__x} = $x; $self -> {__y} = $y; diff --git a/src/MTools/Anim/MScalor.pm b/src/MTools/Anim/MScalor.pm index eb8695f..8131b7a 100644 --- a/src/MTools/Anim/MScalor.pm +++ b/src/MTools/Anim/MScalor.pm @@ -139,7 +139,14 @@ sub __event { } for (my $i = 0; $i < @targets; $i++) { - scale ($targets [$i], $x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy); + if (ref($targets [$i]) eq '') + { + scale ($targets [$i], $x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy); + } + else + { + $targets [$i] -> scale ($x / $self -> {__x}, $y / $self -> {__y}, $cx, $cy); + } } $self -> {__x} = $x; $self -> {__y} = $y; diff --git a/src/MTools/Anim/MTranslator.pm b/src/MTools/Anim/MTranslator.pm index c50aef9..734f42b 100644 --- a/src/MTools/Anim/MTranslator.pm +++ b/src/MTools/Anim/MTranslator.pm @@ -155,7 +155,14 @@ sub event { } else { - $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y}); + if (ref($targets [$i]) eq '') + { + translate ($targets [$i], $x - $self -> {__x}, $y - $self -> {__y}); + } + else + { + $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y}); + } } } $self -> {__x} = $x; |