-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first prototype of cytoscape viewer
- Loading branch information
1 parent
c89ed99
commit f1c4d9b
Showing
11 changed files
with
4,502 additions
and
9,116 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// todo: enable editing | ||
// setCyHandle(cy); | ||
// // remove all listeners | ||
// cy.removeAllListeners(); | ||
// todo: enable edge drawing | ||
// // @ts-ignore | ||
// const eh = cy.edgehandles(); | ||
// eh.enable(); | ||
// const enableDrawingEdges = (event: KeyboardEvent) => { | ||
// console.log(event.shiftKey, event.code); | ||
// if (event.shiftKey && event.code === 'KeyD') { | ||
// const elem = cy.$('node:selected'); | ||
// console.log(elem); | ||
// eh.start(); | ||
// } | ||
// }; | ||
// removeEventListener('keypress', enableDrawingEdges); | ||
// addEventListener('keypress', enableDrawingEdges); | ||
// todo: enable nesting | ||
// const options = { | ||
// newParentNode: () => { | ||
// const parentColor = randomColor({ | ||
// luminosity: 'dark', | ||
// }); | ||
// const data = { | ||
// color: parentColor, | ||
// name: 'New Parent', | ||
// score: 0.5, | ||
// }; | ||
// return { data }; | ||
// }, | ||
// }; | ||
// // @ts-ignore | ||
// const cdnd = cy.compoundDragAndDrop(options); | ||
// cdnd.disable(); | ||
// cdnd.enable(); | ||
// todo: enable adding | ||
// cy.removeListener('dblclick'); | ||
// cy.on('dblclick', function (event) { | ||
// if (event.target === cy) { | ||
// cy.add({ | ||
// group: 'nodes', | ||
// data: { | ||
// id: randomColor(), | ||
// name: 'New Node', | ||
// score: 0.5, | ||
// }, | ||
// position: event.position, | ||
// }); | ||
// } | ||
// }); | ||
// todo: enable removing | ||
// cy.removeListener('cxttap'); | ||
// cy.on('cxttap', 'node', function (event) { | ||
// const ele = event.target; | ||
// if (ele !== cy) { | ||
// ele.remove(); | ||
// } | ||
// }); | ||
// cy.on('cxttap', 'edge', function (event) { | ||
// const ele = event.target; | ||
// if (ele !== cy) { | ||
// ele.remove(); | ||
// } | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
[ | ||
{ | ||
"data": { | ||
"id": "chrom_1", | ||
"name": "chrom_1", | ||
"score": 1, | ||
"color": "#8f9b0a" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_10", | ||
"name": "chrom_10", | ||
"score": 1, | ||
"color": "#021e66" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_11", | ||
"name": "chrom_11", | ||
"score": 1, | ||
"color": "#bc0ac9" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_12", | ||
"name": "chrom_12", | ||
"score": 1, | ||
"color": "#090468" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_13", | ||
"name": "chrom_13", | ||
"score": 1, | ||
"color": "#063963" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_14", | ||
"name": "chrom_14", | ||
"score": 1, | ||
"color": "#f2cb07" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_15", | ||
"name": "chrom_15", | ||
"score": 1, | ||
"color": "#0b918c" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_16", | ||
"name": "chrom_16", | ||
"score": 1, | ||
"color": "#6a9904" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_17", | ||
"name": "chrom_17", | ||
"score": 1, | ||
"color": "#4910a5" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_18", | ||
"name": "chrom_18", | ||
"score": 1, | ||
"color": "#e7ea12" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_19", | ||
"name": "chrom_19", | ||
"score": 1, | ||
"color": "#cc0aa5" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_2", | ||
"name": "chrom_2", | ||
"score": 1, | ||
"color": "#d60a7a" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_20", | ||
"name": "chrom_20", | ||
"score": 1, | ||
"color": "#43009b" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_21", | ||
"name": "chrom_21", | ||
"score": 1, | ||
"color": "#567200" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_22", | ||
"name": "chrom_22", | ||
"score": 1, | ||
"color": "#074270" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_3", | ||
"name": "chrom_3", | ||
"score": 1, | ||
"color": "#d60cb1" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_4", | ||
"name": "chrom_4", | ||
"score": 1, | ||
"color": "#064b7c" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_5", | ||
"name": "chrom_5", | ||
"score": 1, | ||
"color": "#267001" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_6", | ||
"name": "chrom_6", | ||
"score": 1, | ||
"color": "#00236b" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_7", | ||
"name": "chrom_7", | ||
"score": 1, | ||
"color": "#029121" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_8", | ||
"name": "chrom_8", | ||
"score": 1, | ||
"color": "#0a3972" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_9", | ||
"name": "chrom_9", | ||
"score": 1, | ||
"color": "#20037c" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_X", | ||
"name": "chrom_X", | ||
"score": 1, | ||
"color": "#0c9936" | ||
} | ||
}, | ||
{ | ||
"data": { | ||
"id": "chrom_unknown", | ||
"name": "chrom_unknown", | ||
"score": 1, | ||
"color": "#000b5e" | ||
} | ||
} | ||
] |
Oops, something went wrong.