Topic: mdb-image-modal broke aspect ratio at full screen
knowlative pro asked 6 years ago
knowlative pro answered 6 years ago
Damian Gemza staff commented 6 years ago
Dear knowlative, Please head into src/app/typescripts/pro/lightbox/image-popup.ts and find HostListener('document:keyup'), and change it with code below: @HostListener('document:keyup', ['$event']) keyboardControl(event: KeyboardEvent | any) { if (event.target.lastElementChild.className === 'ng-gallery-content') { if (event.keyCode === 39) { this.nextImage(); } if (event.keyCode === 37) { this.prevImage(); } if (event.keyCode === 27) { this.closeGallery(); } } } This problem will be fixed in next release. Best Regards, Damianknowlative pro answered 6 years ago
Damian Gemza staff commented 6 years ago
Dear knowlative, It's caused by width: 100% in .ng-gallery-content img. Please add styles below to your global stylesheet and check results. For me it works like a charm. mdb-image-modal { .ng-overlay { .ng-gallery-content { > { img { width: unset !important; } } } } } Best Regards, DamianFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Damian Gemza staff commented 6 years ago
Dear knowlative, Could you provide me code of your modal and some images links? I want to test it on my machine. Best Regards, Damian