Fix #41: Do not jump to 0 % or 100 % when changing direction of transition

Signed-off-by: Mattias Andrée <maandree@operamail.com>