Merge branch 'master' of github.com:mapbox/llmr-native

This commit is contained in:
Justin R. Miller
2014-02-07 11:26:59 -05:00
2 changed files with 5 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ public:
// Animations
bool needsAnimation() const;
void updateAnimations();
void cancelAnimations();
// Relative changes
void moveBy(double dx, double dy, double duration = 0);

View File

@@ -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;