@afeefa/vue-app 0.0.194 → 0.0.195
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.195
|
package/package.json
CHANGED
@@ -78,10 +78,14 @@ export default class FlyingContext extends Mixins(CancelOnEscMixin) {
|
|
78
78
|
}
|
79
79
|
}
|
80
80
|
|
81
|
-
this.$
|
82
|
-
|
83
|
-
|
84
|
-
|
81
|
+
this.$events.dispatch(new FlyingContextEvent(FlyingContextEvent.START_HIDE_CONTEXT))
|
82
|
+
|
83
|
+
setTimeout(() => { // fade in then hide contents
|
84
|
+
this.$el.appendChild(this.getContent())
|
85
|
+
this.coe_unwatchCancel() // hide context -> do not watch esc any more
|
86
|
+
this.isVisible = false
|
87
|
+
this.$emit('hide')
|
88
|
+
}, 200)
|
85
89
|
}
|
86
90
|
}
|
87
91
|
|
@@ -44,6 +44,8 @@ export default class FlyingContextContainer extends Vue {
|
|
44
44
|
|
45
45
|
const sizeWatcher = new ResizeObserver(this.sizeChanged)
|
46
46
|
sizeWatcher.observe(this.getChildrenContainer())
|
47
|
+
|
48
|
+
this.$events.on(FlyingContextEvent.START_HIDE_CONTEXT, this.onStartHideContext)
|
47
49
|
}
|
48
50
|
|
49
51
|
/**
|
@@ -115,18 +117,25 @@ export default class FlyingContextContainer extends Vue {
|
|
115
117
|
el.style.overflowY = this.oldOverflowY
|
116
118
|
el.style.marginRight = 0
|
117
119
|
|
118
|
-
this.$el.style.left = '101vw' // set this if closing from outside e.g. via esc, which does not call this.hide()
|
120
|
+
this.$el.style.left = '101vw' // set this if closing from outside e.g. via context.esc, which does not call this.hide()
|
119
121
|
}
|
122
|
+
|
120
123
|
this.isClosing = false
|
121
124
|
}
|
122
125
|
|
126
|
+
onStartHideContext () {
|
127
|
+
// context will be removed in 200ms
|
128
|
+
// we start right now and slide out the container
|
129
|
+
// so that all the contents will last until moved out of screen
|
130
|
+
this.$el.style.left = '101vw'
|
131
|
+
}
|
132
|
+
|
123
133
|
hide () {
|
124
134
|
if (this.visible) {
|
125
|
-
|
135
|
+
// ignore resize watcher while closing, prevents flickering
|
126
136
|
this.isClosing = true
|
127
|
-
|
128
|
-
|
129
|
-
}, 200)
|
137
|
+
// say the context that it should try to remove
|
138
|
+
this.$events.dispatch(new FlyingContextEvent(FlyingContextEvent.HIDE_ALL))
|
130
139
|
}
|
131
140
|
}
|
132
141
|
|