in web/js/input.js [152:183]
await viewEdge(graph, edge)
edge.selected = true
selectedEdgeId = edge.id
break
}
}
for (const edge of graph.data.edges) {
if (edge.id !== selectedEdgeId) edge.selected = false
}
render(graph, false)
}
/**
* Handle mouse down events.
*
* Drag nodes to new locations.
*
* @param {*} graph
* @param {*} poz
*/
function down(graph, poz) {
// console.info("down", poz)
if (!isGraphValid(graph)) return
// On mouse down, if we are on a node, mark it as down.
// We will check this in move() to see if it's being dragged.
let downNodeId
for (const node of graph.data.nodes) {
if (webUtil.hitTest(graph, node.x, node.y, graph.NODE_RADIUS, poz.x, poz.y)) {