intbot / ng2-pdfjs-viewer

An angular component for PDFJS and ViewerJS (Supports all versions of angular)
Apache License 2.0
228 stars 113 forks source link

Doesn't hide scaleSelectContainer on mobile when use 2 ng2-pdfjs-viewer on 1 page #191

Closed HoaBanMC closed 1 year ago

HoaBanMC commented 2 years ago

I have this issues on mobile when use 2 div show/hide 2 components ng2-pdfjs-viewer on page:

image image

<div>
  <button (click)="changeTab(1)">
    tab1
  </button>
  <button (click)="changeTab(2)">
    tab2
  </button>
</div>
<div class="contain">
  {{currentLink}}
  <div class="tab1" [class.show-tab]="currentTab === 1">
    <ng2-pdfjs-viewer [pdfSrc]="src1"></ng2-pdfjs-viewer>
  </div>
  <div class="tab2 " [class.show-tab]="currentTab === 2">
    <ng2-pdfjs-viewer [pdfSrc]="src2"></ng2-pdfjs-viewer>
  </div>
</div>

viewer.css on second div doesn't work image

Please help, Thanks!

codehippie1 commented 1 year ago

What is the issue? What are the steps to reproduce it? I am unclear on this.

HoaBanMC commented 1 year ago

Hi codehippie1, thanks for reply. This error occurs on mobile and I forked my own then fixed this error by adding '!important' after that line. I will close this issuses now.