Skip to content

Commit

Permalink
cleanup cytoscape dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Nov 10, 2023
1 parent d4ee533 commit 8263d69
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 28 deletions.
1 change: 0 additions & 1 deletion astro-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"cytoscape-euler": "^1.2.2",
"cytoscape-fcose": "^2.1.0",
"cytoscape-popper": "^2.0.0",
"cytoscape-rdf": "^0.0.11",
"cytoscape-spread": "^3.0.0",
"highlight.js": "^11.2.0",
"n3": "^1.16.3",
Expand Down
2 changes: 0 additions & 2 deletions astro-frontend/src/components/DisplayNanopub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ const DisplayNanopub = ({np, npDict, index, usersPubkeys, ...args}: any) => {
<CardContent style={{margin: '0px', padding: '0px'}}>
<Paper elevation={2} style={{height: '80vh', textAlign: 'left', padding: '8px 8px', margin: '8px 0px'}}>
<CytoscapeRdfGraph cytoscapeElems={state.npDict[np]['cytoscape']} />
{/* <cytoscape-rdf elements={state.npDict[np]['cytoscape']} /> */}
{/* <cytoscape-rdf url={np + ".trig"} /> */}
</Paper>
</CardContent>
</Collapse>
Expand Down
11 changes: 5 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@
"axios": "^1.3.4",
"axios-retry": "^3.4.0",
"cytoscape": "^3.23.0",
"cytoscape-cola": "^2.5.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-dagre": "^2.4.0",
"cytoscape-euler": "^1.2.2",
"cytoscape-fcose": "^2.1.0",
"cytoscape-popper": "^2.0.0",
"cytoscape-rdf": "git+https://github.com/vemonet/cytoscape-rdf.git",
"cytoscape-spread": "^3.0.0",
"expo": "^46.0.0",
"highlight.js": "^11.2.0",
"n3": "^1.16.3",
Expand Down Expand Up @@ -70,6 +64,11 @@
"@types/react-dom": "18.0.11",
"@types/react-simple-oauth2-login": "^0.5.0",
"babel-preset-expo": "^9.3.0",
"cytoscape-cola": "^2.5.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-dagre": "^2.4.0",
"cytoscape-euler": "^1.2.2",
"cytoscape-spread": "^3.0.0",
"eslint": "^8.34.0",
"eslint-config-next": "^13.2.1",
"next-pwa": "^5.6.0",
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/components/CytoscapeRdf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,6 @@ export function CytoscapeRdfGraph({
content: () => {
// Replace the start "graph-http" for graphs nodes URIs
const elementLabel = ele.id().startsWith('graph-http') ? ele.id().replace('graph-http', 'http') : ele.id()
// console.log(ele)
// let div = document.createElement('div')
// const staticElement = renderToStaticMarkup(
// const staticElement = renderToString(
// <Card className="paper">
// <Typography variant="body2">{displayLink(elementLabel)}</Typography>
// </Card>
// )
// div.innerHTML = `<div id="cytoPop">${staticElement}</div>`
// document.body.appendChild(div)
// ReactDOM.render(staticElement, document.getElementById('root'));
// return div
return <div id="cytoPop">
<Card className="paper">
<Typography variant="body2">{displayLink(elementLabel)}</Typography>
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/components/DisplayNanopub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import hljsDefineTurtle from '../utils/highlightjs-turtle'
hljs.registerLanguage('turtle', hljsDefineTurtle)

import {CytoscapeRdfGraph} from '../components/CytoscapeRdf'
// import "cytoscape-rdf";
// import 'cytoscape-rdf';
import '@nanopub/display'
// import 'my-element';

const DisplayNanopub = ({np, npDict, index, usersPubkeys, ...args}: any) => {
const theme = useTheme()
Expand Down Expand Up @@ -157,10 +154,6 @@ const DisplayNanopub = ({np, npDict, index, usersPubkeys, ...args}: any) => {
style={{height: '80vh', textAlign: 'left', padding: theme.spacing(1, 1), margin: theme.spacing(1, 0)}}
>
<CytoscapeRdfGraph cytoscapeElems={state.npDict[np]['cytoscape']} />
{/* <cytoscape-rdf
elements={state.npDict[np]['cytoscape']}
/> */}
{/* <cytoscape-rdf url={np + ".trig"} /> */}
</Paper>
</CardContent>
</Collapse>
Expand Down

0 comments on commit 8263d69

Please sign in to comment.