pull/4987/head
mertsincan 2023-12-20 11:51:10 +00:00
commit 3c671f9e5d
2 changed files with 6 additions and 6 deletions

View File

@ -104,13 +104,9 @@ export default {
this.previewClick = true; this.previewClick = true;
}, },
onMaskClick(event) { onMaskClick(event) {
const isActionbarTarget = [event.target.classList].includes('p-image-action') || event.target.closest('.p-image-action'); const isBarActionsClicked = DomHandler.isAttributeEquals(event.target, 'data-pc-section-group', 'action') || event.target.closest('[data-pc-section-group="action"]');
if (isActionbarTarget) { if (!this.previewClick && !isBarActionsClicked) {
return;
}
if (!this.previewClick) {
this.previewVisible = false; this.previewVisible = false;
this.rotate = 0; this.rotate = 0;
this.scale = 1; this.scale = 1;

View File

@ -51,6 +51,10 @@ const css = `
align-items: center; align-items: center;
} }
.p-image-action.p-disabled {
pointer-events: auto;
}
.p-image-preview { .p-image-preview {
transition: transform 0.15s; transition: transform 0.15s;
max-width: 100vw; max-width: 100vw;