rendering part

This commit is contained in:
Klemek
2019-07-12 10:28:53 +02:00
parent 04d92981a9
commit 2328f97133
4 changed files with 89 additions and 15 deletions
+8 -1
View File
@@ -16,8 +16,15 @@ const newmap = (w, h, fill) => new Array(w).fill(0).map(() => new Array(h).fill(
* @property {string|undefined} direction
*/
module.exports = (options) => {
const DEFAULT_OPTIONS = {
'max-link-length': 2,
'diagonals': true,
};
module.exports = (options = DEFAULT_OPTIONS) => {
const self = {
defaultOptions: DEFAULT_OPTIONS,
/**
* Get the current bounds of the graph of nodes