Skip to content

Commit

Permalink
Merge pull request #23 from sgratzl/release/v2.4.1
Browse files Browse the repository at this point in the history
Release v2.4.1
  • Loading branch information
sgratzl authored Aug 10, 2023
2 parents 96c31d6 + a8080ff commit 59338d0
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
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.0",
"version": "2.4.1",
"author": {
"name": "Samuel Gratzl",
"email": "[email protected]",
Expand Down
77 changes: 77 additions & 0 deletions samples/overlays.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html>
<head>
<title>Sample</title>
<style>
body {
margin: 0;
}
#app {
width: 100vw;
height: 100vh;
display: block;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/cytoscape"></script>
<script src="../build/index.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cytoscape-overlays@^1.3.0"></script>
<script>
const cy = cytoscape({
container: document.getElementById('app'),
elements: [
...['a', 'b'].map((id) => ({
data: {
id,
value: Math.random(),
values: Array(100)
.fill(0)
.map(() => Math.random()),
line: Array(10)
.fill(0)
.map(() => Math.random()),
},
})),
{
data: {
id: 'ab',
source: 'a',
target: 'b',
},
},
],
});
cy.overlays(
[
{
position: 'top',
vis: CytoscapeOverlays.renderBar('value', {
backgroundColor: 'steelblue',
}),
},
{
vis: CytoscapeOverlays.renderBoxplot('values', {
backgroundColor: 'darkred',
}),
},
{
vis: CytoscapeOverlays.renderHistogram('values', {
backgroundColor: 'darkgreen',
}),
},
{
vis: CytoscapeOverlays.renderSparkLine('line', {
backgroundColor: 'darkgreen',
}),
},
],
{
updateOn: 'render',
backgroundColor: 'white',
}
);
</script>
</body>
</html>
3 changes: 2 additions & 1 deletion src/elements/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export function renderPerNode(

if (o.updateOn === 'render') {
layer.updateOnRender = true;
} else {
}
if (!o.queryEachTime) {
nodes = reevaluateCollection(nodes);
layer.cy.on('add remove', o.selector, revaluateAndUpdateOnce);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7258,11 +7258,11 @@ __metadata:
linkType: hard

"semver@npm:^6.0.0, semver@npm:^6.3.0":
version: 6.3.0
resolution: "semver@npm:6.3.0"
version: 6.3.1
resolution: "semver@npm:6.3.1"
bin:
semver: ./bin/semver.js
checksum: 1b26ecf6db9e8292dd90df4e781d91875c0dcc1b1909e70f5d12959a23c7eebb8f01ea581c00783bbee72ceeaad9505797c381756326073850dc36ed284b21b9
semver: bin/semver.js
checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2
languageName: node
linkType: hard

Expand Down

0 comments on commit 59338d0

Please sign in to comment.