mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
fix(hierarchy tree): disable top node interactions
This commit is contained in:
parent
2129fc67f5
commit
af6bf174ca
1 changed files with 3 additions and 0 deletions
|
|
@ -343,6 +343,7 @@ function updateTree() {
|
|||
|
||||
function selectElement(d) {
|
||||
const dataElement = d.data;
|
||||
if (d.id == 0) return;
|
||||
|
||||
const node = nodes.select(`g[data-id="${d.id}"]`);
|
||||
nodes.selectAll("g").style("outline", "none");
|
||||
|
|
@ -476,6 +477,8 @@ function handleNodeExit(d) {
|
|||
}
|
||||
|
||||
function dragToReorigin(from) {
|
||||
if (from.id == 0) return;
|
||||
|
||||
dragLine.attr("d", `M${from.x},${from.y}L${from.x},${from.y}`);
|
||||
|
||||
d3.event.on("drag", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue