Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodelayout

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodelayout - npm Package Compare versions

Comparing version 1.1.0 to 1.1.5

src/optionList.js

2

package.json
{
"name": "nodelayout",
"version": "1.1.0",
"version": "1.1.5",
"description": "For node Layout.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -17,2 +17,7 @@ # nodeLayout

## Demo
```bash
yarn start
```
### Init

@@ -19,0 +24,0 @@ ```js

import * as d3 from "d3";
import uuid from "./utils/uuid";
import deepProxy from "./utils/deepProxy";
import renderOptionList from "./optionList";
import { defaultIcon, deletIcon } from "./utils/icon";

@@ -135,10 +136,10 @@ import "./less/index.less";

function smallCircleDragstart (event, d) {
d.dx = event.sourceEvent.x;
d.dy = event.sourceEvent.y;
d.dx = event.sourceEvent.layerX;
d.dy = event.sourceEvent.layerY;
}
function smallCircleDraging (event, d) {
d.x1 = d.dx - smallCirceRadius * 2 - zoomX;
d.y1 = d.dy - smallCirceRadius * 2 - zoomY;
d.x2 = event.sourceEvent.x - smallCirceRadius * 2 - zoomX;
d.y2 = event.sourceEvent.y - smallCirceRadius * 2 - zoomY;
d.x1 = d.dx - zoomX;
d.y1 = d.dy - zoomY;
d.x2 = event.sourceEvent.layerX - zoomX;
d.y2 = event.sourceEvent.layerY - zoomY;
d3.select(".connect-line")

@@ -217,2 +218,7 @@ .attr("class", "connect-line show")

const wrap = d3.select(`#${params.id}`).attr("height", svgHeight);
renderOptionList({
wrap,
add,
option: params.option
});
const svg = wrap.append("svg");

@@ -324,7 +330,7 @@ // fill pattern

id: uuid(16, 62),
text: params + (nodeData.data.length + 1),
x: svgWidth/10 + nodeData.data.length * 200,
y: svgHeight/2
text: params.text || params + (nodeData.data.length + 1),
x: params.x || svgWidth/10 + nodeData.data.length * 200,
y: params.y || svgHeight/2
});
}
export { init, add };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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