Socket
Socket
Sign inDemoInstall

cytoscape-dom-node

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape-dom-node - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "cytoscape-dom-node",
"version": "1.0.0",
"version": "1.1.0",
"description": "Cytoscape extension for making nodes into DOM elements",

@@ -5,0 +5,0 @@ "keywords": [

@@ -61,1 +61,11 @@ # cytoscape-dom-node

example.
## Options
One option is supported, `dom_container` allows an container element to be specified which
will be used for nodes instead of the element it would otherwise create and use. It is the
callers responsibility to style the given element appropriately, for example:
```js
cy.domNode({'dom_container': some_element});
```

@@ -9,10 +9,14 @@ class CytoscapeDomNode {

let nodes_dom_container = document.createElement("div");
nodes_dom_container.style.position = 'absolute';
nodes_dom_container.style.zIndex = 10;
if (params.dom_container) {
this._nodes_dom_container = params.dom_container;
} else {
let nodes_dom_container = document.createElement("div");
nodes_dom_container.style.position = 'absolute';
nodes_dom_container.style.zIndex = 10;
let cy_canvas = cy_container.querySelector("canvas");
cy_canvas.parentNode.appendChild(nodes_dom_container);
let cy_canvas = cy_container.querySelector("canvas");
cy_canvas.parentNode.appendChild(nodes_dom_container);
this._nodes_dom_container = nodes_dom_container;
this._nodes_dom_container = nodes_dom_container;
}

@@ -19,0 +23,0 @@ this._resize_observer = new ResizeObserver((entries) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc