Skip to content

Commit

Permalink
feat: Extra margin to remove when CMS portlets are not displayed - ME…
Browse files Browse the repository at this point in the history
…ED-2953-Meeds-io/MIPs#103 (#852)

Prior to this change, When we toggle between show/hide of the preview mode in the public page, an extra margin in displayed when the app is hidden.
This change allows to remove extra margin when app is hidden.

(cherry picked from commit 74cb82e)
  • Loading branch information
SaraBoutej authored and rdenarie committed Nov 22, 2023
1 parent 1211e27 commit af428a6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ export default {
window.editNoteInProgress = false;
}
},
canView() {
if (this.canView) {
this.$el.parentElement.closest('.PORTLET-FRAGMENT').classList.remove('hidden');
} else {
this.$el.parentElement.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
}
},
created() {
document.addEventListener('cms-preview-mode', this.switchToPreview);
Expand Down

0 comments on commit af428a6

Please sign in to comment.