首页 > 解决方案 > 使用 angular-modal-service 在 Firefox 中以全屏模式破坏图像

问题描述

当我单击full screen按钮以在 Firefox 中以全屏模式查看图像时,未显示完整图像。仅显示图像的一部分。这在 Chrome 浏览器中运行良好。请找到以下代码和屏幕截图以获取损坏的图像和实际图像。

public initFullscreenModal = ():ng.IPromise<any> => this.ModalService
            .showModal({
                component: 'modalImageFullscreen',
                bodyClass: 'angular-modal-service-active',
                bindings: {
                    image: this.image
                },
                // This method is invoked when `ModalService.closeModals()` is called from within ModalService
                preClose: (modal: IDavis.Modal, result: any) => {
                    // We need this in order to properly close the Bootstrap modal via `.modal('hide')`
                    modal.element.modal('hide');
                }
            })
            .then( (modal: IDavis.Modal): void => {
                // required for Bootstrap Modal
                modal.element.modal('show');
            })
            .catch( (error: any) => {
               console.error('imageController.initModal().ModalService.showModal().ERROR', error);
            });

参考库:https ://github.com/dwmkerr/angular-modal-service#showmodal-options

破碎的图像

实际图像

标签: javascripthtmlcssangularjs

解决方案


推荐阅读