@afeefa/vue-app 0.0.164 → 0.0.165

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.164
1
+ 0.0.165
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.164",
3
+ "version": "0.0.165",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -71,16 +71,22 @@ export default class FlyingContextContainer extends Vue {
71
71
  }
72
72
  }
73
73
 
74
- domChanged () {
74
+ domChanged ([...mutationRecords]) {
75
75
  const container = this.getChildrenContainer()
76
+
76
77
  this.visible = !!container.children.length
78
+ const isOpening = mutationRecords.length === 1 && mutationRecords[0].addedNodes.length === 1 // only 1 record ... and this one is 'added'
79
+ console.log(mutationRecords)
77
80
 
78
81
  const el = document.documentElement
79
82
 
80
- if (this.visible) {
83
+ if (isOpening) {
81
84
  const style = getComputedStyle(el)
82
85
  this.oldOverflowY = style.overflowY
83
86
  this.lastScrollbarWidth = this.getScrollbarWidth()
87
+ }
88
+
89
+ if (this.visible) {
84
90
  setTimeout(() => {
85
91
  el.style.overflowY = 'hidden'
86
92
  el.style.marginRight = this.lastScrollbarWidth + 'px'