New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-lineage-dag

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lineage-dag - npm Package Compare versions

Comparing version 2.0.13 to 2.0.15

2

package.json
{
"name": "react-lineage-dag",
"version": "2.0.13",
"version": "2.0.15",
"description": "表格/字段血缘React组件",

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

@@ -22,2 +22,15 @@ import {Canvas, Layout} from 'butterfly-dag';

}
this.on('custom.edge.redraw', (data) => {
let node = data.node;
let points = data.points;
let edges = [];
if (points) {
points.forEach((_point) => {
edges = edges.concat(this.getNeighborEdgesByEndpoint(node.id, _point.id));
});
} else {
edges = this.getNeighborEdges(node.id);
}
edges.forEach((edge) => edge.redraw());
});
}

@@ -106,3 +119,2 @@ focus(nodeId) {

_precollide = (nodes, nodestep, rankstep) => {
const rank = {};

@@ -174,6 +186,8 @@ let rankKeys = [];

let nextLeft = _.get(rank, [nextKey, 0, 'left'], nextKey);
if (maxRank[currentKey] - nextLeft > rankstep) {
rank[nextKey].forEach((item) => {
item.left = maxRank[currentKey];
if (nextLeft - maxRank[currentKey] < rankstep) {
rank[nextKey].forEach(function (item) {
item.left = maxRank[currentKey] + rankstep;
});
let _tmpGap = maxRank[currentKey] + rankstep - nextLeft;
maxRank[nextKey] += _tmpGap;
}

@@ -180,0 +194,0 @@ }

@@ -27,2 +27,3 @@ import {Node} from 'butterfly-dag';

this.height = this.options.height = $(this.dom).height();
}

@@ -139,3 +140,24 @@ draw(obj) {

titleDom = $(`<div class="title"></div>`);
ReactDOM.render(titleRender(title, this), titleDom[0]);
ReactDOM.render(titleRender(title, this), titleDom[0], () => {
if (this.height === 0 || this.width === 0) {
this.width = this.options.width = $(this.dom).width();
this.height = this.options.height = $(this.dom).height();
this.endpoints.forEach((item) => item.updatePos());
this.emit('custom.edge.redraw', {
node: this
})
} else {
let points = [];
this.endpoints.forEach((item) => {
if (item.options._isNodeSelf) {
item.updatePos();
points.push(item);
}
});
this.emit('custom.edge.redraw', {
node: this,
points
})
}
});
} else if (title) {

@@ -142,0 +164,0 @@ titleDom = $(`<div class="title">${title}</div>`);

Sorry, the diff of this file is too big to display

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