Fix last_pos shifting and add unit test

This commit is contained in:
Alessandro Ranellucci 2013-01-27 13:06:45 +01:00
parent ad48fdc7f9
commit ddaeaa7591
3 changed files with 22 additions and 0 deletions

View file

@ -62,6 +62,7 @@ sub set_shift {
my $self = shift;
my @shift = @_;
# if shift increases (goes towards right), last_pos decreases because it goes towards left
$self->last_pos->translate(
scale ($self->shift_x - $shift[X]),
scale ($self->shift_y - $shift[Y]),