diff options
Diffstat (limited to 'src/MTools/Comp/MMover.pm')
-rw-r--r-- | src/MTools/Comp/MMover.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/MTools/Comp/MMover.pm b/src/MTools/Comp/MMover.pm index 0d2628c..6097bd9 100644 --- a/src/MTools/Comp/MMover.pm +++ b/src/MTools/Comp/MMover.pm @@ -55,6 +55,7 @@ sub new { $self -> recordProperty ('y', 0); $self -> recordProperty ('targets', $targets); $self -> recordProperty ('allower', undef); + $self -> recordProperty ('translate', 'translate'); $self -> mconfigure (%options); @@ -79,17 +80,18 @@ sub setPos { my $dy = $y - $self -> mget ('y'); my $tgs = $self -> mget ('targets'); my @targets; + my $translate_cbk = $self -> mget ('translate'); if (ref ($tgs) eq 'ARRAY') { @targets = @{$tgs}; for (my $i = 0; $i < @targets; $i++) { - $targets [$i] -> translate ($dx, $dy); + $targets [$i] -> $translate_cbk ($dx, $dy); } } else { - $tgs -> translate ($dx, $dy); + $tgs -> $translate_cbk ($dx, $dy); } $self -> mconfigure ('x', $x); $self -> mconfigure ('y', $y); |