Merge branch 'master' of github.com:mapbox/llmr-native
This commit is contained in:
@@ -19,6 +19,7 @@ public:
|
||||
// Animations
|
||||
bool needsAnimation() const;
|
||||
void updateAnimations();
|
||||
void cancelAnimations();
|
||||
|
||||
// Relative changes
|
||||
void moveBy(double dx, double dy, double duration = 0);
|
||||
|
||||
@@ -28,6 +28,10 @@ void Transform::updateAnimations() {
|
||||
});
|
||||
}
|
||||
|
||||
void Transform::cancelAnimations() {
|
||||
animations.clear();
|
||||
}
|
||||
|
||||
void Transform::moveBy(double dx, double dy, double duration) {
|
||||
if (duration == 0) {
|
||||
x += cos(angle) * dx + sin(angle) * dy;
|
||||
|
||||
Reference in New Issue
Block a user