Skip to content

Commit

Permalink
PB-985: Keep the same behaviour if the modal is not movable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Sep 30, 2024
1 parent 4d138e7 commit 6f2f42a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/utils/components/ModalWithBackdrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default {
dragStartY: 0,
modalLeft: 0,
modalTop: 0,
modalClass: '',
}
},
computed: {
Expand All @@ -152,12 +153,16 @@ export default {
},
},
mounted() {
if (this.top) {
this.modalClass = 'on-top-with-padding'
this.modalClass = {
'start-50': true,
'top-50 translate-middle': !this.top,
'translate-middle-x on-top-with-padding': this.top,
}
if (this.movable) {
this.$nextTick(() => {
this.setInitialPosition()
})
}
this.$nextTick(() => {
this.setInitialPosition()
})
},
methods: {
onClose(withConfirmation) {
Expand Down

0 comments on commit 6f2f42a

Please sign in to comment.