Having trouble implementing zoom and scroll functionality for a simple image view using ion-scroll. As a newcomer to Ionic, I am struggling to achieve the desired result. Below is the snippet of my .js code and corresponding CSS class.
JS
<ion-content class="bg-color detail-cont">
<ion-scroll class="filter-image" zooming="true" direction="xy" min-zoom="1" locked="false" has-bouncing="true">
<div class="my-image" style="background: url('{{ getCurPhotoURI() }}')"></div>
</ion-scroll>
</ion-content>
CSS
.filter-image {
height:100% !important;
width: 100% !important;
background-color: black;
}
.my-image{
width: 100% !important;
height: 100% !important;
background-size: contain !important;
background-repeat: no-repeat !important;
background-position: center, center !important;
}
Can anyone help me identify what's going wrong in my implementation? Your assistance is greatly appreciated. Regards.