Scroll stuff

This commit is contained in:
Max Lynch
2015-09-01 16:31:01 -05:00
parent 80452ee9fc
commit e083febf86
3 changed files with 5 additions and 3 deletions

View File

@ -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 = () => {

View File

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

View File

@ -1,6 +1,6 @@
<ion-slides [options]="extraOptions" id="slider" style="background-color: black">
<ion-slide *ng-for="#image of images">
<ion-scroll scroll-x="true" scroll-y="true" zoom center>
<ion-scroll scroll-x="true" scroll-y="true" center>
<img data-src="{{getImageUrl(image)}}" slide-lazy>
</ion-scroll>
</ion-slide>