Commit 67783eab authored by LianaHus's avatar LianaHus Committed by Liana Husikyan

added context to menuicons

parent acb9e589
......@@ -4,9 +4,10 @@ var yo = require('yo-yo')
var csjs = require('csjs-inject')
var helper = require('../../lib/helper')
const globalRegistry = require('../../global/registry')
const contextMenu = require('../ui/contextMenu')
const { Plugin } = require('@remixproject/engine')
const EventEmitter = require('events')
let VERTICALMENU_HANDLE
const profile = {
name: 'menuicons',
......@@ -72,6 +73,7 @@ export class VerticalIcons extends Plugin {
onclick="${() => { this.toggle(name) }}"
plugin="${name}"
title="${title}"
oncontextmenu="${(e) => this.itemContextMenu(e, name)}"
data-id="verticalIconsKind${name}">
<img class="image" src="${icon}" alt="${name}" />
</div>`
......@@ -221,6 +223,15 @@ export class VerticalIcons extends Plugin {
}
}
itemContextMenu (e, name) {
console.log(name)
VERTICALMENU_HANDLE && VERTICALMENU_HANDLE.hide(null, true)
const actions = {}
actions['Deactivate'] = () => { this.call('manager', 'deactivatePlugin', name) }
VERTICALMENU_HANDLE = contextMenu(e, actions)
e.preventDefault()
}
render () {
const home = yo`
<div
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment