You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
1.1 KiB

function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
var TreeLayout = require('./layout/base');
var mindmap = require('./layout/mindmap');
var doTreeLayout = require('./layout/do-layout');
var util = require('./util');
var MindmapLayout = /*#__PURE__*/function (_TreeLayout) {
function MindmapLayout() {
return _TreeLayout.apply(this, arguments) || this;
}
_inheritsLoose(MindmapLayout, _TreeLayout);
var _proto = MindmapLayout.prototype;
_proto.execute = function execute() {
var me = this;
return doTreeLayout(me.rootNode, me.options, mindmap);
};
return MindmapLayout;
}(TreeLayout);
var DEFAULT_OPTIONS = {};
function mindmapLayout(root, options) {
options = util.assign({}, DEFAULT_OPTIONS, options);
return new MindmapLayout(root, options).execute();
}
module.exports = mindmapLayout;