mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
previewImages
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { IonSlides, ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-preview-camera',
|
||||
templateUrl: './preview-camera.page.html',
|
||||
styleUrls: ['./preview-camera.page.scss'],
|
||||
})
|
||||
export class PreviewCameraPage implements OnInit {
|
||||
|
||||
constructor( private modalController: ModalController,
|
||||
private navParams:NavParams) { }
|
||||
|
||||
|
||||
@ViewChild(IonSlides) slides : IonSlides
|
||||
image: any;
|
||||
username: string
|
||||
_updatedAt: string
|
||||
|
||||
// @Input('img') img: any
|
||||
// @Input() username: string;
|
||||
// @Input() date: string;
|
||||
|
||||
slideOpts = {
|
||||
zoom: true
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.image = this.navParams.get('image')
|
||||
this.username = this.navParams.get('username')
|
||||
this._updatedAt = this.navParams.get('_updatedAt')
|
||||
console.log(this.image)
|
||||
}
|
||||
|
||||
ionViewDidEnter(){
|
||||
this.slides.update()
|
||||
}
|
||||
|
||||
async zoom(zoomIn: boolean){
|
||||
const slider = await this.slides.getSwiper() //is swipper =!
|
||||
const zoom = slider.zoom
|
||||
zoomIn ? zoom.in(): zoom.out()
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user