Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: sky/framework/sky-drawer.sky

Issue 887793002: Implement PointerEvent#dx (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Another nit Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/example-scaffold.sky ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-drawer.sky
diff --git a/sky/framework/sky-drawer.sky b/sky/framework/sky-drawer.sky
index 30e4e3e1e294731e61084d8a520033bb23e33d93..12c3b2bceff0835d908348feb3c458c5dba33105 100644
--- a/sky/framework/sky-drawer.sky
+++ b/sky/framework/sky-drawer.sky
@@ -48,7 +48,6 @@ const kAnimationCurve = Curves.easeInOut;
module.exports = class extends SkyElement {
created() {
- this.previousX_ = 0;
this.position_ = 0;
this.mask_ = null;
this.content_ = null;
@@ -125,14 +124,10 @@ module.exports = class extends SkyElement {
handlePointerDown(event) {
this.animation_.stop();
- this.previousX_ = event.x;
}
handlePointerMove(event) {
- // TODO(abarth): Implement event.dx;
- var deltaX = event.x - this.previousX_;
- this.previousX_ = event.x;
- this.position += deltaX;
+ this.position += event.dx;
}
handlePointerUp(event) {
« no previous file with comments | « sky/examples/example-scaffold.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698