diff --git a/HISTORY.md b/HISTORY.md index a5442b69..5f54a773 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -18,6 +18,7 @@ http://visjs.org - Fixed #1324: Labels now scale again. - Fixed #1362: Layout of hierarchicaly systems no longer overlaps NODES. - Fixed #1414: Fixed color references for nodes and edges. +- Fixed #1408: Unclustering without release function respects fixed positions now. ### Timeline diff --git a/dist/vis.js b/dist/vis.js index be0ee14d..06e61121 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -35765,8 +35765,12 @@ return /******/ (function(modules) { // webpackBootstrap var containedNode = this.body.nodes[nodeId]; containedNode = containedNodes[nodeId]; // inherit position - containedNode.x = clusterNode.x; - containedNode.y = clusterNode.y; + if (containedNode.options.fixed.x === false) { + containedNode.x = clusterNode.x; + } + if (containedNode.options.fixed.y === false) { + containedNode.y = clusterNode.y; + } } } } diff --git a/lib/network/modules/Clustering.js b/lib/network/modules/Clustering.js index def96b52..e0379729 100644 --- a/lib/network/modules/Clustering.js +++ b/lib/network/modules/Clustering.js @@ -567,8 +567,8 @@ class ClusterEngine { let containedNode = this.body.nodes[nodeId]; containedNode = containedNodes[nodeId]; // inherit position - containedNode.x = clusterNode.x; - containedNode.y = clusterNode.y; + if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;} + if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;} } } } diff --git a/test/networkTest.html b/test/networkTest.html index c24aeb81..1d93d2ca 100644 --- a/test/networkTest.html +++ b/test/networkTest.html @@ -13,35 +13,1628 @@
- -