mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
Scroll stuff
This commit is contained in:
@ -457,6 +457,8 @@ class Animate {
|
|||||||
return inlineStyle(ele, this.toEffect);
|
return inlineStyle(ele, this.toEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.fill = fill || 'both';
|
||||||
|
|
||||||
this.ele = ele;
|
this.ele = ele;
|
||||||
this.promise = new Promise(res => { this.resolve = res; });
|
this.promise = new Promise(res => { this.resolve = res; });
|
||||||
|
|
||||||
@ -492,7 +494,7 @@ class Animate {
|
|||||||
duration: self.duration || 0,
|
duration: self.duration || 0,
|
||||||
easing: self.easing,
|
easing: self.easing,
|
||||||
playbackRate: self.rate || 1,
|
playbackRate: self.rate || 1,
|
||||||
fill: fill || 'both'
|
fill: this.fill
|
||||||
});
|
});
|
||||||
|
|
||||||
self.player.onfinish = () => {
|
self.player.onfinish = () => {
|
||||||
|
@ -52,7 +52,6 @@ export class Scroll extends Ion {
|
|||||||
if(this.zoomElement) {
|
if(this.zoomElement) {
|
||||||
|
|
||||||
this.zoomElement.parentElement.style[CSS.transform] = '';
|
this.zoomElement.parentElement.style[CSS.transform] = '';
|
||||||
|
|
||||||
this.zoomElement.style[CSS.transform] = 'scale(1)';
|
this.zoomElement.style[CSS.transform] = 'scale(1)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +107,7 @@ export class Scroll extends Ion {
|
|||||||
} else if(-posX > viewportWidth) {
|
} else if(-posX > viewportWidth) {
|
||||||
// Too far on the right side, let the event bubble up (to enable slider on edges, for example)
|
// Too far on the right side, let the event bubble up (to enable slider on edges, for example)
|
||||||
} else {
|
} else {
|
||||||
|
console.log('TRANSFORM', posX);
|
||||||
this.zoomElement.parentElement.style[CSS.transform] = 'translateX(' + posX + 'px) translateY(' + posY + 'px)';
|
this.zoomElement.parentElement.style[CSS.transform] = 'translateX(' + posX + 'px) translateY(' + posY + 'px)';
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<ion-slides [options]="extraOptions" id="slider" style="background-color: black">
|
<ion-slides [options]="extraOptions" id="slider" style="background-color: black">
|
||||||
<ion-slide *ng-for="#image of images">
|
<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>
|
<img data-src="{{getImageUrl(image)}}" slide-lazy>
|
||||||
</ion-scroll>
|
</ion-scroll>
|
||||||
</ion-slide>
|
</ion-slide>
|
||||||
|
Reference in New Issue
Block a user