preview resize fix

This commit is contained in:
yuri
2018-08-02 12:28:14 +03:00
parent f77a7c32d5
commit b14b199d43
+6 -1
View File
@@ -55,6 +55,10 @@ Espo.define('views/modals/image-preview', 'views/modal', function (Dep) {
this.navigationEnabled = (this.options.imageList && this.options.imageList.length > 1);
this.imageList = this.options.imageList || [];
this.once('remove', function () {
$(window).off('resize.image-review');
}, this);
},
getImageUrl: function () {
@@ -90,7 +94,8 @@ Espo.define('views/modals/image-preview', 'views/modal', function (Dep) {
$img.css('maxWidth', width);
}.bind(this);
$(window).on('resize', function () {
$(window).off('resize.image-review');
$(window).on('resize.image-review', function () {
manageSize();
});