mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(slider): new swiper component
This commit is contained in:
@ -5,6 +5,7 @@ import {IonicConfig} from '../../config/config';
|
||||
import {IonicComponent} from '../../config/annotations';
|
||||
import {Gesture} from '../../gestures/gesture';
|
||||
import {CSS} from '../../util/dom';
|
||||
import {Animation} from '../../animations/animation';
|
||||
|
||||
/**
|
||||
* ion-scroll is a non-flexboxed scroll area that can
|
||||
@ -53,9 +54,23 @@ export class Scroll extends Ion {
|
||||
this.zoomGesture = new Gesture(this.scrollElement);
|
||||
this.zoomGesture.listen();
|
||||
|
||||
this.zoomGesture.on('doubletap', (e) => {
|
||||
this.zoomElement.style[CSS.transform] = 'scale(3)';
|
||||
this.zoomAnimation = new Animation(this.zoomElement);
|
||||
this.zoomAnimation
|
||||
.duration(200)
|
||||
.easing('ease-in')
|
||||
.from('scale', '1');
|
||||
|
||||
this.zoomGesture.on('pinch', (e) => {
|
||||
console.log('PINCH', e);
|
||||
});
|
||||
|
||||
/*
|
||||
this.zoomGesture.on('doubletap', (e) => {
|
||||
this.zoomAnimation.to('scale', '3');
|
||||
this.zoomAnimation.play();
|
||||
//this.zoomElement.style[CSS.transform] = 'scale(3)';
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user