small change test

This commit is contained in:
Klemek
2019-07-12 09:15:05 +02:00
parent 059df2b26b
commit 2c23e4227e
+3
View File
@@ -18,6 +18,7 @@ const newmap = (w, h, fill) => new Array(w).fill(0).map(() => new Array(h).fill(
module.exports = (options) => { module.exports = (options) => {
const self = { const self = {
/** /**
* Get the current bounds of the graph of nodes * Get the current bounds of the graph of nodes
* @param {Object<string,Node1>} nodes * @param {Object<string,Node1>} nodes
@@ -39,6 +40,7 @@ module.exports = (options) => {
}); });
return {x: minX, y: minY, w: maxX - minX + 1, h: maxY - minY + 1}; return {x: minX, y: minY, w: maxX - minX + 1, h: maxY - minY + 1};
}, },
/** /**
* Get a new available position around the existing nodes * Get a new available position around the existing nodes
* @param {Object<string,Node1>} nodes * @param {Object<string,Node1>} nodes
@@ -62,6 +64,7 @@ module.exports = (options) => {
else else
return {x: b.x, y: b.y + b.h}; //expand vertically return {x: b.x, y: b.y + b.h}; //expand vertically
}, },
/** /**
* Check if no other nodes are located in the path of n1 <-> n2 * Check if no other nodes are located in the path of n1 <-> n2
* @param {Object<string,Node1>} nodes * @param {Object<string,Node1>} nodes