ionic-img-viewer
ionic-img-viewer copied to clipboard
TypeError: imageElement.getBoundingClientRect is not a function
Please provide you version information :
| Dependency | Version |
|---|---|
| ionic | 3.9.2 |
| angular | 5.0.1 |
| ionic-img-viewer | 2.9.0 |
| I get this error when using ion-img tag and not img. | |
| It works perfectly when using img tag only. |
I have the same issue.
I had to use a popover to get the zoom effect.
Same here.
Any solution for this ?
I believe this happens if you don't pass the necessary object or set the #
Try the following:
html
<img src="youtimageurl.png" #imageToView (click)="openImage(imageToView)"/>
ts
openImage(imageToView){ const viewer = this.imageViewerCtrl.create(imageToView, {fullResImage: fullSizePicture}) viewer.present(); }
You can remove ", {fullResImage: fullSizePicture}" if you are not loading a different fullsize image
this can be solved by doing this if u are using ion-img tag <ion-img src="cat.png" imageViewer="cat.png"></ion-img>