OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Fit image on p-galleria primeNg for Angular2 application

  • Thread starter Thread starter Sara N
  • Start date Start date
S

Sara N

Guest
I used p_galleria of PrimeNg and set this attributes :

Code:
<p-galleria [images]="productImages"
   panelWidth="560"
   panelHeight="313"
   autoPlay="false"
   showFilmstrip="false"
   id="product-galley"
   showCaption="false">
</p-galleria>

also I added an style for rendered image panel :

Code:
.ui-panel-images {
    /*height: inherit !important;
    width: inherit !important;*/
    /*max-height: inherit !important;
    height: initial;
    max-width: inherit !important;
    width: initial;*/
    max-width: 100%;
    max-height: 100%;
    width:auto;
    height:auto;
}

But the image is always stretched in container, I want it to be fixed in scale. and be in center of panel.

Is there any idea how to change the style?

Maybe its not relevant, but I wrapped this gallery in a bootstrap-modal.
<p>I used p_galleria of PrimeNg and set this attributes :</p>

<pre><code><p-galleria [images]="productImages"
panelWidth="560"
panelHeight="313"
autoPlay="false"
showFilmstrip="false"
id="product-galley"
showCaption="false">
</p-galleria>
</code></pre>

<p>also I added an style for rendered image panel :</p>

<pre><code>.ui-panel-images {
/*height: inherit !important;
width: inherit !important;*/
/*max-height: inherit !important;
height: initial;
max-width: inherit !important;
width: initial;*/
max-width: 100%;
max-height: 100%;
width:auto;
height:auto;
}
</code></pre>

<p>But the image is always stretched in container, I want it to be fixed in scale. and be in center of panel.</p>

<p>Is there any idea how to change the style?</p>

<blockquote>
<p>Maybe its not relevant, but I wrapped this gallery in a
bootstrap-modal.</p>
</blockquote>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
Ihsan Sadat
I
Top