@afeefa/vue-app 0.0.161 → 0.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 0.0.161
1
+ 0.0.162
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.161",
3
+ "version": "0.0.162",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -60,7 +60,7 @@ export default class EditForm extends Vue {
60
60
  if (this.createModelToEdit) {
61
61
  this.modelToEdit = this.createModelToEdit(this.model)
62
62
  } else if (this.model) {
63
- this.modelToEdit = this.model.cloneForEdit()
63
+ this.modelToEdit = this.model.clone()
64
64
  }
65
65
  this.lastJson = this.json
66
66
 
@@ -99,6 +99,10 @@ export default class EditModal extends Vue {
99
99
  this.$emit('open')
100
100
  } else {
101
101
  this.$emit('close')
102
+
103
+ setTimeout(() => { // allow client to conditionally remove <edit-modal> using v-if not before inner dialog has been removed from dom
104
+ this.$emit('destroyed')
105
+ }, 100)
102
106
  }
103
107
  }
104
108
 
@@ -34,6 +34,7 @@ export default class FlyingContextContainer extends Vue {
34
34
  visible = false
35
35
  oldOverflowY = null
36
36
  isClosing = false
37
+ lastScrollbarWidth = 0
37
38
 
38
39
  mounted () {
39
40
  const mutationWatcher = new MutationObserver(this.domChanged)
@@ -63,9 +64,8 @@ export default class FlyingContextContainer extends Vue {
63
64
  sizeChanged () {
64
65
  if (this.visible && !this.isClosing) { // do not set size if it is already closing
65
66
  this.$nextTick(() => {
66
- const scrollbarWidth = this.getScrollbarWidth()
67
67
  const el = document.documentElement
68
- const newSize = el.offsetWidth - this.$el.offsetWidth + scrollbarWidth
68
+ const newSize = el.offsetWidth - this.$el.offsetWidth + this.lastScrollbarWidth
69
69
  this.$el.style.left = newSize + 'px'
70
70
  })
71
71
  }
@@ -80,13 +80,13 @@ export default class FlyingContextContainer extends Vue {
80
80
  if (this.visible) {
81
81
  const style = getComputedStyle(el)
82
82
  this.oldOverflowY = style.overflowY
83
- const scrollbarWidth = this.getScrollbarWidth()
83
+ this.lastScrollbarWidth = this.getScrollbarWidth()
84
84
  setTimeout(() => {
85
85
  el.style.overflowY = 'hidden'
86
- el.style.marginRight = scrollbarWidth + 'px'
86
+ el.style.marginRight = this.lastScrollbarWidth + 'px'
87
87
  }, 100)
88
88
 
89
- this.$el.style.left = (el.offsetWidth - this.$el.offsetWidth + scrollbarWidth) + 'px'
89
+ this.$el.style.left = (el.offsetWidth - this.$el.offsetWidth + this.lastScrollbarWidth) + 'px'
90
90
  } else {
91
91
  el.style.overflowY = this.oldOverflowY
92
92
  el.style.marginRight = 0