themyth92 / ngx-lightbox

Lightbox2 use with angular >= 5
MIT License
115 stars 70 forks source link

Over-riding Lightbox options in one component, over-rides them in all components. #121

Open Asimov500 opened 2 years ago

Asimov500 commented 2 years ago

I have one component where I am over-riding the lightbox, but it seems to add the same options where I am not over-riding the components. What if I want different options on different components?

constructor(private adminService: AdminService,
          private generalService: GeneralService,
          private _lightbox: Lightbox,
          private _lightboxConfig: LightboxConfig) {
    _lightboxConfig.disableScrolling=true;
    _lightboxConfig.fitImageInViewPort=true;
    _lightboxConfig.centerVertically=true;
    _lightboxConfig.showImageNumberLabel=true;
}