fix: drag nodes (#211)

This commit is contained in:
Fine0830 2022-12-20 16:52:14 +08:00 committed by GitHub
parent 210b9ba491
commit 7768f6ef16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,7 +324,9 @@ limitations under the License. -->
const drag: any = d3.drag().on("drag", (d: ProcessNode) => { const drag: any = d3.drag().on("drag", (d: ProcessNode) => {
moveNode(d); moveNode(d);
}); });
setTimeout(() => {
d3.selectAll(".node").call(drag); d3.selectAll(".node").call(drag);
}, 1000);
} }
function shuffleArray(array: number[][]) { function shuffleArray(array: number[][]) {