-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from sgratzl/release/v2.4.2
Release v2.4.2
- Loading branch information
Showing
12 changed files
with
131 additions
and
68 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "cytoscape-layers", | ||
"description": "Cytoscape.js plugin for rendering layers in SVG, DOM, or Canvas", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"author": { | ||
"name": "Samuel Gratzl", | ||
"email": "[email protected]", | ||
|
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
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
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,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Sample</title> | ||
<style> | ||
#app { | ||
width: 600px; | ||
height: 400px; | ||
display: block; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<button id="png">PNG</button> | ||
<a id="url" download="file.png"></a> | ||
<div id="app"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/cytoscape"></script> | ||
<script src="../build/index.umd.js"></script> | ||
<script src="edge.js"></script> | ||
</body> | ||
</html> |
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,45 @@ | ||
/* eslint-disable @typescript-eslint/no-namespace */ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
namespace AnimatedEdges { | ||
declare const cytoscape: typeof import('cytoscape'); | ||
declare const CytoscapeLayers: typeof import('../build'); | ||
|
||
const cy = cytoscape({ | ||
container: document.getElementById('app'), | ||
elements: fetch('./grid-data.json').then((r) => r.json()), | ||
// elements: Promise.resolve([ | ||
// { data: { id: 'a' } }, | ||
// { data: { id: 'b' } }, | ||
// { | ||
// data: { | ||
// id: 'ab', | ||
// source: 'a', | ||
// target: 'b', | ||
// }, | ||
// }, | ||
// ]), | ||
layout: { | ||
name: 'grid', | ||
}, | ||
style: [ | ||
{ | ||
selector: 'edge', | ||
style: { | ||
'line-color': 'white', | ||
opacity: 0.01, | ||
}, | ||
}, | ||
], | ||
}); | ||
|
||
const layers = CytoscapeLayers.layers(cy); | ||
|
||
const layer = layers.nodeLayer.insertBefore('canvas'); | ||
|
||
layers.renderPerEdge(layer, (ctx, _, path) => { | ||
ctx.strokeStyle = 'red'; | ||
ctx.lineWidth = 5; | ||
ctx.lineCap = 'round'; | ||
ctx.stroke(path); | ||
}); | ||
} |
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
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
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
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
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
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
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