adding show and hide events to listen on for menububble
This commit is contained in:
@@ -28,6 +28,12 @@ export default {
|
|||||||
editor.registerPlugin(MenuBubble({
|
editor.registerPlugin(MenuBubble({
|
||||||
element: this.$el,
|
element: this.$el,
|
||||||
onUpdate: menu => {
|
onUpdate: menu => {
|
||||||
|
// the second check ensures event is fired only once
|
||||||
|
if (menu.isActive && this.menu.isActive === false) {
|
||||||
|
this.$emit('show', menu)
|
||||||
|
} else if (!menu.isActive && this.menu.isActive === true) {
|
||||||
|
this.$emit('hide', menu)
|
||||||
|
}
|
||||||
this.menu = menu
|
this.menu = menu
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user