Comments (14)
Same issue
from cytoscape.js-cxtmenu.
Is there a cytoscape.use(ext)
after import
?
from cytoscape.js-cxtmenu.
Hi maxkfranz,
yes, the code's structure is similar to the author's one with cytoscape.use(ext) in it.
in component side:
import * as cytoscape from 'cytoscape';
import * as cxtmenu from 'cytoscape-cxtmenu';
cytoscape.use(cxtmenu);
in typings.d.ts:
declare module 'cytoscape-cxtmenu';
in angular.json scripts are also included.
It does not see cy.ctxmenu();
Thank you for your help!
from cytoscape.js-cxtmenu.
If the TS import is the same as the ES import, then you need to use the default export rather than *.
from cytoscape.js-cxtmenu.
import cytoscape from 'cytoscape';
import cxtmenu from 'cytoscape-cxtmenu';
cytoscape.use( cxtmenu );
from cytoscape.js-cxtmenu.
I have same issue. I have error message in visual sutido code "Property 'cxtmenu' does not exist on type 'Core'". Is it possible use it in typescript? I try add to index.d.ts this:
declare module 'cytoscape-cxtmenu' {
const ext: cytoscape.Ext;
export = ext;
}
But still not working.
from cytoscape.js-cxtmenu.
Isn't it because it's cxtmenu
and not ctxmenu
?
from cytoscape.js-cxtmenu.
I managed to use cytoscape.js-context-menus extension (https://github.com/iVis-at-Bilkent/cytoscape.js-context-menus) on angular 7 project.
I added "node_modules/cytoscape-context-menus/cytoscape-context-menus.css" to styles of the project inside angular.json file and use it as mentioned in the readme of the extension
from cytoscape.js-cxtmenu.
This issue has been automatically marked as stale, because it has not had activity within the past 30 days. It will be closed if no further activity occurs within the next 30 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.
from cytoscape.js-cxtmenu.
I managed to use cytoscape.js-context-menus extension (https://github.com/iVis-at-Bilkent/cytoscape.js-context-menus) on angular 7 project.
I added "node_modules/cytoscape-context-menus/cytoscape-context-menus.css" to styles of the project inside angular.json file and use it as mentioned in the readme of the extension
I did the same but its still giving me error this.cy.contextMenu() is not a function in angular 7.
from cytoscape.js-cxtmenu.
I have same issue, when trying to integrate ctxmenu in my angular project.
So, the issue is closed, but I could not understand the solution.
Please help me !
from cytoscape.js-cxtmenu.
import cxtmenu from 'cytoscape-cxtmenu';
cytoscape.use(cxtmenu);
...
let cy = cytoscape({ opt });
cy.cxtmenu({ cxtOpt });
Can not register cxtmenu
for core
since cxtmenu
already exists in the prototype and can not be overridden
Alternative
let cy = cytoscape({ opt });
cy.cxtmenu({
selector: 'node, edge',
...
Uncaught (in promise) TypeError: cy.cxtmenu is not a function
I haven't had any luck.
I am using Svelte & Sapper. I have the graph working fine without cxtmenu, adding it in, it breaks. Any feedback would help!
from cytoscape.js-cxtmenu.
So, was anyone able to come up with a solution?
from cytoscape.js-cxtmenu.
Had the same issue. Solved it by calling cxtmenu not on the module but on the instance of cytoscape.
from cytoscape.js-cxtmenu.
Related Issues (20)
- Would it be possible to set the menuRadius based on the element size? HOT 3
- Ignored attempt to cancel a touchend event with cancelable=false HOT 2
- How to make rectangle Context menu?
- With a menu on a node, passed element is often a different empty node. HOT 4
- Displaying Menu commands based on condition HOT 4
- Support other events? HOT 1
- Context menu opens again when I click on it above a node HOT 1
- Icons not displayed for a split second when opening menu for first time HOT 2
- Contextmenu on Node/Edge and Core(Background) HOT 3
- Hover Event/Function menu items HOT 6
- CSS Variable support for fillColor and activeFillColor HOT 3
- Support for other cytoscape shapes HOT 3
- in headless testing: cy.elements().map( ele => ele.style('display')) returns object / array HOT 2
- event/function to get the position of the cxtmenu on the cytoscape graph? HOT 4
- ¿How to show menu only on node:parent ? HOT 1
- incompatible ie11 HOT 2
- Referencing to static image files HOT 1
- Why this menu is not centered on the node HOT 1
- Use application context inside commands HOT 1
- What could explain a misaligned overlay? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cytoscape.js-cxtmenu.