fire new ANIM_START event when animation is started, do not fire again until all animations are done
This commit is contained in:
parent
136c323a75
commit
67357fe2f0
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
|
* Copyright 2016 Stephan Leuschner
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -193,6 +194,8 @@ public class Animator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void animStart(float duration, int state) {
|
private void animStart(float duration, int state) {
|
||||||
|
if (!isActive())
|
||||||
|
mMap.events.fire(Map.ANIM_START, mMap.mMapPosition);
|
||||||
mCurPos.copy(mStartPos);
|
mCurPos.copy(mStartPos);
|
||||||
mState = state;
|
mState = state;
|
||||||
mDuration = duration;
|
mDuration = duration;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 Andrey Novikov
|
* Copyright 2016 Andrey Novikov
|
||||||
|
* Copyright 2016 Stephan Leuschner
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -92,6 +93,8 @@ public abstract class Map implements TaskQueue {
|
|||||||
|
|
||||||
public static final Event ANIM_END = new Event();
|
public static final Event ANIM_END = new Event();
|
||||||
|
|
||||||
|
public static final Event ANIM_START = new Event();
|
||||||
|
|
||||||
public final EventDispatcher<InputListener, MotionEvent> input;
|
public final EventDispatcher<InputListener, MotionEvent> input;
|
||||||
public final EventDispatcher<UpdateListener, MapPosition> events;
|
public final EventDispatcher<UpdateListener, MapPosition> events;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user