rcarcasses / vue-cytoscape

cytoscape.js now inside vue.js
https://rcarcasses.github.io/vue-cytoscape
MIT License
96 stars 34 forks source link

Can not register `contextMenus`. Already exists in the prototype. #43

Closed v1talii-dev closed 5 years ago

v1talii-dev commented 5 years ago

The cytoscape is registered globally in main.ts.

import VueCytoscape from 'vue-cytoscape';
Vue.use(VueCytoscape);

There is a page on which, depending on the context, a corresponding diagram is displayed. In the page component, the plugin for the cytoscape is registered "cytoscape.js-context-menus":

methods: {
     preConfig (cy) {
       cy.use (contextMenus, jquery);
     },
}

After several transitions through the pages (many instances of the component are created), an error is observed:

Error: Can not register `contextMenus` for `core` since `contextMenus` already exists in the prototype and can not be overridden

How to fix the error?

v1talii-dev commented 5 years ago

Find solution in #16