From e083febf86ca88e09f9f2d04bf8487372bb2426b Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Tue, 1 Sep 2015 16:31:01 -0500 Subject: [PATCH] Scroll stuff --- ionic/animations/animation.ts | 4 +++- ionic/components/scroll/scroll.ts | 2 +- ionic/components/slides/test/basic/main.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ionic/animations/animation.ts b/ionic/animations/animation.ts index 22b42b7458..ea1924d3b6 100644 --- a/ionic/animations/animation.ts +++ b/ionic/animations/animation.ts @@ -457,6 +457,8 @@ class Animate { return inlineStyle(ele, this.toEffect); } + this.fill = fill || 'both'; + this.ele = ele; this.promise = new Promise(res => { this.resolve = res; }); @@ -492,7 +494,7 @@ class Animate { duration: self.duration || 0, easing: self.easing, playbackRate: self.rate || 1, - fill: fill || 'both' + fill: this.fill }); self.player.onfinish = () => { diff --git a/ionic/components/scroll/scroll.ts b/ionic/components/scroll/scroll.ts index 537201bdaa..342fd260fe 100644 --- a/ionic/components/scroll/scroll.ts +++ b/ionic/components/scroll/scroll.ts @@ -52,7 +52,6 @@ export class Scroll extends Ion { if(this.zoomElement) { this.zoomElement.parentElement.style[CSS.transform] = ''; - this.zoomElement.style[CSS.transform] = 'scale(1)'; } @@ -108,6 +107,7 @@ export class Scroll extends Ion { } else if(-posX > viewportWidth) { // Too far on the right side, let the event bubble up (to enable slider on edges, for example) } else { + console.log('TRANSFORM', posX); this.zoomElement.parentElement.style[CSS.transform] = 'translateX(' + posX + 'px) translateY(' + posY + 'px)'; e.preventDefault(); e.stopPropagation(); diff --git a/ionic/components/slides/test/basic/main.html b/ionic/components/slides/test/basic/main.html index dd25327f52..1b2777d1b5 100644 --- a/ionic/components/slides/test/basic/main.html +++ b/ionic/components/slides/test/basic/main.html @@ -1,6 +1,6 @@ - +