Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: imageElement.getBoundingClientRect is not a function #110

Open
chrisgeek opened this issue Jan 20, 2018 · 6 comments
Open

TypeError: imageElement.getBoundingClientRect is not a function #110

chrisgeek opened this issue Jan 20, 2018 · 6 comments

Comments

@chrisgeek
Copy link

chrisgeek commented Jan 20, 2018

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.
@BobaFett58
Copy link

I have the same issue.

@chrisgeek
Copy link
Author

I had to use a popover to get the zoom effect.

@devfelipereis
Copy link

Same here.

@SnehaSSD
Copy link

Any solution for this ?

@kevingrabher
Copy link

kevingrabher commented Jun 26, 2018

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

@hitmacreed
Copy link

this can be solved by doing this if u are using ion-img tag <ion-img src="cat.png" imageViewer="cat.png"></ion-img>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants