nodelayout
Advanced tools
Comparing version 1.1.6 to 1.1.7
{ | ||
"name": "nodelayout", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "For node Layout.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -24,2 +24,3 @@ import * as d3 from "d3"; | ||
let zoomY = 0; | ||
let zoomK = 0; | ||
// onNodeClick | ||
@@ -153,5 +154,7 @@ let onNodeClick; | ||
d.y2 = event.sourceEvent.layerY - zoomY; | ||
const k = zoomK === 0 ? 1 : zoomK; | ||
d3.select(".connect-line") | ||
.attr("class", "connect-line show") | ||
.attr("d", `M${d.x1},${d.y1} ${d.x2},${d.y2}`); | ||
.attr("d", `M${d.x1/k},${d.y1/k} ${d.x2/k},${d.y2/k}`); | ||
// M${d.x1},${d.y1} C${d.x2},${d.y1} ${d.x1},${d.y2} ${d.x2},${d.y2}`) | ||
} | ||
@@ -258,2 +261,3 @@ function smallCircleDragend (event, d) { | ||
zoomY = d.transform.y; | ||
zoomK = d.transform.k; | ||
svgWrap.attr("transform", d.transform); | ||
@@ -260,0 +264,0 @@ } |
@@ -5,2 +5,3 @@ /* mode: development or production*/ | ||
module.exports = { | ||
// devtool: 'source-map', | ||
entry: './src/index.js', | ||
@@ -35,3 +36,4 @@ mode: 'development', | ||
}, | ||
open: true, | ||
// hot: true, | ||
// open: true, | ||
compress: true, | ||
@@ -38,0 +40,0 @@ port: 9000, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1594172
8791