From 5b7a90f4dce39f732d8f0b07763e82babe6cca67 Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Wed, 6 May 2015 15:20:41 +0200 Subject: [PATCH] added multiselect, reworked options --- dist/vis.css | 4 +- dist/vis.js | 3086 +++++++++--------- dist/vis.min.css | 2 +- examples/network/17_network_info.html | 10 +- lib/network/Network.js | 79 +- lib/network/modules/Canvas.js | 4 +- lib/network/modules/CanvasRenderer.js | 16 +- lib/network/modules/ConfigurationSystem.js | 18 +- lib/network/modules/InteractionHandler.js | 17 +- lib/network/modules/ManipulationSystem.js | 10 +- lib/network/modules/SelectionHandler.js | 14 +- lib/network/modules/components/AllOptions.js | 78 +- lib/network/modules/components/Node.js | 14 + 13 files changed, 1660 insertions(+), 1692 deletions(-) diff --git a/dist/vis.css b/dist/vis.css index b138c248..42b7fdc7 100644 --- a/dist/vis.css +++ b/dist/vis.css @@ -222,7 +222,7 @@ box-sizing: border-box; } -.vis-item.background { +.vis-item.vis-background { border: none; background-color: rgba(213, 221, 246, 0.4); box-sizing: border-box; @@ -244,7 +244,7 @@ display: inline-block; } -.vis-item.background .vis-item-content { +.vis-item.vis-background .vis-item-content { position: absolute; display: inline-block; } diff --git a/dist/vis.js b/dist/vis.js index e37e1780..82148c01 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -5,7 +5,7 @@ * A dynamic, browser-based visualization library. * * @version 4.0.0-SNAPSHOT - * @date 2015-05-01 + * @date 2015-05-06 * * @license * Copyright (C) 2011-2014 Almende B.V, http://almende.com @@ -232,15 +232,6 @@ return /******/ (function(modules) { // webpackBootstrap return false; }; - /** - * Test whether given object is an instance of google.visualization.DataTable - * @param {*} object - * @return {Boolean} isDataTable - */ - exports.isDataTable = function (object) { - return typeof google !== 'undefined' && google.visualization && google.visualization.DataTable && object instanceof google.visualization.DataTable; - }; - /** * Create a semi UUID * source: http://stackoverflow.com/a/105074/1262753 @@ -1426,23 +1417,6 @@ return /******/ (function(modules) { // webpackBootstrap return -1; }; - /** - * Quadratic ease-in-out - * http://gizma.com/easing/ - * @param {number} t Current time - * @param {number} start Start value - * @param {number} end End value - * @param {number} duration Duration - * @returns {number} Value corresponding with current time - */ - exports.easeInOutQuad = function (t, start, end, duration) { - var change = end - start; - t /= duration / 2; - if (t < 1) return change / 2 * t * t + start; - t--; - return -change / 2 * (t * (t - 2) - 1) + start; - }; - /* * Easing Functions - inspired from http://gizma.com/easing/ * only considering the t value for the range [0, 1] => [0, 1] @@ -1739,7 +1713,7 @@ return /******/ (function(modules) { // webpackBootstrap * - gives triggers upon changes in the data * - can import/export data in various data formats * - * @param {Array | DataTable} [data] Optional array with initial data + * @param {Array} [data] Optional array with initial data * @param {Object} [options] Available options: * {String} fieldId Field name of the id in the * items, 'id' by default. @@ -1756,7 +1730,7 @@ return /******/ (function(modules) { // webpackBootstrap // TODO: add a DataSet constructor DataSet(data, options) function DataSet(data, options) { // correctly read optional arguments - if (data && !Array.isArray(data) && !util.isDataTable(data)) { + if (data && !Array.isArray(data)) { options = data; data = null; } @@ -1901,7 +1875,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Add data. * Adding an item will fail when there already is an item with the same id. - * @param {Object | Array | DataTable} data + * @param {Object | Array} data * @param {String} [senderId] Optional sender id * @return {Array} addedIds Array with the ids of the added items */ @@ -1916,19 +1890,6 @@ return /******/ (function(modules) { // webpackBootstrap id = me._addItem(data[i]); addedIds.push(id); } - } else if (util.isDataTable(data)) { - // Google DataTable - var columns = this._getColumnNames(data); - for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) { - var item = {}; - for (var col = 0, cols = columns.length; col < cols; col++) { - var field = columns[col]; - item[field] = data.getValue(row, col); - } - - id = me._addItem(item); - addedIds.push(id); - } } else if (data instanceof Object) { // Single item id = me._addItem(data); @@ -1946,7 +1907,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Update existing items. When an item does not exist, it will be created - * @param {Object | Array | DataTable} data + * @param {Object | Array} data * @param {String} [senderId] Optional sender id * @return {Array} updatedIds The ids of the added or updated items */ @@ -1976,18 +1937,6 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0, len = data.length; i < len; i++) { addOrUpdate(data[i]); } - } else if (util.isDataTable(data)) { - // Google DataTable - var columns = this._getColumnNames(data); - for (var row = 0, rows = data.getNumberOfRows(); row < rows; row++) { - var item = {}; - for (var col = 0, cols = columns.length; col < cols; col++) { - var field = columns[col]; - item[field] = data.getValue(row, col); - } - - addOrUpdate(item); - } } else if (data instanceof Object) { // Single item addOrUpdate(data); @@ -2012,70 +1961,50 @@ return /******/ (function(modules) { // webpackBootstrap * * get() * get(options: Object) - * get(options: Object, data: Array | DataTable) * * get(id: Number | String) * get(id: Number | String, options: Object) - * get(id: Number | String, options: Object, data: Array | DataTable) * * get(ids: Number[] | String[]) * get(ids: Number[] | String[], options: Object) - * get(ids: Number[] | String[], options: Object, data: Array | DataTable) * * Where: * * {Number | String} id The id of an item * {Number[] | String{}} ids An array with ids of items * {Object} options An Object with options. Available options: - * {String} [returnType] Type of data to be - * returned. Can be 'DataTable' or 'Array' (default) - * {Object.} [type] - * {String[]} [fields] field names to be returned - * {function} [filter] filter items - * {String | function} [order] Order the items by - * a field name or custom sort function. - * {Array | DataTable} [data] If provided, items will be appended to this - * array or table. Required in case of Google - * DataTable. - * + * {String} [returnType] Type of data to be returned. + * Can be 'Array' (default) or 'Object'. + * {Object.} [type] + * {String[]} [fields] field names to be returned + * {function} [filter] filter items + * {String | function} [order] Order the items by a field name or custom sort function. * @throws Error */ DataSet.prototype.get = function (args) { var me = this; // parse the arguments - var id, ids, options, data; + var id, ids, options; var firstType = util.getType(arguments[0]); if (firstType == 'String' || firstType == 'Number') { - // get(id [, options] [, data]) + // get(id [, options]) id = arguments[0]; options = arguments[1]; - data = arguments[2]; } else if (firstType == 'Array') { - // get(ids [, options] [, data]) + // get(ids [, options]) ids = arguments[0]; options = arguments[1]; - data = arguments[2]; } else { - // get([, options] [, data]) + // get([, options]) options = arguments[0]; - data = arguments[1]; } // determine the return type var returnType; if (options && options.returnType) { - var allowedValues = ['DataTable', 'Array', 'Object']; + var allowedValues = ['Array', 'Object']; returnType = allowedValues.indexOf(options.returnType) == -1 ? 'Array' : options.returnType; - - if (data && returnType != util.getType(data)) { - throw new Error('Type of parameter "data" (' + util.getType(data) + ') ' + 'does not correspond with specified options.type (' + options.type + ')'); - } - if (returnType == 'DataTable' && !util.isDataTable(data)) { - throw new Error('Parameter "data" must be a DataTable ' + 'when options.type is "DataTable"'); - } - } else if (data) { - returnType = util.getType(data) == 'DataTable' ? 'DataTable' : 'Array'; } else { returnType = 'Array'; } @@ -2134,41 +2063,19 @@ return /******/ (function(modules) { // webpackBootstrap } // return the results - if (returnType == 'DataTable') { - var columns = this._getColumnNames(data); - if (id != undefined) { - // append a single item to the data table - me._appendRow(data, columns, item); - } else { - // copy the items to the provided data table - for (i = 0; i < items.length; i++) { - me._appendRow(data, columns, items[i]); - } - } - return data; - } else if (returnType == 'Object') { + if (returnType == 'Object') { var result = {}; for (i = 0; i < items.length; i++) { result[items[i].id] = items[i]; } return result; } else { - // return an array if (id != undefined) { // a single item return item; } else { - // multiple items - if (data) { - // copy the items to the provided array - for (i = 0, len = items.length; i < len; i++) { - data.push(items[i]); - } - return data; - } else { - // just return our array - return items; - } + // just return our array + return items; } } }; @@ -2658,36 +2565,6 @@ return /******/ (function(modules) { // webpackBootstrap return id; }; - /** - * Get an array with the column names of a Google DataTable - * @param {DataTable} dataTable - * @return {String[]} columnNames - * @private - */ - DataSet.prototype._getColumnNames = function (dataTable) { - var columns = []; - for (var col = 0, cols = dataTable.getNumberOfColumns(); col < cols; col++) { - columns[col] = dataTable.getColumnId(col) || dataTable.getColumnLabel(col); - } - return columns; - }; - - /** - * Append an item as a row to the dataTable - * @param dataTable - * @param columns - * @param item - * @private - */ - DataSet.prototype._appendRow = function (dataTable, columns, item) { - var row = dataTable.addRow(); - - for (var col = 0, cols = columns.length; col < cols; col++) { - var field = columns[col]; - dataTable.setValue(row, col, item[field]); - } - }; - module.exports = DataSet; /***/ }, @@ -4264,7 +4141,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this.dataFilter) { var options = { - visible: this.showAnimationControls + 'visible': this.showAnimationControls }; var slider = new Slider(this.frame.filter, options); this.frame.filter.slider = slider; @@ -5443,9 +5320,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} mouse x */ function getMouseX(event) { - if ('clientX' in event) { - return event.clientX; - }return event.targetTouches[0] && event.targetTouches[0].clientX || 0; + if ('clientX' in event) return event.clientX; + return event.targetTouches[0] && event.targetTouches[0].clientX || 0; } /** @@ -5454,9 +5330,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} mouse y */ function getMouseY(event) { - if ('clientY' in event) { - return event.clientY; - }return event.targetTouches[0] && event.targetTouches[0].clientY || 0; + if ('clientY' in event) return event.clientY; + return event.targetTouches[0] && event.targetTouches[0].clientY || 0; } module.exports = Graph3d; @@ -6429,8 +6304,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create a timeline visualization * @param {HTMLElement} container - * @param {vis.DataSet | vis.DataView | Array | google.visualization.DataTable} [items] - * @param {vis.DataSet | vis.DataView | Array | google.visualization.DataTable} [groups] + * @param {vis.DataSet | vis.DataView | Array} [items] + * @param {vis.DataSet | vis.DataView | Array} [groups] * @param {Object} [options] See Timeline.setOptions for the available options. * @constructor * @extends Core @@ -6454,7 +6329,11 @@ return /******/ (function(modules) { // webpackBootstrap autoResize: true, - orientation: 'bottom', // axis orientation: 'bottom', 'top', or 'both' + orientation: { + axis: 'bottom', // axis orientation: 'bottom', 'top', or 'both' + item: 'bottom' // not relevant + }, + width: null, height: null, maxHeight: null, @@ -6506,11 +6385,6 @@ return /******/ (function(modules) { // webpackBootstrap this.currentTime = new CurrentTime(this.body); this.components.push(this.currentTime); - // custom time bar - // Note: time bar will be attached in this.setOptions when selected - this.customTime = new CustomTime(this.body); - this.components.push(this.customTime); - // item set this.itemSet = new ItemSet(this.body); this.components.push(this.itemSet); @@ -6561,7 +6435,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set items - * @param {vis.DataSet | Array | google.visualization.DataTable | null} items + * @param {vis.DataSet | Array | null} items */ Timeline.prototype.setItems = function (items) { var initialLoad = this.itemsData == null; @@ -6595,16 +6469,16 @@ return /******/ (function(modules) { // webpackBootstrap var start = this.options.start != undefined ? this.options.start : dataRange.start; var end = this.options.end != undefined ? this.options.end : dataRange.end; - this.setWindow(start, end, { animate: false }); + this.setWindow(start, end, { animation: false }); } else { - this.fit({ animate: false }); + this.fit({ animation: false }); } } }; /** * Set groups - * @param {vis.DataSet | Array | google.visualization.DataTable} groups + * @param {vis.DataSet | Array} groups */ Timeline.prototype.setGroups = function (groups) { // convert to type DataSet when needed @@ -6622,6 +6496,20 @@ return /******/ (function(modules) { // webpackBootstrap this.itemSet.setGroups(newDataSet); }; + /** + * Set both items and groups in one go + * @param {{items: Array | vis.DataSet, groups: Array | vis.DataSet}} data + */ + Timeline.prototype.setData = function (data) { + if (data && data.groups) { + this.setGroups(data.groups); + } + + if (data && data.items) { + this.setItems(data.items); + } + }; + /** * Set selected items by their id. Replaces the current selection * Unknown id's are silently ignored. @@ -6631,11 +6519,12 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} [options] Available options: * `focus: boolean` * If true, focus will be set to the selected item(s) - * `animate: boolean | number` + * `animation: boolean | {duration: number, easingFunction: string}` * If true (default), the range is animated - * smoothly to the new window. - * If a number, the number is taken as duration - * for the animation. Default duration is 500 ms. + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. * Only applicable when option focus is true. */ Timeline.prototype.setSelection = function (ids, options) { @@ -6659,12 +6548,12 @@ return /******/ (function(modules) { // webpackBootstrap * are centered on screen. * @param {String | String[]} id An item id or array with item ids * @param {Object} [options] Available options: - * `animate: boolean | number` + * `animation: boolean | {duration: number, easingFunction: string}` * If true (default), the range is animated - * smoothly to the new window. - * If a number, the number is taken as duration - * for the animation. Default duration is 500 ms. - * Only applicable when option focus is true + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ Timeline.prototype.focus = function (id, options) { if (!this.itemsData || id == undefined) return; @@ -6700,8 +6589,8 @@ return /******/ (function(modules) { // webpackBootstrap var middle = (start + end) / 2; var interval = Math.max(this.range.end - this.range.start, (end - start) * 1.1); - var animate = options && options.animate !== undefined ? options.animate : true; - this.range.setRange(middle - interval / 2, middle + interval / 2, animate); + var animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(middle - interval / 2, middle + interval / 2, animation); } }; @@ -6752,13 +6641,15 @@ return /******/ (function(modules) { // webpackBootstrap * The event happened, whether clicked on an item, etc. */ Timeline.prototype.getEventProperties = function (event) { - var item = this.itemSet.itemFromTarget(event); - var group = this.itemSet.groupFromTarget(event); - var pageX = event.gesture ? event.gesture.center.pageX : event.pageX; - var pageY = event.gesture ? event.gesture.center.pageY : event.pageY; + var pageX = event.center ? event.center.x : event.pageX; + var pageY = event.center ? event.center.y : event.pageY; var x = pageX - util.getAbsoluteLeft(this.dom.centerContainer); var y = pageY - util.getAbsoluteTop(this.dom.centerContainer); + var item = this.itemSet.itemFromTarget(event); + var group = this.itemSet.groupFromTarget(event); + var customTime = CustomTime.customTimeFromTarget(event); + var snap = this.itemSet.options.snap || null; var scale = this.body.util.getScale(); var step = this.body.util.getStep(); @@ -6769,16 +6660,15 @@ return /******/ (function(modules) { // webpackBootstrap var what = null; if (item != null) { what = 'item'; + } else if (customTime != null) { + what = 'custom-time'; } else if (util.hasParent(element, this.timeAxis.dom.foreground)) { what = 'axis'; } else if (this.timeAxis2 && util.hasParent(element, this.timeAxis2.dom.foreground)) { what = 'axis'; } else if (util.hasParent(element, this.itemSet.dom.labelSet)) { what = 'group-label'; - } else if (util.hasParent(element, this.customTime.bar)) { - what = 'custom-time'; - } // TODO: fix for multiple custom time bars - else if (util.hasParent(element, this.currentTime.bar)) { + } else if (util.hasParent(element, this.currentTime.bar)) { what = 'current-time'; } else if (util.hasParent(element, this.dom.center)) { what = 'background'; @@ -6821,7 +6711,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create a timeline visualization * @param {HTMLElement} container - * @param {vis.DataSet | Array | google.visualization.DataTable} [items] + * @param {vis.DataSet | Array} [items] * @param {Object} [options] See Graph2d.setOptions for the available options. * @constructor * @extends Core @@ -6841,7 +6731,11 @@ return /******/ (function(modules) { // webpackBootstrap autoResize: true, - orientation: 'bottom', + orientation: { + axis: 'bottom', // axis orientation: 'bottom', 'top', or 'both' + item: 'bottom' // not relevant for Graph2d + }, + width: null, height: null, maxHeight: null, @@ -6886,11 +6780,6 @@ return /******/ (function(modules) { // webpackBootstrap this.currentTime = new CurrentTime(this.body); this.components.push(this.currentTime); - // custom time bar - // Note: time bar will be attached in this.setOptions when selected - this.customTime = new CustomTime(this.body); - this.components.push(this.customTime); - // item set this.linegraph = new LineGraph(this.body); this.components.push(this.linegraph); @@ -6931,7 +6820,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set items - * @param {vis.DataSet | Array | google.visualization.DataTable | null} items + * @param {vis.DataSet | Array | null} items */ Graph2d.prototype.setItems = function (items) { var initialLoad = this.itemsData == null; @@ -6961,16 +6850,16 @@ return /******/ (function(modules) { // webpackBootstrap var start = this.options.start != undefined ? this.options.start : null; var end = this.options.end != undefined ? this.options.end : null; - this.setWindow(start, end, { animate: false }); + this.setWindow(start, end, { animation: false }); } else { - this.fit({ animate: false }); + this.fit({ animation: false }); } } }; /** * Set groups - * @param {vis.DataSet | Array | google.visualization.DataTable} groups + * @param {vis.DataSet | Array} groups */ Graph2d.prototype.setGroups = function (groups) { // convert to type DataSet when needed @@ -7058,12 +6947,14 @@ return /******/ (function(modules) { // webpackBootstrap * The event happened, whether clicked on an item, etc. */ Graph2d.prototype.getEventProperties = function (event) { - var pageX = event.gesture ? event.gesture.center.pageX : event.pageX; - var pageY = event.gesture ? event.gesture.center.pageY : event.pageY; + var pageX = event.center ? event.center.x : event.pageX; + var pageY = event.center ? event.center.y : event.pageY; var x = pageX - util.getAbsoluteLeft(this.dom.centerContainer); var y = pageY - util.getAbsoluteTop(this.dom.centerContainer); var time = this._toTime(x); + var customTime = CustomTime.customTimeFromTarget(event); + var element = util.getTarget(event); var what = null; if (util.hasParent(element, this.timeAxis.dom.foreground)) { @@ -7078,10 +6969,9 @@ return /******/ (function(modules) { // webpackBootstrap what = 'legend'; } else if (util.hasParent(element, this.linegraph.legendRight.dom.frame)) { what = 'legend'; - } else if (util.hasParent(element, this.customTime.bar)) { + } else if (customTime != null) { what = 'custom-time'; - } // TODO: fix for multiple custom time bars - else if (util.hasParent(element, this.currentTime.bar)) { + } else if (util.hasParent(element, this.currentTime.bar)) { what = 'current-time'; } else if (util.hasParent(element, this.dom.center)) { what = 'background'; @@ -7886,7 +7776,7 @@ return /******/ (function(modules) { // webpackBootstrap this.props = { touch: {} }; - this.animateTimer = null; + this.animationTimer = null; // drag listeners for dragging this.body.emitter.on('panstart', this._onDragStart.bind(this)); @@ -7948,47 +7838,46 @@ return /******/ (function(modules) { // webpackBootstrap * Set a new start and end range * @param {Date | Number | String} [start] * @param {Date | Number | String} [end] - * @param {boolean | number} [animate=false] If true, the range is animated - * smoothly to the new window. - * If animate is a number, the - * number is taken as duration - * Default duration is 500 ms. + * @param {boolean | {duration: number, easingFunction: string}} [animation=false] + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. * @param {Boolean} [byUser=false] * */ - Range.prototype.setRange = function (start, end, animate, byUser) { + Range.prototype.setRange = function (start, end, animation, byUser) { if (byUser !== true) { byUser = false; } - var _start = start != undefined ? util.convert(start, 'Date').valueOf() : null; - var _end = end != undefined ? util.convert(end, 'Date').valueOf() : null; + var finalStart = start != undefined ? util.convert(start, 'Date').valueOf() : null; + var finalEnd = end != undefined ? util.convert(end, 'Date').valueOf() : null; this._cancelAnimation(); - if (animate) { + if (animation) { + // true or an Object var me = this; var initStart = this.start; var initEnd = this.end; - var duration = typeof animate === 'number' ? animate : 500; + var duration = typeof animation === 'object' && 'duration' in animation ? animation.duration : 500; + var easingName = typeof animation === 'object' && 'easingFunction' in animation ? animation.easingFunction : 'easeInOutQuad'; + var easingFunction = util.easingFunctions[easingName]; + if (!easingFunction) { + throw new Error('Unknown easing function ' + JSON.stringify(easingName) + '. ' + 'Choose from: ' + Object.keys(util.easingFunctions).join(', ')); + } + var initTime = new Date().valueOf(); var anyChanged = false; - var next = (function (_next) { - function next() { - return _next.apply(this, arguments); - } - - next.toString = function () { - return _next.toString(); - }; - - return next; - })(function () { + var next = function next() { if (!me.props.touch.dragging) { var now = new Date().valueOf(); var time = now - initTime; + var ease = easingFunction(time / duration); var done = time > duration; - var s = done || _start === null ? _start : util.easeInOutQuad(time, initStart, _start, duration); - var e = done || _end === null ? _end : util.easeInOutQuad(time, initEnd, _end, duration); + var s = done || finalStart === null ? finalStart : initStart + (finalStart - initStart) * ease; + var e = done || finalEnd === null ? finalEnd : initEnd + (finalEnd - initEnd) * ease; changed = me._applyRange(s, e); DateUtil.updateHiddenDates(me.body, me.options.hiddenDates); @@ -8004,14 +7893,14 @@ return /******/ (function(modules) { // webpackBootstrap } else { // animate with as high as possible frame rate, leave 20 ms in between // each to prevent the browser from blocking - me.animateTimer = setTimeout(next, 20); + me.animationTimer = setTimeout(next, 20); } } - }); + }; return next(); } else { - var changed = this._applyRange(_start, _end); + var changed = this._applyRange(finalStart, finalEnd); DateUtil.updateHiddenDates(this.body, this.options.hiddenDates); if (changed) { var params = { start: new Date(this.start), end: new Date(this.end), byUser: byUser }; @@ -8026,9 +7915,9 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Range.prototype._cancelAnimation = function () { - if (this.animateTimer) { - clearTimeout(this.animateTimer); - this.animateTimer = null; + if (this.animationTimer) { + clearTimeout(this.animationTimer); + this.animationTimer = null; } }; @@ -10686,7 +10575,7 @@ return /******/ (function(modules) { // webpackBootstrap console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); this.warned = true; } - locale = this.options.locales.en; // fall back on english when not available + locale = this.options.locales['en']; // fall back on english when not available } var title = locale.current + ' ' + locale.time + ': ' + moment(now).format('dddd, MMMM Do YYYY, H:mm:ss'); title = title.charAt(0).toUpperCase() + title.substring(1); @@ -10777,7 +10666,9 @@ return /******/ (function(modules) { // webpackBootstrap * A custom time bar * @param {{range: Range, dom: Object}} body * @param {Object} [options] Available parameters: - * {Boolean} [showCustomTime] + * {number | string} id + * {string} locales + * {string} locale * @constructor CustomTime * @extends Component */ @@ -10787,10 +10678,9 @@ return /******/ (function(modules) { // webpackBootstrap // default options this.defaultOptions = { - showCustomTime: false, locales: locales, locale: 'en', - id: 0 + id: undefined }; this.options = util.extend({}, this.defaultOptions); @@ -10813,17 +10703,14 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set options for the component. Options will be merged in current options. * @param {Object} options Available parameters: - * {boolean} [showCustomTime] + * {number | string} id + * {string} locales + * {string} locale */ CustomTime.prototype.setOptions = function (options) { if (options) { // copy all options that we know - util.selectiveExtend(['showCustomTime', 'locale', 'locales', 'id'], this.options, options); - - // Triggered by addCustomTimeBar, redraw to add new bar - if (this.options.id) { - this.redraw(); - } + util.selectiveExtend(['locale', 'locales', 'id'], this.options, options); } }; @@ -10833,6 +10720,7 @@ return /******/ (function(modules) { // webpackBootstrap */ CustomTime.prototype._create = function () { var bar = document.createElement('div'); + bar['custom-time'] = this; bar.className = 'vis-custom-time'; bar.style.position = 'absolute'; bar.style.top = '0px'; @@ -10862,10 +10750,9 @@ return /******/ (function(modules) { // webpackBootstrap * Destroy the CustomTime bar */ CustomTime.prototype.destroy = function () { - this.options.showCustomTime = false; - this.redraw(); // will remove the bar from the DOM + this.hide(); - this.hammer.enable(false); + this.hammer.destroy(); this.hammer = null; this.body = null; @@ -10876,41 +10763,44 @@ return /******/ (function(modules) { // webpackBootstrap * @return {boolean} Returns true if the component is resized */ CustomTime.prototype.redraw = function () { - if (this.options.showCustomTime) { - var parent = this.body.dom.backgroundVertical; - if (this.bar.parentNode != parent) { - // attach to the dom - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); - } - parent.appendChild(this.bar); + var parent = this.body.dom.backgroundVertical; + if (this.bar.parentNode != parent) { + // attach to the dom + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); } + parent.appendChild(this.bar); + } - var x = this.body.util.toScreen(this.customTime); - - var locale = this.options.locales[this.options.locale]; - if (!locale) { - if (!this.warned) { - console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); - this.warned = true; - } - locale = this.options.locales.en; // fall back on english when not available - } - var title = locale.time + ': ' + moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); + var x = this.body.util.toScreen(this.customTime); - this.bar.style.left = x + 'px'; - this.bar.title = title; - } else { - // remove the line from the DOM - if (this.bar.parentNode) { - this.bar.parentNode.removeChild(this.bar); + var locale = this.options.locales[this.options.locale]; + if (!locale) { + if (!this.warned) { + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); + this.warned = true; } + locale = this.options.locales['en']; // fall back on english when not available } + var title = locale.time + ': ' + moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); + + this.bar.style.left = x + 'px'; + this.bar.title = title; return false; }; + /** + * Remove the CustomTime from the DOM + */ + CustomTime.prototype.hide = function () { + // remove the line from the DOM + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + }; + /** * Set custom time. * @param {Date | number | string} time @@ -10979,6 +10869,24 @@ return /******/ (function(modules) { // webpackBootstrap event.stopPropagation(); }; + /** + * Find a custom time from an event target: + * searches for the attribute 'custom-time' in the event target's element tree + * @param {Event} event + * @return {CustomTime | null} customTime + */ + CustomTime.customTimeFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('custom-time')) { + return target['custom-time']; + } + target = target.parentNode; + } + + return null; + }; + module.exports = CustomTime; /***/ }, @@ -11313,7 +11221,7 @@ return /******/ (function(modules) { // webpackBootstrap var resized = false; DOMutil.prepareElements(this.DOMelements.lines); DOMutil.prepareElements(this.DOMelements.labels); - var orientation = this.options.orientation; + var orientation = this.options['orientation']; // get the range for the slaved axis var step; @@ -11376,11 +11284,11 @@ return /******/ (function(modules) { // webpackBootstrap isMajor = step.isMajor(); if (stepIndex > 0 && stepIndex !== this.amountOfSteps) { - if (this.options.showMinorLabels && isMajor === false || this.master === false && this.options.showMinorLabels === true) { + if (this.options['showMinorLabels'] && isMajor === false || this.master === false && this.options['showMinorLabels'] === true) { this._redrawLabel(y - 2, step.getCurrent(decimals), orientation, 'vis-y-axis vis-minor', this.props.minorCharHeight); } - if (isMajor && this.options.showMajorLabels && this.master === true || this.options.showMinorLabels === false && this.master === false && isMajor === true) { + if (isMajor && this.options['showMajorLabels'] && this.master === true || this.options['showMinorLabels'] === false && this.master === false && isMajor === true) { if (y >= 0) { this._redrawLabel(y - 2, step.getCurrent(decimals), orientation, 'vis-y-axis vis-major', this.props.majorCharHeight); } @@ -12529,26 +12437,26 @@ return /******/ (function(modules) { // webpackBootstrap // listeners for the DataSet of the items this.itemListeners = { - add: function add(event, params, senderId) { + 'add': function add(event, params, senderId) { me._onAdd(params.items); }, - update: function update(event, params, senderId) { + 'update': function update(event, params, senderId) { me._onUpdate(params.items); }, - remove: function remove(event, params, senderId) { + 'remove': function remove(event, params, senderId) { me._onRemove(params.items); } }; // listeners for the DataSet of the groups this.groupListeners = { - add: function add(event, params, senderId) { + 'add': function add(event, params, senderId) { me._onAddGroups(params.items); }, - update: function update(event, params, senderId) { + 'update': function update(event, params, senderId) { me._onUpdateGroups(params.items); }, - remove: function remove(event, params, senderId) { + 'remove': function remove(event, params, senderId) { me._onRemoveGroups(params.items); } }; @@ -14347,26 +14255,26 @@ return /******/ (function(modules) { // webpackBootstrap // listeners for the DataSet of the items this.itemListeners = { - add: function add(event, params, senderId) { + 'add': function add(event, params, senderId) { me._onAdd(params.items); }, - update: function update(event, params, senderId) { + 'update': function update(event, params, senderId) { me._onUpdate(params.items); }, - remove: function remove(event, params, senderId) { + 'remove': function remove(event, params, senderId) { me._onRemove(params.items); } }; // listeners for the DataSet of the groups this.groupListeners = { - add: function add(event, params, senderId) { + 'add': function add(event, params, senderId) { me._onAddGroups(params.items); }, - update: function update(event, params, senderId) { + 'update': function update(event, params, senderId) { me._onUpdateGroups(params.items); }, - remove: function remove(event, params, senderId) { + 'remove': function remove(event, params, senderId) { me._onRemoveGroups(params.items); } }; @@ -15652,65 +15560,65 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _Groups = __webpack_require__(50); + var _modulesGroups = __webpack_require__(50); - var _Groups2 = _interopRequireWildcard(_Groups); + var _modulesGroups2 = _interopRequireDefault(_modulesGroups); - var _NodesHandler = __webpack_require__(51); + var _modulesNodesHandler = __webpack_require__(51); - var _NodesHandler2 = _interopRequireWildcard(_NodesHandler); + var _modulesNodesHandler2 = _interopRequireDefault(_modulesNodesHandler); - var _EdgesHandler = __webpack_require__(52); + var _modulesEdgesHandler = __webpack_require__(52); - var _EdgesHandler2 = _interopRequireWildcard(_EdgesHandler); + var _modulesEdgesHandler2 = _interopRequireDefault(_modulesEdgesHandler); - var _PhysicsEngine = __webpack_require__(53); + var _modulesPhysicsEngine = __webpack_require__(53); - var _PhysicsEngine2 = _interopRequireWildcard(_PhysicsEngine); + var _modulesPhysicsEngine2 = _interopRequireDefault(_modulesPhysicsEngine); - var _ClusterEngine = __webpack_require__(54); + var _modulesClustering = __webpack_require__(54); - var _ClusterEngine2 = _interopRequireWildcard(_ClusterEngine); + var _modulesClustering2 = _interopRequireDefault(_modulesClustering); - var _CanvasRenderer = __webpack_require__(55); + var _modulesCanvasRenderer = __webpack_require__(55); - var _CanvasRenderer2 = _interopRequireWildcard(_CanvasRenderer); + var _modulesCanvasRenderer2 = _interopRequireDefault(_modulesCanvasRenderer); - var _Canvas = __webpack_require__(56); + var _modulesCanvas = __webpack_require__(56); - var _Canvas2 = _interopRequireWildcard(_Canvas); + var _modulesCanvas2 = _interopRequireDefault(_modulesCanvas); - var _View = __webpack_require__(57); + var _modulesView = __webpack_require__(57); - var _View2 = _interopRequireWildcard(_View); + var _modulesView2 = _interopRequireDefault(_modulesView); - var _InteractionHandler = __webpack_require__(58); + var _modulesInteractionHandler = __webpack_require__(58); - var _InteractionHandler2 = _interopRequireWildcard(_InteractionHandler); + var _modulesInteractionHandler2 = _interopRequireDefault(_modulesInteractionHandler); - var _SelectionHandler = __webpack_require__(59); + var _modulesSelectionHandler = __webpack_require__(59); - var _SelectionHandler2 = _interopRequireWildcard(_SelectionHandler); + var _modulesSelectionHandler2 = _interopRequireDefault(_modulesSelectionHandler); - var _LayoutEngine = __webpack_require__(60); + var _modulesLayoutEngine = __webpack_require__(60); - var _LayoutEngine2 = _interopRequireWildcard(_LayoutEngine); + var _modulesLayoutEngine2 = _interopRequireDefault(_modulesLayoutEngine); - var _ManipulationSystem = __webpack_require__(61); + var _modulesManipulationSystem = __webpack_require__(61); - var _ManipulationSystem2 = _interopRequireWildcard(_ManipulationSystem); + var _modulesManipulationSystem2 = _interopRequireDefault(_modulesManipulationSystem); - var _ConfigurationSystem = __webpack_require__(62); + var _modulesConfigurationSystem = __webpack_require__(62); - var _ConfigurationSystem2 = _interopRequireWildcard(_ConfigurationSystem); + var _modulesConfigurationSystem2 = _interopRequireDefault(_modulesConfigurationSystem); - var _Validator = __webpack_require__(63); + var _modulesValidator = __webpack_require__(63); - var _Validator2 = _interopRequireWildcard(_Validator); + var _modulesValidator2 = _interopRequireDefault(_modulesValidator); - var _allOptions$configureOptions = __webpack_require__(64); + var _modulesComponentsAllOptionsJs = __webpack_require__(64); // Load custom shapes into CanvasRenderingContext2D __webpack_require__(65); @@ -15724,6 +15632,7 @@ return /******/ (function(modules) { // webpackBootstrap var gephiParser = __webpack_require__(39); var Images = __webpack_require__(37); var Activator = __webpack_require__(66); + var locales = __webpack_require__(67); /** * @constructor Network @@ -15746,6 +15655,8 @@ return /******/ (function(modules) { // webpackBootstrap // set constant values this.options = {}; this.defaultOptions = { + locale: 'en', + locales: locales, clickToUse: false }; util.extend(this.options, this.defaultOptions); @@ -15799,25 +15710,25 @@ return /******/ (function(modules) { // webpackBootstrap this.images = new Images(function () { return _this.body.emitter.emit('_requestRedraw'); }); // object with images - this.groups = new _Groups2['default'](); // object with groups - this.canvas = new _Canvas2['default'](this.body); // DOM handler - this.selectionHandler = new _SelectionHandler2['default'](this.body, this.canvas); // Selection handler - this.interactionHandler = new _InteractionHandler2['default'](this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key - this.view = new _View2['default'](this.body, this.canvas); // camera handler, does animations and zooms - this.renderer = new _CanvasRenderer2['default'](this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into - this.physics = new _PhysicsEngine2['default'](this.body); // physics engine, does all the simulations - this.layoutEngine = new _LayoutEngine2['default'](this.body); // layout engine for inital layout and hierarchical layout - this.clustering = new _ClusterEngine2['default'](this.body); // clustering api - this.manipulation = new _ManipulationSystem2['default'](this.body, this.canvas, this.selectionHandler); // data manipulation system - - this.nodesHandler = new _NodesHandler2['default'](this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options - this.edgesHandler = new _EdgesHandler2['default'](this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options + this.groups = new _modulesGroups2['default'](); // object with groups + this.canvas = new _modulesCanvas2['default'](this.body); // DOM handler + this.selectionHandler = new _modulesSelectionHandler2['default'](this.body, this.canvas); // Selection handler + this.interactionHandler = new _modulesInteractionHandler2['default'](this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key + this.view = new _modulesView2['default'](this.body, this.canvas); // camera handler, does animations and zooms + this.renderer = new _modulesCanvasRenderer2['default'](this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into + this.physics = new _modulesPhysicsEngine2['default'](this.body); // physics engine, does all the simulations + this.layoutEngine = new _modulesLayoutEngine2['default'](this.body); // layout engine for inital layout and hierarchical layout + this.clustering = new _modulesClustering2['default'](this.body); // clustering api + this.manipulation = new _modulesManipulationSystem2['default'](this.body, this.canvas, this.selectionHandler); // data manipulation system + + this.nodesHandler = new _modulesNodesHandler2['default'](this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options + this.edgesHandler = new _modulesEdgesHandler2['default'](this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options // create the DOM elements this.canvas._create(); // setup configuration system - this.configurationSystem = new _ConfigurationSystem2['default'](this, this.body.container, _allOptions$configureOptions.configureOptions, this.canvas.pixelRatio); + this.configurationSystem = new _modulesConfigurationSystem2['default'](this, this.body.container, _modulesComponentsAllOptionsJs.configureOptions, this.canvas.pixelRatio); // apply options this.setOptions(options); @@ -15836,43 +15747,56 @@ return /******/ (function(modules) { // webpackBootstrap Network.prototype.setOptions = function (options) { if (options !== undefined) { - var errorFound = _Validator2['default'].validate(options, _allOptions$configureOptions.allOptions); + var errorFound = _modulesValidator2['default'].validate(options, _modulesComponentsAllOptionsJs.allOptions); if (errorFound === true) { options = {}; - console.log('%cErrors have been found in the supplied options object. None of the options will be used.', _Validator.printStyle); + console.log('%cErrors have been found in the supplied options object. None of the options will be used.', _modulesValidator.printStyle); } - //this.placeConvenienceOptions(options); + // copy the global fields over + var fields = ['locale', 'locales', 'clickToUse']; + util.selectiveDeepExtend(fields, this.options, options); // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system. options = this.layoutEngine.setOptions(options.layout, options); + this.canvas.setOptions(options); // options for canvas are in globals + // pass the options to the modules this.groups.setOptions(options.groups); this.nodesHandler.setOptions(options.nodes); this.edgesHandler.setOptions(options.edges); this.physics.setOptions(options.physics); - this.canvas.setOptions(options.canvas); - this.renderer.setOptions(options.rendering); - this.view.setOptions(options.view); + this.manipulation.setOptions(options.manipulation, options); // manipulation uses the locales in the globals + this.interactionHandler.setOptions(options.interaction); - this.selectionHandler.setOptions(options.selection); - this.clustering.setOptions(options.clustering); - this.manipulation.setOptions(options.manipulation); + this.renderer.setOptions(options.interaction); // options for rendering are in interaction + this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction + + // these two do not have options at the moment, here for completeness + //this.view.setOptions(options.view); + //this.clustering.setOptions(options.clustering); this.configurationSystem.setOptions(options.configure); // if the configuration system is enabled, copy all options and put them into the config system if (this.configurationSystem.options.enabled === true) { - var networkOptions = { nodes: {}, edges: {}, layout: {}, interaction: {}, manipulation: {}, physics: {}, selection: {}, rendering: {} }; + var networkOptions = { nodes: {}, edges: {}, layout: {}, interaction: {}, manipulation: {}, physics: {}, global: {} }; util.deepExtend(networkOptions.nodes, this.nodesHandler.options); util.deepExtend(networkOptions.edges, this.edgesHandler.options); util.deepExtend(networkOptions.layout, this.layoutEngine.options); + // load the selectionHandler and rendere default options in to the interaction group + util.deepExtend(networkOptions.interaction, this.selectionHandler.options); + util.deepExtend(networkOptions.interaction, this.renderer.options); + util.deepExtend(networkOptions.interaction, this.interactionHandler.options); util.deepExtend(networkOptions.manipulation, this.manipulation.options); util.deepExtend(networkOptions.physics, this.physics.options); - util.deepExtend(networkOptions.selection, this.selectionHandler.options); - util.deepExtend(networkOptions.rendering, this.renderer.options); + + // load globals into the global object + util.deepExtend(networkOptions.global, this.canvas.options); + util.deepExtend(networkOptions.global, this.options); + this.configurationSystem.setModuleOptions(networkOptions); } @@ -15901,24 +15825,6 @@ return /******/ (function(modules) { // webpackBootstrap } }; - // - ///** - // * - // */ - //Network.prototype.placeConvenienceOptions = function (options) { - // if (options.locale !== undefined) { - // if (options.manipulation === undefined) { - // options.manipulation = {enabled:false, locale:options.locale}; - // } - // else if (typeof options.manipulation === 'boolean') { - // options.manipulation = {enabled: options.manipulation, locale:options.locale}; - // } - // else { - // options.manipulation.locale = options.locale; - // } - // } - //} - /** * Update the this.body.nodeIndices with the most recent node index list * @private @@ -17151,9 +17057,9 @@ return /******/ (function(modules) { // webpackBootstrap }; if (options !== undefined) { - this.options.nodes.allowedToMove = options.allowedToMove | false; - this.options.nodes.parseColor = options.parseColor | false; - this.options.edges.inheritColor = options.inheritColor | true; + this.options.nodes['allowedToMove'] = options.allowedToMove | false; + this.options.nodes['parseColor'] = options.parseColor | false; + this.options.edges['inheritColor'] = options.inheritColor | true; } var gEdges = gephiJSON.edges; @@ -17161,33 +17067,33 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0; i < gEdges.length; i++) { var edge = {}; var gEdge = gEdges[i]; - edge.id = gEdge.id; - edge.from = gEdge.source; - edge.to = gEdge.target; - edge.attributes = gEdge.attributes; + edge['id'] = gEdge.id; + edge['from'] = gEdge.source; + edge['to'] = gEdge.target; + edge['attributes'] = gEdge.attributes; // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined; // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; - edge.color = gEdge.color; - edge.inheritColor = edge.color !== undefined ? false : this.options.inheritColor; + edge['color'] = gEdge.color; + edge['inheritColor'] = edge['color'] !== undefined ? false : this.options.inheritColor; edges.push(edge); } for (var i = 0; i < gNodes.length; i++) { var node = {}; var gNode = gNodes[i]; - node.id = gNode.id; - node.attributes = gNode.attributes; - node.x = gNode.x; - node.y = gNode.y; - node.label = gNode.label; + node['id'] = gNode.id; + node['attributes'] = gNode.attributes; + node['x'] = gNode.x; + node['y'] = gNode.y; + node['label'] = gNode.label; if (this.options.nodes.parseColor === true) { - node.color = gNode.color; + node['color'] = gNode.color; } else { - node.color = gNode.color !== undefined ? { background: gNode.color, border: gNode.color } : undefined; + node['color'] = gNode.color !== undefined ? { background: gNode.color, border: gNode.color } : undefined; } - node.radius = gNode.size; - node.allowedToMoveX = this.options.nodes.allowedToMove; - node.allowedToMoveY = this.options.nodes.allowedToMove; + node['radius'] = gNode.size; + node['allowedToMoveX'] = this.options.nodes.allowedToMove; + node['allowedToMoveY'] = this.options.nodes.allowedToMove; nodes.push(node); } @@ -17204,7 +17110,7 @@ return /******/ (function(modules) { // webpackBootstrap // use this instance. Else, load via commonjs. 'use strict'; - module.exports = typeof window !== 'undefined' && window.moment || __webpack_require__(67); + module.exports = typeof window !== 'undefined' && window['moment'] || __webpack_require__(68); /***/ }, /* 41 */ @@ -17215,8 +17121,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; if (typeof window !== 'undefined') { - var propagating = __webpack_require__(68); - var Hammer = window.Hammer || __webpack_require__(69); + var propagating = __webpack_require__(69); + var Hammer = window['Hammer'] || __webpack_require__(70); module.exports = propagating(Hammer, { preventDefault: 'mouse' }); @@ -17234,8 +17140,9 @@ return /******/ (function(modules) { // webpackBootstrap var _rng; - var globalVar = window !== undefined ? window : global; - if (globalVar.crypto && crypto.getRandomValues) { + var globalVar = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : null; + + if (globalVar && globalVar.crypto && crypto.getRandomValues) { // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto // Moderately fast, high quality var _rnds8 = new Uint8Array(16); @@ -17633,7 +17540,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create a timeline visualization * @param {HTMLElement} container - * @param {vis.DataSet | Array | google.visualization.DataTable} [items] + * @param {vis.DataSet | Array} [items] * @param {Object} [options] See Core.setOptions for the available options. * @constructor */ @@ -17712,7 +17619,6 @@ return /******/ (function(modules) { // webpackBootstrap this.on('rangechange', this.redraw.bind(this)); this.on('touch', this._onTouch.bind(this)); - this.on('panstart', this._onDragStart.bind(this)); this.on('pan', this._onDrag.bind(this)); var me = this; @@ -17789,6 +17695,8 @@ return /******/ (function(modules) { // webpackBootstrap scrollTopMin: 0 }; + this.customTimes = []; + // store state information needed for touch events this.touch = {}; @@ -17832,13 +17740,21 @@ return /******/ (function(modules) { // webpackBootstrap if ('orientation' in options) { if (typeof options.orientation === 'string') { - this.options.orientation = options.orientation; - } else if (typeof options.orientation === 'object' && 'axis' in options.orientation) { - this.options.orientation = options.orientation.axis; + this.options.orientation = { + item: options.orientation, + axis: options.orientation + }; + } else if (typeof options.orientation === 'object') { + if ('item' in options.orientation) { + this.options.orientation.item = options.orientation.item; + } + if ('axis' in options.orientation) { + this.options.orientation.axis = options.orientation.axis; + } } } - if (this.options.orientation === 'both') { + if (this.options.orientation.axis === 'both') { if (!this.timeAxis2) { var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body); timeAxis2.setOptions = function (options) { @@ -17876,6 +17792,10 @@ return /******/ (function(modules) { // webpackBootstrap } } + if ('showCustomTime' in options) { + throw new Error('Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])'); + } + // enable/disable autoResize this._initAutoResize(); } @@ -17943,103 +17863,68 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set a custom time bar * @param {Date} time - * @param {int} id + * @param {number} [id=undefined] Optional id of the custom time bar to be adjusted. */ Core.prototype.setCustomTime = function (time, id) { - if (!this.customTime) { - throw new Error('Cannot get custom time: Custom time bar is not enabled'); - } + var customTimes = this.customTimes.filter(function (component) { + return id === component.options.id; + }); - var barId = id || 0; + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } - this.components.forEach(function (element, index, components) { - if (element instanceof CustomTime && element.options.id === barId) { - element.setCustomTime(time); - } - }); + if (customTimes.length > 0) { + customTimes[0].setCustomTime(time); + } }; /** * Retrieve the current custom time. - * @return {Date} customTime - * @param {int} id + * @param {number} [id=undefined] Id of the custom time bar. + * @return {Date | undefined} customTime */ Core.prototype.getCustomTime = function (id) { - if (!this.customTime) { - throw new Error('Cannot get custom time: Custom time bar is not enabled'); - } - - var barId = id || 0, - customTime = this.customTime.getCustomTime(); - - this.components.forEach(function (element, index, components) { - if (element instanceof CustomTime && element.options.id === barId) { - customTime = element.getCustomTime(); - } + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; }); - return customTime; + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } + return customTimes[0].getCustomTime(); }; /** * Add custom vertical bar - * @param {Date | String | Number} time A Date, unix timestamp, or - * ISO date string. Time point where the new bar should be placed - * @param {Number | String} ID of the new bar - * @return {Number | String} ID of the new bar + * @param {Date | String | Number} [time] A Date, unix timestamp, or + * ISO date string. Time point where + * the new bar should be placed. + * If not provided, `new Date()` will + * be used. + * @param {Number | String} [id=undefined] Id of the new bar. Optional + * @return {Number | String} Returns the id of the new bar */ Core.prototype.addCustomTime = function (time, id) { - if (!this.currentTime) { - throw new Error('Option showCurrentTime must be true'); - } - - if (time === undefined) { - throw new Error('Time parameter for the custom bar must be provided'); - } - - var ts = util.convert(time, 'Date').valueOf(), - numIds, - customTime, - customBarId; + var timestamp = time !== undefined ? util.convert(time, 'Date').valueOf() : new Date(); - // All bar IDs are kept in 1 array, mixed types - // Bar with ID 0 is the default bar. - if (!this.customBarIds || this.customBarIds.constructor !== Array) { - this.customBarIds = [0]; - } - - // If the ID is not provided, generate one, otherwise just use it - if (id === undefined) { - - numIds = this.customBarIds.filter(function (element) { - return util.isNumber(element); - }); - - customBarId = numIds.length > 0 ? Math.max.apply(null, numIds) + 1 : 1; - } else { - - // Check for duplicates - this.customBarIds.forEach(function (element) { - if (element === id) { - throw new Error('Custom time ID already exists'); - } - }); - - customBarId = id; + var exists = this.customTimes.some(function (customTime) { + return customTime.options.id === id; + }); + if (exists) { + throw new Error('A custom time with id ' + JSON.stringify(id) + ' already exists'); } - this.customBarIds.push(customBarId); - - customTime = new CustomTime(this.body, { - showCustomTime: true, - time: ts, - id: customBarId + var customTime = new CustomTime(this.body, { + time: timestamp, + id: id }); + this.customTimes.push(customTime); this.components.push(customTime); this.redraw(); - return customBarId; + return id; }; /** @@ -18048,19 +17933,19 @@ return /******/ (function(modules) { // webpackBootstrap * @return {boolean} True if the bar exists and is removed, false otherwise */ Core.prototype.removeCustomTime = function (id) { + var customTimes = this.customTimes.filter(function (bar) { + return bar.options.id === id; + }); - var me = this; + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } - this.components.forEach(function (bar, index, components) { - if (bar instanceof CustomTime && bar.options.id === id) { - // Only the lines added by the user will be removed - if (bar.options.id !== 0) { - me.customBarIds.splice(me.customBarIds.indexOf(id), 1); - components.splice(index, 1); - bar.destroy(); - } - } - }); + customTimes.forEach((function (customTime) { + this.customTimes.splice(this.customTimes.indexOf(customTime), 1); + this.components.splice(this.components.indexOf(customTime), 1); + customTime.destroy(); + }).bind(this)); }; /** @@ -18074,11 +17959,12 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set Core window such that it fits all items * @param {Object} [options] Available options: - * `animate: boolean | number` - * If true (default), the range is animated - * smoothly to the new window. - * If a number, the number is taken as duration - * for the animation. Default duration is 500 ms. + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ Core.prototype.fit = function (options) { var range = this._getDataRange(); @@ -18088,8 +17974,8 @@ return /******/ (function(modules) { // webpackBootstrap return; } - var animate = options && options.animate !== undefined ? options.animate : true; - this.range.setRange(range.start, range.end, animate); + var animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(range.start, range.end, animation); }; /** @@ -18134,21 +18020,22 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Date | Number | String | Object} [start] Start date of visible window * @param {Date | Number | String} [end] End date of visible window * @param {Object} [options] Available options: - * `animate: boolean | number` - * If true (default), the range is animated - * smoothly to the new window. - * If a number, the number is taken as duration - * for the animation. Default duration is 500 ms. + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ Core.prototype.setWindow = function (start, end, options) { - var animate; + var animation; if (arguments.length == 1) { var range = arguments[0]; - animate = range.animate !== undefined ? range.animate : true; - this.range.setRange(range.start, range.end, animate); + animation = range.animation !== undefined ? range.animation : true; + this.range.setRange(range.start, range.end, animation); } else { - animate = options && options.animate !== undefined ? options.animate : true; - this.range.setRange(start, end, animate); + animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(start, end, animation); } }; @@ -18156,11 +18043,12 @@ return /******/ (function(modules) { // webpackBootstrap * Move the window such that given time is centered on screen. * @param {Date | Number | String} time * @param {Object} [options] Available options: - * `animate: boolean | number` - * If true (default), the range is animated - * smoothly to the new window. - * If a number, the number is taken as duration - * for the animation. Default duration is 500 ms. + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. */ Core.prototype.moveTo = function (time, options) { var interval = this.range.end - this.range.start; @@ -18168,9 +18056,9 @@ return /******/ (function(modules) { // webpackBootstrap var start = t - interval / 2; var end = t + interval / 2; - var animate = options && options.animate !== undefined ? options.animate : true; + var animation = options && options.animation !== undefined ? options.animation : true; - this.range.setRange(start, end, animate); + this.range.setRange(start, end, animation); }; /** @@ -18315,7 +18203,7 @@ return /******/ (function(modules) { // webpackBootstrap // reposition the scrollable contents var offset = this.props.scrollTop; - if (options.orientation == 'bottom') { + if (options.orientation.item == 'bottom') { offset += Math.max(this.props.centerContainer.height - this.props.center.height - this.props.border.top - this.props.border.bottom, 0); } dom.center.style.left = '0'; @@ -18350,8 +18238,6 @@ return /******/ (function(modules) { // webpackBootstrap } this.redrawCount = 0; } - - this.emit('finishedRedraw'); }; // TODO: deprecated since version 1.1.0, remove some day @@ -18509,6 +18395,7 @@ return /******/ (function(modules) { // webpackBootstrap */ Core.prototype._onTouch = function (event) { this.touch.allowDragging = true; + this.touch.initialScrollTop = this.props.scrollTop; }; /** @@ -18520,15 +18407,6 @@ return /******/ (function(modules) { // webpackBootstrap this.touch.allowDragging = false; }; - /** - * Start moving the timeline vertically - * @param {Event} event - * @private - */ - Core.prototype._onDragStart = function (event) { - this.touch.initialScrollTop = this.props.scrollTop; - }; - /** * Move the timeline vertically * @param {Event} event @@ -18573,7 +18451,7 @@ return /******/ (function(modules) { // webpackBootstrap if (scrollTopMin != this.props.scrollTopMin) { // in case of bottom orientation, change the scrollTop such that the contents // do not move relative to the time axis at the bottom - if (this.options.orientation == 'bottom') { + if (this.options.orientation.item == 'bottom') { this.props.scrollTop += scrollTopMin - this.props.scrollTopMin; } this.props.scrollTopMin = scrollTopMin; @@ -18676,20 +18554,20 @@ return /******/ (function(modules) { // webpackBootstrap // English 'use strict'; - exports.en = { + exports['en'] = { current: 'current', time: 'time' }; - exports.en_EN = exports.en; - exports.en_US = exports.en; + exports['en_EN'] = exports['en']; + exports['en_US'] = exports['en']; // Dutch - exports.nl = { - current: 'aangepaste', + exports['nl'] = { + current: 'huidige', time: 'tijd' }; - exports.nl_NL = exports.nl; - exports.nl_BE = exports.nl; + exports['nl_NL'] = exports['nl']; + exports['nl_BE'] = exports['nl']; /***/ }, /* 47 */ @@ -19287,13 +19165,14 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var util = __webpack_require__(1); /** @@ -19428,23 +19307,23 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _Node = __webpack_require__(70); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _Node2 = _interopRequireWildcard(_Node); + var _componentsNode = __webpack_require__(71); - var _Label = __webpack_require__(71); + var _componentsNode2 = _interopRequireDefault(_componentsNode); - var _Label2 = _interopRequireWildcard(_Label); + var _componentsSharedLabel = __webpack_require__(72); + + var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); var util = __webpack_require__(1); var DataSet = __webpack_require__(3); @@ -19576,7 +19455,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'setOptions', value: function setOptions(options) { if (options !== undefined) { - _Node2['default'].parseOptions(this.options, options); + _componentsNode2['default'].parseOptions(this.options, options); // update the shape in all nodes if (options.shape !== undefined) { @@ -19589,7 +19468,7 @@ return /******/ (function(modules) { // webpackBootstrap // update the shape size in all nodes if (options.font !== undefined) { - _Label2['default'].parseOptions(this.options.font, options); + _componentsSharedLabel2['default'].parseOptions(this.options.font, options); for (var nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { this.body.nodes[nodeId].updateLabelModule(); @@ -19753,7 +19632,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param constructorClass */ value: function create(properties) { - var constructorClass = arguments[1] === undefined ? _Node2['default'] : arguments[1]; + var constructorClass = arguments[1] === undefined ? _componentsNode2['default'] : arguments[1]; return new constructorClass(properties, this.body, this.images, this.groups, this.options); } @@ -19901,23 +19780,23 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _Edge = __webpack_require__(72); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _Edge2 = _interopRequireWildcard(_Edge); + var _componentsEdge = __webpack_require__(73); - var _Label = __webpack_require__(71); + var _componentsEdge2 = _interopRequireDefault(_componentsEdge); - var _Label2 = _interopRequireWildcard(_Label); + var _componentsSharedLabel = __webpack_require__(72); + + var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); var util = __webpack_require__(1); var DataSet = __webpack_require__(3); @@ -20077,7 +19956,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { if (options !== undefined) { // use the parser from the Edge class to fill in all shorthand notations - _Edge2['default'].parseOptions(this.options, options); + _componentsEdge2['default'].parseOptions(this.options, options); // hanlde multiple input cases for color if (options.color !== undefined) { @@ -20097,7 +19976,7 @@ return /******/ (function(modules) { // webpackBootstrap // update fonts in all edges if (options.font !== undefined) { // use the parser from the Label class to fill in all shorthand notations - _Label2['default'].parseOptions(this.options, options); + _componentsSharedLabel2['default'].parseOptions(this.options, options); for (var edgeId in this.body.edges) { if (this.body.edges.hasOwnProperty(edgeId)) { this.body.edges[edgeId].updateLabelModule(); @@ -20187,7 +20066,7 @@ return /******/ (function(modules) { // webpackBootstrap oldEdge.disconnect(); } - var data = edgesData.get(id, { showInternalIds: true }); + var data = edgesData.get(id, { 'showInternalIds': true }); edges[id] = this.create(data); } @@ -20271,7 +20150,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'create', value: function create(properties) { - return new _Edge2['default'](properties, this.body, this.options); + return new _componentsEdge2['default'](properties, this.body, this.options); } }, { key: 'markAllEdgesAsDirty', @@ -20321,39 +20200,39 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _BarnesHutSolver = __webpack_require__(73); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _BarnesHutSolver2 = _interopRequireWildcard(_BarnesHutSolver); + var _componentsPhysicsBarnesHutSolver = __webpack_require__(74); - var _Repulsion = __webpack_require__(74); + var _componentsPhysicsBarnesHutSolver2 = _interopRequireDefault(_componentsPhysicsBarnesHutSolver); - var _Repulsion2 = _interopRequireWildcard(_Repulsion); + var _componentsPhysicsRepulsionSolver = __webpack_require__(75); - var _HierarchicalRepulsion = __webpack_require__(75); + var _componentsPhysicsRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsRepulsionSolver); - var _HierarchicalRepulsion2 = _interopRequireWildcard(_HierarchicalRepulsion); + var _componentsPhysicsHierarchicalRepulsionSolver = __webpack_require__(76); - var _SpringSolver = __webpack_require__(76); + var _componentsPhysicsHierarchicalRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalRepulsionSolver); - var _SpringSolver2 = _interopRequireWildcard(_SpringSolver); + var _componentsPhysicsSpringSolver = __webpack_require__(77); - var _HierarchicalSpringSolver = __webpack_require__(77); + var _componentsPhysicsSpringSolver2 = _interopRequireDefault(_componentsPhysicsSpringSolver); - var _HierarchicalSpringSolver2 = _interopRequireWildcard(_HierarchicalSpringSolver); + var _componentsPhysicsHierarchicalSpringSolver = __webpack_require__(78); - var _CentralGravitySolver = __webpack_require__(78); + var _componentsPhysicsHierarchicalSpringSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalSpringSolver); - var _CentralGravitySolver2 = _interopRequireWildcard(_CentralGravitySolver); + var _componentsPhysicsCentralGravitySolver = __webpack_require__(79); + + var _componentsPhysicsCentralGravitySolver2 = _interopRequireDefault(_componentsPhysicsCentralGravitySolver); var util = __webpack_require__(1); @@ -20472,20 +20351,20 @@ return /******/ (function(modules) { // webpackBootstrap var options; if (this.options.solver === 'repulsion') { options = this.options.repulsion; - this.nodesSolver = new _Repulsion2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _SpringSolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _componentsPhysicsRepulsionSolver2['default'](this.body, this.physicsBody, options); + this.edgesSolver = new _componentsPhysicsSpringSolver2['default'](this.body, this.physicsBody, options); } else if (this.options.solver === 'hierarchicalRepulsion') { options = this.options.hierarchicalRepulsion; - this.nodesSolver = new _HierarchicalRepulsion2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _HierarchicalSpringSolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _componentsPhysicsHierarchicalRepulsionSolver2['default'](this.body, this.physicsBody, options); + this.edgesSolver = new _componentsPhysicsHierarchicalSpringSolver2['default'](this.body, this.physicsBody, options); } else { // barnesHut options = this.options.barnesHut; - this.nodesSolver = new _BarnesHutSolver2['default'](this.body, this.physicsBody, options); - this.edgesSolver = new _SpringSolver2['default'](this.body, this.physicsBody, options); + this.nodesSolver = new _componentsPhysicsBarnesHutSolver2['default'](this.body, this.physicsBody, options); + this.edgesSolver = new _componentsPhysicsSpringSolver2['default'](this.body, this.physicsBody, options); } - this.gravitySolver = new _CentralGravitySolver2['default'](this.body, this.physicsBody, options); + this.gravitySolver = new _componentsPhysicsCentralGravitySolver2['default'](this.body, this.physicsBody, options); this.modelOptions = options; } }, { @@ -20897,19 +20776,19 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); - var _Cluster = __webpack_require__(79); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _Cluster2 = _interopRequireWildcard(_Cluster); + var _componentsNodesCluster = __webpack_require__(80); + + var _componentsNodesCluster2 = _interopRequireDefault(_componentsNodesCluster); var util = __webpack_require__(1); @@ -21271,7 +21150,7 @@ return /******/ (function(modules) { // webpackBootstrap clusterNodeProperties.id = clusterId; // create the clusterNode - var clusterNode = this.body.functions.createNode(clusterNodeProperties, _Cluster2["default"]); + var clusterNode = this.body.functions.createNode(clusterNodeProperties, _componentsNodesCluster2["default"]); clusterNode.isCluster = true; clusterNode.containedNodes = childNodesObj; clusterNode.containedEdges = childEdgesObj; @@ -21549,13 +21428,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + if (typeof window !== 'undefined') { window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; } @@ -21637,7 +21517,8 @@ return /******/ (function(modules) { // webpackBootstrap key: 'setOptions', value: function setOptions(options) { if (options !== undefined) { - util.deepExtend(this.options, options); + var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag']; + util.selectiveDeepExtend(fields, this.options, options); } } }, { @@ -21681,6 +21562,7 @@ return /******/ (function(modules) { // webpackBootstrap * chart will be resized too. */ value: function redraw() { + this.body.emitter.emit('setSize'); this._redraw(); } }, { @@ -21716,7 +21598,7 @@ return /******/ (function(modules) { // webpackBootstrap this.canvas.setSize(); } - if (this.pixelRation === undefined) { + if (this.pixelRatio === undefined) { this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); } @@ -21776,6 +21658,9 @@ return /******/ (function(modules) { // webpackBootstrap var nodeIndices = this.body.nodeIndices; var node; var selected = []; + var topLeft = this.canvas.DOMtoCanvas({ x: 0, y: 0 }); + var bottomRight = this.canvas.DOMtoCanvas({ x: this.canvas.frame.canvas.clientWidth, y: this.canvas.frame.canvas.clientHeight });; + var viewableArea = { top: topLeft.y, left: topLeft.x, bottom: bottomRight.y, right: bottomRight.x }; // draw unselected nodes; for (var i = 0; i < nodeIndices.length; i++) { @@ -21786,11 +21671,9 @@ return /******/ (function(modules) { // webpackBootstrap } else { if (alwaysShow === true) { node.draw(ctx); + } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) { + node.draw(ctx); } - // todo: replace check - //else if (node.inArea() === true) { - node.draw(ctx); - //} } } @@ -21879,13 +21762,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var Hammer = __webpack_require__(41); var hammerUtil = __webpack_require__(45); @@ -21933,6 +21817,7 @@ return /******/ (function(modules) { // webpackBootstrap _this.body.view.translation.y = obj.height * 0.5; } }); + this.body.emitter.on('setSize', this.setSize.bind(this)); this.body.emitter.on('destroy', function () { _this.hammerFrame.destroy(); _this.hammer.destroy(); @@ -21945,12 +21830,8 @@ return /******/ (function(modules) { // webpackBootstrap var _this2 = this; if (options !== undefined) { - if (options.width !== undefined) { - this.options.width = this._prepareValue(options.width); - } - if (options.height !== undefined) { - this.options.height = this._prepareValue(options.height); - } + var fields = ['width', 'height', 'autoResize']; + util.selectiveDeepExtend(fields, this.options, options); } if (this.options.autoResize === true) { @@ -22247,13 +22128,14 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var util = __webpack_require__(1); var View = (function () { @@ -22648,23 +22530,23 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _NavigationHandler = __webpack_require__(80); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NavigationHandler2 = _interopRequireWildcard(_NavigationHandler); + var _componentsNavigationHandler = __webpack_require__(108); - var _Popup = __webpack_require__(81); + var _componentsNavigationHandler2 = _interopRequireDefault(_componentsNavigationHandler); - var _Popup2 = _interopRequireWildcard(_Popup); + var _componentsPopup = __webpack_require__(109); + + var _componentsPopup2 = _interopRequireDefault(_componentsPopup); var util = __webpack_require__(1); @@ -22675,7 +22557,7 @@ return /******/ (function(modules) { // webpackBootstrap this.body = body; this.canvas = canvas; this.selectionHandler = selectionHandler; - this.navigationHandler = new _NavigationHandler2['default'](body, canvas); + this.navigationHandler = new _componentsNavigationHandler2['default'](body, canvas); // bind the events from hammer to functions in this object this.body.eventListeners.onTap = this.onTap.bind(this); @@ -22705,15 +22587,15 @@ return /******/ (function(modules) { // webpackBootstrap this.defaultOptions = { dragNodes: true, dragView: true, - zoomView: true, hoverEnabled: false, - navigationButtons: false, - tooltipDelay: 300, keyboard: { enabled: false, speed: { x: 10, y: 10, zoom: 0.02 }, bindToWindow: true - } + }, + navigationButtons: false, + tooltipDelay: 300, + zoomView: true }; util.extend(this.options, this.defaultOptions); @@ -22735,7 +22617,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { if (options !== undefined) { // extend all but the values in fields - var fields = ['keyboard']; + var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges']; util.selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in. @@ -22792,8 +22674,9 @@ return /******/ (function(modules) { // webpackBootstrap */ value: function onTap(event) { var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect && event.changedPointers[0].ctrlKey; - this.checkSelectionChanges(pointer, event); + this.checkSelectionChanges(pointer, event, multiselect); this.selectionHandler._generateClickEvent('click', event, pointer); } }, { @@ -22816,8 +22699,9 @@ return /******/ (function(modules) { // webpackBootstrap */ value: function onHold(event) { var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect; - this.checkSelectionChanges(pointer, event, true); + this.checkSelectionChanges(pointer, event, multiselect); this.selectionHandler._generateClickEvent('click', event, pointer); this.selectionHandler._generateClickEvent('hold', event, pointer); @@ -23043,7 +22927,7 @@ return /******/ (function(modules) { // webpackBootstrap var pointer = this.getPointer(event.center); this.drag.pinched = true; - if (this.pinch.scale === undefined) { + if (this.pinch['scale'] === undefined) { this.pinch.scale = 1; } @@ -23301,7 +23185,7 @@ return /******/ (function(modules) { // webpackBootstrap // show popup message window if (this.popupObj.id !== previousPopupObjId) { if (this.popup === undefined) { - this.popup = new _Popup2['default'](this.canvas.frame); + this.popup = new _componentsPopup2['default'](this.canvas.frame); } this.popup.popupTargetType = popupType; @@ -23374,14 +23258,15 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); - var Node = __webpack_require__(70); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var Node = __webpack_require__(71); var util = __webpack_require__(1); var SelectionHandler = (function () { @@ -23396,7 +23281,8 @@ return /******/ (function(modules) { // webpackBootstrap this.options = {}; this.defaultOptions = { - select: true, + multiselect: false, + selectable: true, selectConnectedEdges: true }; util.extend(this.options, this.defaultOptions); @@ -23410,7 +23296,8 @@ return /******/ (function(modules) { // webpackBootstrap key: "setOptions", value: function setOptions(options) { if (options !== undefined) { - util.deepExtend(this.options, options); + var fields = ["multiselect", "selectable", "selectConnectedEdges"]; + util.selectiveDeepExtend(fields, this.options, options); } } }, { @@ -23424,7 +23311,7 @@ return /******/ (function(modules) { // webpackBootstrap */ value: function selectOnPoint(pointer) { var selected = false; - if (this.options.select === true) { + if (this.options.selectable === true) { this.unselectAll(); var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);; if (obj !== undefined) { @@ -23438,7 +23325,7 @@ return /******/ (function(modules) { // webpackBootstrap key: "selectAdditionalOnPoint", value: function selectAdditionalOnPoint(pointer) { var selectionChanged = false; - if (this.options.select === true) { + if (this.options.selectable === true) { var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);; if (obj !== undefined) { @@ -23458,14 +23345,14 @@ return /******/ (function(modules) { // webpackBootstrap key: "_generateClickEvent", value: function _generateClickEvent(eventType, event, pointer, oldSelection) { var properties = this.getSelection(); - properties.pointer = { + properties["pointer"] = { DOM: { x: pointer.x, y: pointer.y }, canvas: this.canvas.DOMtoCanvas(pointer) }; - properties.event = event; + properties["event"] = event; if (oldSelection !== undefined) { - properties.previousSelection = oldSelection; + properties["previousSelection"] = oldSelection; } this.body.emitter.emit(eventType, properties); } @@ -23934,7 +23821,7 @@ return /******/ (function(modules) { // webpackBootstrap */ value: function getSelectedNodes() { var idArray = []; - if (this.options.select === true) { + if (this.options.selectable === true) { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { idArray.push(nodeId); @@ -23954,7 +23841,7 @@ return /******/ (function(modules) { // webpackBootstrap */ value: function getSelectedEdges() { var idArray = []; - if (this.options.select === true) { + if (this.options.selectable === true) { for (var edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { idArray.push(edgeId); @@ -24059,13 +23946,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var util = __webpack_require__(1); var LayoutEngine = (function () { @@ -24156,10 +24044,10 @@ return /******/ (function(modules) { // webpackBootstrap if (options.physics.solver !== undefined) { this.optionsBackup.physics = { solver: options.physics.solver }; } - allOptions.physics.solver = 'hierarchicalRepulsion'; + allOptions.physics['solver'] = 'hierarchicalRepulsion'; } else if (options.physics !== false) { this.optionsBackup.physics = { solver: 'barnesHut' }; - allOptions.physics.solver = 'hierarchicalRepulsion'; + allOptions.physics['solver'] = 'hierarchicalRepulsion'; } // get the type of static smooth curve in case it is required @@ -24415,9 +24303,9 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ value: function _setLevel(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) { - return; - }var childNode = undefined; + if (this.hierarchicalLevels[node.id] !== undefined) return; + + var childNode = undefined; this.hierarchicalLevels[node.id] = level; for (var i = 0; i < node.edges.length; i++) { if (node.edges[i].toId === node.id) { @@ -24476,9 +24364,9 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ value: function _setLevelDirected(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) { - return; - }var childNode = undefined; + if (this.hierarchicalLevels[node.id] !== undefined) return; + + var childNode = undefined; this.hierarchicalLevels[node.id] = level; for (var i = 0; i < node.edges.length; i++) { @@ -24555,18 +24443,17 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var util = __webpack_require__(1); var Hammer = __webpack_require__(41); var hammerUtil = __webpack_require__(45); - var locales = __webpack_require__(82); /** * clears the toolbar div element of children @@ -24603,8 +24490,6 @@ return /******/ (function(modules) { // webpackBootstrap this.defaultOptions = { enabled: false, initiallyActive: false, - locale: 'en', - locales: locales, addNode: true, addEdge: true, editNode: undefined, @@ -24651,7 +24536,16 @@ return /******/ (function(modules) { // webpackBootstrap * Set the Options * @param options */ - value: function setOptions(options) { + value: function setOptions(options, allOptions) { + if (allOptions !== undefined) { + if (allOptions.locale !== undefined) { + this.options.locale = allOptions.locale; + }; + if (allOptions.locales !== undefined) { + this.options.locales = allOptions.locales; + }; + } + if (options !== undefined) { if (typeof options === 'boolean') { this.options.enabled = options; @@ -24811,7 +24705,7 @@ return /******/ (function(modules) { // webpackBootstrap this.manipulationDOM = {}; this._createBackButton(locale); this._createSeperator(); - this._createDescription(locale.addDescription || this.options.locales.en.addDescription); + this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); // bind the close button this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); @@ -24858,7 +24752,7 @@ return /******/ (function(modules) { // webpackBootstrap throw new Error('The function for edit does not support two arguments (data, callback)'); } } else { - alert(this.options.locales[this.options.locale].editClusterError || this.options.locales.en.editClusterError); + alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']); } } else { throw new Error('No function has been configured to handle the editing of nodes.'); @@ -24887,7 +24781,7 @@ return /******/ (function(modules) { // webpackBootstrap this.manipulationDOM = {}; this._createBackButton(locale); this._createSeperator(); - this._createDescription(locale.edgeDescription || this.options.locales.en.edgeDescription); + this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); // bind the close button this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); @@ -24925,7 +24819,7 @@ return /******/ (function(modules) { // webpackBootstrap this.manipulationDOM = {}; this._createBackButton(locale); this._createSeperator(); - this._createDescription(locale.editEdgeDescription || this.options.locales.en.editEdgeDescription); + this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); // bind the close button this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); @@ -24997,7 +24891,7 @@ return /******/ (function(modules) { // webpackBootstrap if (selectedNodes.length > 0) { for (var i = 0; i < selectedNodes.length; i++) { if (this.body.nodes[selectedNodes[i]].isCluster === true) { - alert(this.options.locales[this.options.locale].deleteClusterError || this.options.locales.en.deleteClusterError); + alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']); return; } } @@ -25137,7 +25031,7 @@ return /******/ (function(modules) { // webpackBootstrap // create the contents for the editMode button var locale = this.options.locales[this.options.locale]; - var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale.edit || this.options.locales.en.edit); + var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']); this.editModeDiv.appendChild(button); // bind a hammer listener to the button, calling the function toggleEditMode. @@ -25238,42 +25132,42 @@ return /******/ (function(modules) { // webpackBootstrap // ---------------------- DOM functions for buttons --------------------------// value: function _createAddNodeButton(locale) { - var button = this._createButton('addNode', 'vis-button vis-add', locale.addNode || this.options.locales.en.addNode); + var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.addNodeMode.bind(this)); } }, { key: '_createAddEdgeButton', value: function _createAddEdgeButton(locale) { - var button = this._createButton('addEdge', 'vis-button vis-connect', locale.addEdge || this.options.locales.en.addEdge); + var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.addEdgeMode.bind(this)); } }, { key: '_createEditNodeButton', value: function _createEditNodeButton(locale) { - var button = this._createButton('editNodeMode', 'vis-button vis-edit', locale.editNode || this.options.locales.en.editNode); + var button = this._createButton('editNodeMode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.editNodeMode.bind(this)); } }, { key: '_createEditEdgeButton', value: function _createEditEdgeButton(locale) { - var button = this._createButton('editEdge', 'vis-button vis-edit', locale.editEdge || this.options.locales.en.editEdge); + var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.editEdgeMode.bind(this)); } }, { key: '_createDeleteButton', value: function _createDeleteButton(locale) { - var button = this._createButton('delete', 'vis-button vis-delete', locale.del || this.options.locales.en.del); + var button = this._createButton('delete', 'vis-button vis-delete', locale['del'] || this.options.locales['en']['del']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.deleteSelected.bind(this)); } }, { key: '_createBackButton', value: function _createBackButton(locale) { - var button = this._createButton('back', 'vis-button vis-back', locale.back || this.options.locales.en.back); + var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']); this.manipulationDiv.appendChild(button); this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this)); } @@ -25494,7 +25388,7 @@ return /******/ (function(modules) { // webpackBootstrap // perform the connection if (node !== undefined && this.selectedControlNode !== undefined) { if (node.isCluster === true) { - alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError); + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); } else { var from = this.body.nodes[this.temporaryIds.nodes[0]]; if (this.selectedControlNode.id === from.id) { @@ -25532,7 +25426,7 @@ return /******/ (function(modules) { // webpackBootstrap if (node !== undefined) { if (node.isCluster === true) { - alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError); + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); } else { // create a node the temporary line can look at var targetNode = this._getNewTargetNode(node.x, node.y); @@ -25612,7 +25506,7 @@ return /******/ (function(modules) { // webpackBootstrap // perform the connection if (node !== undefined) { if (node.isCluster === true) { - alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError); + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); } else { if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) { this._performAddEdge(connectFromId, node.id); @@ -25738,19 +25632,19 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _ColorPicker = __webpack_require__(83); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _ColorPicker2 = _interopRequireWildcard(_ColorPicker); + var _componentsColorPicker = __webpack_require__(81); + + var _componentsColorPicker2 = _interopRequireDefault(_componentsColorPicker); var util = __webpack_require__(1); @@ -25790,7 +25684,7 @@ return /******/ (function(modules) { // webpackBootstrap this.configureOptions = configureOptions; this.moduleOptions = {}; this.domElements = []; - this.colorPicker = new _ColorPicker2['default'](pixelRatio); + this.colorPicker = new _componentsColorPicker2['default'](pixelRatio); this.wrapper; } @@ -26300,13 +26194,15 @@ return /******/ (function(modules) { // webpackBootstrap value = value === 'false' ? false : value; for (var i = 0; i < path.length; i++) { - if (pointer[path[i]] === undefined) { - pointer[path[i]] = {}; - } - if (i !== path.length - 1) { - pointer = pointer[path[i]]; - } else { - pointer[path[i]] = value; + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } else { + pointer[path[i]] = value; + } } } return optionsObj; @@ -26334,13 +26230,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var util = __webpack_require__(1); var errorFound = false; @@ -26406,7 +26303,7 @@ return /******/ (function(modules) { // webpackBootstrap } else if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. if (Validator.getType(options[option]) === 'object') { - Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions.__any__.__type__, path); + Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'].__type__, path); } } else { // Since all options in the reference are objects, we can check whether they are supposed to be object to look for the __type__ field. @@ -26448,7 +26345,7 @@ return /******/ (function(modules) { // webpackBootstrap Validator.parse(options[option], referenceOptions[referenceOption], path); } } else { - if (refOptionObj.undef !== undefined && optionType === 'undefined') {} else if (refOptionObj.fn !== undefined && optionType === 'function') {} else { + if (refOptionObj['undef'] !== undefined && optionType === 'undefined') {} else if (refOptionObj['fn'] !== undefined && optionType === 'function') {} else { // type of the field is incorrect console.log('%cInvalid type received for "' + option + '". Expected: ' + Validator.print(Object.keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"' + Validator.printLocation(path, option), printStyle); errorFound = true; @@ -26592,11 +26489,10 @@ return /******/ (function(modules) { // webpackBootstrap THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ value: function levenshteinDistance(a, b) { - if (a.length === 0) { - return b.length; - }if (b.length === 0) { - return a.length; - }var matrix = []; + if (a.length === 0) return b.length; + if (b.length === 0) return a.length; + + var matrix = []; // increment along the first column of each row var i; @@ -26657,29 +26553,18 @@ return /******/ (function(modules) { // webpackBootstrap var boolean = 'boolean'; var number = 'number'; var array = 'array'; - var object = 'object'; + var object = 'object'; // should only be in a __type__ property var dom = 'dom'; var fn = 'function'; var undef = 'undefined'; + var any = 'any'; var allOptions = { - canvas: { - width: { string: string }, - height: { string: string }, - autoResize: { boolean: boolean }, - __type__: { object: object } - }, - rendering: { - hideEdgesOnDrag: { boolean: boolean }, - hideNodesOnDrag: { boolean: boolean }, - __type__: { object: object } - }, - clustering: {}, configure: { enabled: { boolean: boolean }, - filter: { boolean: boolean, string: ['nodes', 'edges', 'layout', 'physics', 'manipulation', 'interaction', 'selection', 'rendering'], array: array }, + filter: { boolean: boolean, string: string, array: array }, container: { dom: dom }, - __type__: { object: object, boolean: boolean, string: ['nodes', 'edges', 'layout', 'physics', 'manipulation', 'interaction', 'selection', 'rendering'], array: array } + __type__: { object: object, boolean: boolean, string: string, array: array } }, edges: { arrows: { @@ -26749,22 +26634,27 @@ return /******/ (function(modules) { // webpackBootstrap }, groups: { useDefaultGroups: { boolean: boolean }, - __any__: ['__ref__', 'nodes'], + __any__: 'get from nodes, will be overwritten below', __type__: { object: object } }, interaction: { dragNodes: { boolean: boolean }, dragView: { boolean: boolean }, - zoomView: { boolean: boolean }, + hideEdgesOnDrag: { boolean: boolean }, + hideNodesOnDrag: { boolean: boolean }, hoverEnabled: { boolean: boolean }, - navigationButtons: { boolean: boolean }, - tooltipDelay: { number: number }, keyboard: { enabled: { boolean: boolean }, speed: { x: { number: number }, y: { number: number }, zoom: { number: number }, __type__: { object: object } }, bindToWindow: { boolean: boolean }, __type__: { object: object, boolean: boolean } }, + multiselect: { boolean: boolean }, + navigationButtons: { boolean: boolean }, + selectable: { boolean: boolean }, + selectConnectedEdges: { boolean: boolean }, + tooltipDelay: { number: number }, + zoomView: { boolean: boolean }, __type__: { object: object } }, layout: { @@ -26781,15 +26671,13 @@ return /******/ (function(modules) { // webpackBootstrap manipulation: { enabled: { boolean: boolean }, initiallyActive: { boolean: boolean }, - locale: { string: string }, - locales: { object: object }, addNode: { boolean: boolean, fn: fn }, addEdge: { boolean: boolean, fn: fn }, editNode: { fn: fn }, editEdge: { boolean: boolean, fn: fn }, deleteNode: { boolean: boolean, fn: fn }, deleteEdge: { boolean: boolean, fn: fn }, - controlNodeStyle: ['__ref__', 'nodes'], + controlNodeStyle: 'get from nodes, will be overwritten below', __type__: { object: object, boolean: boolean } }, nodes: { @@ -26908,19 +26796,22 @@ return /******/ (function(modules) { // webpackBootstrap timestep: { number: number }, __type__: { object: object, boolean: boolean } }, - selection: { - selectable: { boolean: boolean }, - selectConnectedEdges: { boolean: boolean }, + + //globals : + autoResize: { boolean: boolean }, + clickToUse: { boolean: boolean }, + locale: { string: string }, + locales: { + __any__: { object: object }, __type__: { object: object } }, - view: {}, + height: { string: string }, + width: { string: string }, __type__: { object: object } }; allOptions.groups.__any__ = allOptions.nodes; allOptions.manipulation.controlNodeStyle = allOptions.nodes; - //allOptions.locale = allOptions.manipulation.locale; - //allOptions.locales = allOptions.manipulation.locales; var configureOptions = { nodes: { @@ -27045,20 +26936,24 @@ return /******/ (function(modules) { // webpackBootstrap interaction: { dragNodes: true, dragView: true, - zoomView: true, + hideEdgesOnDrag: false, + hideNodesOnDrag: false, hoverEnabled: false, - navigationButtons: false, - tooltipDelay: [300, 0, 1000, 25], keyboard: { enabled: false, speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] }, bindToWindow: true - } + }, + multiselect: false, + navigationButtons: false, + selectable: true, + selectConnectedEdges: true, + tooltipDelay: [300, 0, 1000, 25], + zoomView: true }, manipulation: { enabled: false, - initiallyActive: false, - locale: ['en', 'nl'] + initiallyActive: false }, physics: { barnesHut: { @@ -27088,13 +26983,8 @@ return /******/ (function(modules) { // webpackBootstrap solver: ['barnesHut', 'repulsion', 'hierarchicalRepulsion'], timestep: [0.5, 0, 1, 0.05] }, - selection: { - selectable: true, - selectConnectedEdges: true - }, - rendering: { - hideEdgesOnDrag: false, - hideNodesOnDrag: false + global: { + locale: ['en', 'nl'] } }; @@ -27391,7 +27281,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var keycharm = __webpack_require__(84); + var keycharm = __webpack_require__(82); var Emitter = __webpack_require__(43); var Hammer = __webpack_require__(41); var util = __webpack_require__(1); @@ -27540,6 +27430,50 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 67 */ +/***/ function(module, exports, __webpack_require__) { + + // English + 'use strict'; + + exports['en'] = { + edit: 'Edit', + del: 'Delete selected', + back: 'Back', + addNode: 'Add Node', + addEdge: 'Add Edge', + editNode: 'Edit Node', + editEdge: 'Edit Edge', + addDescription: 'Click in an empty space to place a new node.', + edgeDescription: 'Click on a node and drag the edge to another node to connect them.', + editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', + createEdgeError: 'Cannot link edges to a cluster.', + deleteClusterError: 'Clusters cannot be deleted.', + editClusterError: 'Clusters cannot be edited.' + }; + exports['en_EN'] = exports['en']; + exports['en_US'] = exports['en']; + + // Dutch + exports['nl'] = { + edit: 'Wijzigen', + del: 'Selectie verwijderen', + back: 'Terug', + addNode: 'Node toevoegen', + addEdge: 'Link toevoegen', + editNode: 'Node wijzigen', + editEdge: 'Link wijzigen', + addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', + edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.', + editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', + createEdgeError: 'Kan geen link maken naar een cluster.', + deleteClusterError: 'Clusters kunnen niet worden verwijderd.', + editClusterError: 'Clusters kunnen niet worden aangepast.' + }; + exports['nl_NL'] = exports['nl']; + exports['nl_BE'] = exports['nl']; + +/***/ }, +/* 68 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {//! moment.js @@ -30625,10 +30559,10 @@ return /******/ (function(modules) { // webpackBootstrap return _moment; })); - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(86)(module))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module))) /***/ }, -/* 68 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; @@ -30856,7 +30790,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 69 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.4 - 2014-09-28 @@ -33311,7 +33245,7 @@ return /******/ (function(modules) { // webpackBootstrap prefixed: prefixed }); - if ("function" == TYPE_FUNCTION && __webpack_require__(87)) { + if ("function" == TYPE_FUNCTION && __webpack_require__(85)) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return Hammer; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -33325,84 +33259,84 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 70 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _Label = __webpack_require__(71); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _Label2 = _interopRequireWildcard(_Label); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _Box = __webpack_require__(88); + var _sharedLabel = __webpack_require__(72); - var _Box2 = _interopRequireWildcard(_Box); + var _sharedLabel2 = _interopRequireDefault(_sharedLabel); - var _Circle = __webpack_require__(89); + var _nodesShapesBox = __webpack_require__(86); - var _Circle2 = _interopRequireWildcard(_Circle); + var _nodesShapesBox2 = _interopRequireDefault(_nodesShapesBox); - var _CircularImage = __webpack_require__(90); + var _nodesShapesCircle = __webpack_require__(87); - var _CircularImage2 = _interopRequireWildcard(_CircularImage); + var _nodesShapesCircle2 = _interopRequireDefault(_nodesShapesCircle); - var _Database = __webpack_require__(91); + var _nodesShapesCircularImage = __webpack_require__(88); - var _Database2 = _interopRequireWildcard(_Database); + var _nodesShapesCircularImage2 = _interopRequireDefault(_nodesShapesCircularImage); - var _Diamond = __webpack_require__(92); + var _nodesShapesDatabase = __webpack_require__(89); - var _Diamond2 = _interopRequireWildcard(_Diamond); + var _nodesShapesDatabase2 = _interopRequireDefault(_nodesShapesDatabase); - var _Dot = __webpack_require__(93); + var _nodesShapesDiamond = __webpack_require__(90); - var _Dot2 = _interopRequireWildcard(_Dot); + var _nodesShapesDiamond2 = _interopRequireDefault(_nodesShapesDiamond); - var _Ellipse = __webpack_require__(94); + var _nodesShapesDot = __webpack_require__(91); - var _Ellipse2 = _interopRequireWildcard(_Ellipse); + var _nodesShapesDot2 = _interopRequireDefault(_nodesShapesDot); - var _Icon = __webpack_require__(95); + var _nodesShapesEllipse = __webpack_require__(92); - var _Icon2 = _interopRequireWildcard(_Icon); + var _nodesShapesEllipse2 = _interopRequireDefault(_nodesShapesEllipse); - var _Image = __webpack_require__(96); + var _nodesShapesIcon = __webpack_require__(93); - var _Image2 = _interopRequireWildcard(_Image); + var _nodesShapesIcon2 = _interopRequireDefault(_nodesShapesIcon); - var _Square = __webpack_require__(97); + var _nodesShapesImage = __webpack_require__(94); - var _Square2 = _interopRequireWildcard(_Square); + var _nodesShapesImage2 = _interopRequireDefault(_nodesShapesImage); - var _Star = __webpack_require__(98); + var _nodesShapesSquare = __webpack_require__(95); - var _Star2 = _interopRequireWildcard(_Star); + var _nodesShapesSquare2 = _interopRequireDefault(_nodesShapesSquare); - var _Text = __webpack_require__(99); + var _nodesShapesStar = __webpack_require__(96); - var _Text2 = _interopRequireWildcard(_Text); + var _nodesShapesStar2 = _interopRequireDefault(_nodesShapesStar); - var _Triangle = __webpack_require__(100); + var _nodesShapesText = __webpack_require__(97); - var _Triangle2 = _interopRequireWildcard(_Triangle); + var _nodesShapesText2 = _interopRequireDefault(_nodesShapesText); - var _TriangleDown = __webpack_require__(101); + var _nodesShapesTriangle = __webpack_require__(98); - var _TriangleDown2 = _interopRequireWildcard(_TriangleDown); + var _nodesShapesTriangle2 = _interopRequireDefault(_nodesShapesTriangle); + + var _nodesShapesTriangleDown = __webpack_require__(99); + + var _nodesShapesTriangleDown2 = _interopRequireDefault(_nodesShapesTriangleDown); var _Validator = __webpack_require__(63); - var _Validator2 = _interopRequireWildcard(_Validator); + var _Validator2 = _interopRequireDefault(_Validator); var util = __webpack_require__(1); @@ -33455,7 +33389,7 @@ return /******/ (function(modules) { // webpackBootstrap this.selected = false; this.hover = false; - this.labelModule = new _Label2['default'](this.body, this.options); + this.labelModule = new _sharedLabel2['default'](this.body, this.options); this.setOptions(options); } @@ -33572,49 +33506,49 @@ return /******/ (function(modules) { // webpackBootstrap // choose draw method depending on the shape switch (this.options.shape) { case 'box': - this.shape = new _Box2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesBox2['default'](this.options, this.body, this.labelModule); break; case 'circle': - this.shape = new _Circle2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesCircle2['default'](this.options, this.body, this.labelModule); break; case 'circularImage': - this.shape = new _CircularImage2['default'](this.options, this.body, this.labelModule, this.imageObj); + this.shape = new _nodesShapesCircularImage2['default'](this.options, this.body, this.labelModule, this.imageObj); break; case 'database': - this.shape = new _Database2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesDatabase2['default'](this.options, this.body, this.labelModule); break; case 'diamond': - this.shape = new _Diamond2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesDiamond2['default'](this.options, this.body, this.labelModule); break; case 'dot': - this.shape = new _Dot2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesDot2['default'](this.options, this.body, this.labelModule); break; case 'ellipse': - this.shape = new _Ellipse2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesEllipse2['default'](this.options, this.body, this.labelModule); break; case 'icon': - this.shape = new _Icon2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesIcon2['default'](this.options, this.body, this.labelModule); break; case 'image': - this.shape = new _Image2['default'](this.options, this.body, this.labelModule, this.imageObj); + this.shape = new _nodesShapesImage2['default'](this.options, this.body, this.labelModule, this.imageObj); break; case 'square': - this.shape = new _Square2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesSquare2['default'](this.options, this.body, this.labelModule); break; case 'star': - this.shape = new _Star2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesStar2['default'](this.options, this.body, this.labelModule); break; case 'text': - this.shape = new _Text2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesText2['default'](this.options, this.body, this.labelModule); break; case 'triangle': - this.shape = new _Triangle2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesTriangle2['default'](this.options, this.body, this.labelModule); break; case 'triangleDown': - this.shape = new _TriangleDown2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesTriangleDown2['default'](this.options, this.body, this.labelModule); break; default: - this.shape = new _Ellipse2['default'](this.options, this.body, this.labelModule); + this.shape = new _nodesShapesEllipse2['default'](this.options, this.body, this.labelModule); break; } this._reset(); @@ -33759,6 +33693,17 @@ return /******/ (function(modules) { // webpackBootstrap value: function isOverlappingWith(obj) { return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top; } + }, { + key: 'isBoundingBoxOverlappingWith', + + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + value: function isBoundingBoxOverlappingWith(obj) { + return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top; + } }], [{ key: 'parseOptions', @@ -33809,20 +33754,21 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 71 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _slicedToArray = function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var util = __webpack_require__(1); var Label = (function () { @@ -33873,13 +33819,13 @@ return /******/ (function(modules) { // webpackBootstrap var baseline = arguments[4] === undefined ? 'middle' : arguments[4]; // if no label, return - if (this.options.label === undefined) { - return; - } // check if we have to render the label + if (this.options.label === undefined) return; + + // check if we have to render the label var viewFontSize = this.options.font.size * this.body.view.scale; - if (this.options.label && viewFontSize < this.options.scaling.label.drawThreshold - 1) { - return; - } // update the size cache if required + if (this.options.label && viewFontSize < this.options.scaling.label.drawThreshold - 1) return; + + // update the size cache if required this.calculateLabelSize(ctx, selected, x, y, baseline); // create the fontfill background @@ -34123,36 +34069,36 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 72 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - var _Label = __webpack_require__(71); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _sharedLabel = __webpack_require__(72); - var _Label2 = _interopRequireWildcard(_Label); + var _sharedLabel2 = _interopRequireDefault(_sharedLabel); - var _BezierEdgeDynamic = __webpack_require__(102); + var _edgesBezierEdgeDynamic = __webpack_require__(100); - var _BezierEdgeDynamic2 = _interopRequireWildcard(_BezierEdgeDynamic); + var _edgesBezierEdgeDynamic2 = _interopRequireDefault(_edgesBezierEdgeDynamic); - var _BezierEdgeStatic = __webpack_require__(103); + var _edgesBezierEdgeStatic = __webpack_require__(101); - var _BezierEdgeStatic2 = _interopRequireWildcard(_BezierEdgeStatic); + var _edgesBezierEdgeStatic2 = _interopRequireDefault(_edgesBezierEdgeStatic); - var _StraightEdge = __webpack_require__(104); + var _edgesStraightEdge = __webpack_require__(102); - var _StraightEdge2 = _interopRequireWildcard(_StraightEdge); + var _edgesStraightEdge2 = _interopRequireDefault(_edgesStraightEdge); var util = __webpack_require__(1); @@ -34201,7 +34147,7 @@ return /******/ (function(modules) { // webpackBootstrap this.connected = false; - this.labelModule = new _Label2['default'](this.body, this.options); + this.labelModule = new _sharedLabel2['default'](this.body, this.options); this.setOptions(options); } @@ -34274,13 +34220,13 @@ return /******/ (function(modules) { // webpackBootstrap var dataChanged = false; var changeInType = true; if (this.edgeType !== undefined) { - if (this.edgeType instanceof _BezierEdgeDynamic2['default'] && this.options.smooth.enabled === true && this.options.smooth.dynamic === true) { + if (this.edgeType instanceof _edgesBezierEdgeDynamic2['default'] && this.options.smooth.enabled === true && this.options.smooth.dynamic === true) { changeInType = false; } - if (this.edgeType instanceof _BezierEdgeStatic2['default'] && this.options.smooth.enabled === true && this.options.smooth.dynamic === false) { + if (this.edgeType instanceof _edgesBezierEdgeStatic2['default'] && this.options.smooth.enabled === true && this.options.smooth.dynamic === false) { changeInType = false; } - if (this.edgeType instanceof _StraightEdge2['default'] && this.options.smooth.enabled === false) { + if (this.edgeType instanceof _edgesStraightEdge2['default'] && this.options.smooth.enabled === false) { changeInType = false; } @@ -34293,12 +34239,12 @@ return /******/ (function(modules) { // webpackBootstrap if (this.options.smooth.enabled === true) { if (this.options.smooth.dynamic === true) { dataChanged = true; - this.edgeType = new _BezierEdgeDynamic2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _edgesBezierEdgeDynamic2['default'](this.options, this.body, this.labelModule); } else { - this.edgeType = new _BezierEdgeStatic2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _edgesBezierEdgeStatic2['default'](this.options, this.body, this.labelModule); } } else { - this.edgeType = new _StraightEdge2['default'](this.options, this.body, this.labelModule); + this.edgeType = new _edgesStraightEdge2['default'](this.options, this.body, this.labelModule); } } else { // if nothing changes, we just set the options. @@ -34674,19 +34620,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 73 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var BarnesHutSolver = (function () { function BarnesHutSolver(body, physicsBody, options) { _classCallCheck(this, BarnesHutSolver); @@ -35154,19 +35100,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 74 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var RepulsionSolver = (function () { function RepulsionSolver(body, physicsBody, options) { _classCallCheck(this, RepulsionSolver); @@ -35249,19 +35195,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 75 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var HierarchicalRepulsionSolver = (function () { function HierarchicalRepulsionSolver(body, physicsBody, options) { _classCallCheck(this, HierarchicalRepulsionSolver); @@ -35340,19 +35286,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 76 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var SpringSolver = (function () { function SpringSolver(body, physicsBody, options) { _classCallCheck(this, SpringSolver); @@ -35449,19 +35395,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 77 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var HierarchicalSpringSolver = (function () { function HierarchicalSpringSolver(body, physicsBody, options) { _classCallCheck(this, HierarchicalSpringSolver); @@ -35570,19 +35516,19 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 78 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, "__esModule", { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var CentralGravitySolver = (function () { function CentralGravitySolver(body, physicsBody, options) { _classCallCheck(this, CentralGravitySolver); @@ -35629,26 +35575,28 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 79 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; + Object.defineProperty(exports, '__esModule', { + value: true + }); - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _Node2 = __webpack_require__(70); + var _Node2 = __webpack_require__(71); - var _Node3 = _interopRequireWildcard(_Node2); + var _Node3 = _interopRequireDefault(_Node2); /** * @@ -35673,458 +35621,20 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = Cluster; module.exports = exports['default']; -/***/ }, -/* 80 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - var util = __webpack_require__(1); - var Hammer = __webpack_require__(41); - var hammerUtil = __webpack_require__(45); - var keycharm = __webpack_require__(84); - - var NavigationHandler = (function () { - function NavigationHandler(body, canvas) { - var _this = this; - - _classCallCheck(this, NavigationHandler); - - this.body = body; - this.canvas = canvas; - - this.iconsCreated = false; - this.navigationHammers = []; - this.boundFunctions = {}; - this.touchTime = 0; - this.activated = false; - - this.body.emitter.on('release', function () { - _this._stopMovement(); - }); - this.body.emitter.on('activate', function () { - _this.activated = true;_this.configureKeyboardBindings(); - }); - this.body.emitter.on('deactivate', function () { - _this.activated = false;_this.configureKeyboardBindings(); - }); - this.body.emitter.on('destroy', function () { - if (_this.keycharm !== undefined) { - _this.keycharm.destroy(); - } - }); - - this.options = {}; - } - - _createClass(NavigationHandler, [{ - key: 'setOptions', - value: function setOptions(options) { - if (options !== undefined) { - this.options = options; - this.create(); - } - } - }, { - key: 'create', - value: function create() { - if (this.options.navigationButtons === true) { - if (this.iconsCreated === false) { - this.loadNavigationElements(); - } - } else if (this.iconsCreated === true) { - this.cleanNavigation(); - } - - this.configureKeyboardBindings(); - } - }, { - key: 'cleanNavigation', - value: function cleanNavigation() { - // clean hammer bindings - if (this.navigationHammers.length != 0) { - for (var i = 0; i < this.navigationHammers.length; i++) { - this.navigationHammers[i].destroy(); - } - this.navigationHammers = []; - } - - this._navigationReleaseOverload = function () {}; - - // clean up previous navigation items - if (this.navigationDOM && this.navigationDOM.wrapper && this.navigationDOM.wrapper.parentNode) { - this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper); - } - - this.iconsCreated = false; - } - }, { - key: 'loadNavigationElements', - - /** - * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation - * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent - * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. - * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. - * - * @private - */ - value: function loadNavigationElements() { - this.cleanNavigation(); - - this.navigationDOM = {}; - var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends']; - var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit']; - - this.navigationDOM.wrapper = document.createElement('div'); - this.navigationDOM.wrapper.className = 'vis-navigation'; - this.canvas.frame.appendChild(this.navigationDOM.wrapper); - - for (var i = 0; i < navigationDivs.length; i++) { - this.navigationDOM[navigationDivs[i]] = document.createElement('div'); - this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i]; - this.navigationDOM.wrapper.appendChild(this.navigationDOM[navigationDivs[i]]); - - var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]); - if (navigationDivActions[i] === '_fit') { - hammerUtil.onTouch(hammer, this._fit.bind(this)); - } else { - hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this, navigationDivActions[i])); - } - - this.navigationHammers.push(hammer); - } - - this.iconsCreated = true; - } - }, { - key: 'bindToRedraw', - value: function bindToRedraw(action) { - if (this.boundFunctions[action] === undefined) { - this.boundFunctions[action] = this[action].bind(this); - this.body.emitter.on('initRedraw', this.boundFunctions[action]); - this.body.emitter.emit('_startRendering'); - } - } - }, { - key: 'unbindFromRedraw', - value: function unbindFromRedraw(action) { - if (this.boundFunctions[action] !== undefined) { - this.body.emitter.off('initRedraw', this.boundFunctions[action]); - this.body.emitter.emit('_stopRendering'); - delete this.boundFunctions[action]; - } - } - }, { - key: '_fit', - - /** - * this stops all movement induced by the navigation buttons - * - * @private - */ - value: function _fit() { - if (new Date().valueOf() - this.touchTime > 700) { - // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?) - this.body.emitter.emit('fit', { duration: 700 }); - this.touchTime = new Date().valueOf(); - } - } - }, { - key: '_stopMovement', - - /** - * this stops all movement induced by the navigation buttons - * - * @private - */ - value: function _stopMovement() { - for (var boundAction in this.boundFunctions) { - if (this.boundFunctions.hasOwnProperty(boundAction)) { - this.body.emitter.off('initRedraw', this.boundFunctions[boundAction]); - this.body.emitter.emit('_stopRendering'); - } - } - this.boundFunctions = {}; - } - }, { - key: '_moveUp', - value: function _moveUp() { - this.body.view.translation.y += this.options.keyboard.speed.y; - } - }, { - key: '_moveDown', - value: function _moveDown() { - this.body.view.translation.y -= this.options.keyboard.speed.y; - } - }, { - key: '_moveLeft', - value: function _moveLeft() { - this.body.view.translation.x += this.options.keyboard.speed.x; - } - }, { - key: '_moveRight', - value: function _moveRight() { - this.body.view.translation.x -= this.options.keyboard.speed.x; - } - }, { - key: '_zoomIn', - value: function _zoomIn() { - this.body.view.scale *= 1 + this.options.keyboard.speed.zoom; - } - }, { - key: '_zoomOut', - value: function _zoomOut() { - this.body.view.scale /= 1 + this.options.keyboard.speed.zoom; - } - }, { - key: 'configureKeyboardBindings', - - /** - * bind all keys using keycharm. - */ - value: function configureKeyboardBindings() { - if (this.keycharm !== undefined) { - this.keycharm.destroy(); - } - - if (this.options.keyboard.enabled === true) { - - if (this.options.keyboard.bindToWindow === true) { - this.keycharm = keycharm({ container: window, preventDefault: true }); - } else { - this.keycharm = keycharm({ container: this.canvas.frame, preventDefault: true }); - } - - this.keycharm.reset(); - - if (this.activated === true) { - this.keycharm.bind('up', this.bindToRedraw.bind(this, '_moveUp'), 'keydown'); - this.keycharm.bind('down', this.bindToRedraw.bind(this, '_moveDown'), 'keydown'); - this.keycharm.bind('left', this.bindToRedraw.bind(this, '_moveLeft'), 'keydown'); - this.keycharm.bind('right', this.bindToRedraw.bind(this, '_moveRight'), 'keydown'); - this.keycharm.bind('=', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); - this.keycharm.bind('num+', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); - this.keycharm.bind('num-', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); - this.keycharm.bind('-', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); - this.keycharm.bind('[', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); - this.keycharm.bind(']', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); - this.keycharm.bind('pageup', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); - this.keycharm.bind('pagedown', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); - - this.keycharm.bind('up', this.unbindFromRedraw.bind(this, '_moveUp'), 'keyup'); - this.keycharm.bind('down', this.unbindFromRedraw.bind(this, '_moveDown'), 'keyup'); - this.keycharm.bind('left', this.unbindFromRedraw.bind(this, '_moveLeft'), 'keyup'); - this.keycharm.bind('right', this.unbindFromRedraw.bind(this, '_moveRight'), 'keyup'); - this.keycharm.bind('=', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); - this.keycharm.bind('num+', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); - this.keycharm.bind('num-', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); - this.keycharm.bind('-', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); - this.keycharm.bind('[', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); - this.keycharm.bind(']', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); - this.keycharm.bind('pageup', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); - this.keycharm.bind('pagedown', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); - } - } - } - }]); - - return NavigationHandler; - })(); - - exports['default'] = NavigationHandler; - module.exports = exports['default']; - /***/ }, /* 81 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); - /** - * Popup is a class to create a popup window with some text - * @param {Element} container The container object. - * @param {Number} [x] - * @param {Number} [y] - * @param {String} [text] - * @param {Object} [style] An object containing borderColor, - * backgroundColor, etc. - */ - - var Popup = (function () { - function Popup(container) { - _classCallCheck(this, Popup); - - this.container = container; - - this.x = 0; - this.y = 0; - this.padding = 5; - this.hidden = false; - - // create the frame - this.frame = document.createElement('div'); - this.frame.className = 'vis-network-tooltip'; - this.container.appendChild(this.frame); - } - - _createClass(Popup, [{ - key: 'setPosition', - - /** - * @param {number} x Horizontal position of the popup window - * @param {number} y Vertical position of the popup window - */ - value: function setPosition(x, y) { - this.x = parseInt(x); - this.y = parseInt(y); - } - }, { - key: 'setText', - - /** - * Set the content for the popup window. This can be HTML code or text. - * @param {string | Element} content - */ - value: function setText(content) { - if (content instanceof Element) { - this.frame.innerHTML = ''; - this.frame.appendChild(content); - } else { - this.frame.innerHTML = content; // string containing text or HTML - } - } - }, { - key: 'show', - - /** - * Show the popup window - * @param {boolean} [doShow] Show or hide the window - */ - value: function show(doShow) { - if (doShow === undefined) { - doShow = true; - } - - if (doShow === true) { - var height = this.frame.clientHeight; - var width = this.frame.clientWidth; - var maxHeight = this.frame.parentNode.clientHeight; - var maxWidth = this.frame.parentNode.clientWidth; - - var top = this.y - height; - if (top + height + this.padding > maxHeight) { - top = maxHeight - height - this.padding; - } - if (top < this.padding) { - top = this.padding; - } - - var left = this.x; - if (left + width + this.padding > maxWidth) { - left = maxWidth - width - this.padding; - } - if (left < this.padding) { - left = this.padding; - } - - this.frame.style.left = left + 'px'; - this.frame.style.top = top + 'px'; - this.frame.style.visibility = 'visible'; - this.hidden = false; - } else { - this.hide(); - } - } - }, { - key: 'hide', - - /** - * Hide the popup window - */ - value: function hide() { - this.hidden = true; - this.frame.style.visibility = 'hidden'; - } - }]); - - return Popup; - })(); - - exports['default'] = Popup; - module.exports = exports['default']; - -/***/ }, -/* 82 */ -/***/ function(module, exports, __webpack_require__) { - - // English - 'use strict'; - - exports.en = { - edit: 'Edit', - del: 'Delete selected', - back: 'Back', - addNode: 'Add Node', - addEdge: 'Add Edge', - editNode: 'Edit Node', - editEdge: 'Edit Edge', - addDescription: 'Click in an empty space to place a new node.', - edgeDescription: 'Click on a node and drag the edge to another node to connect them.', - editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', - createEdgeError: 'Cannot link edges to a cluster.', - deleteClusterError: 'Clusters cannot be deleted.', - editClusterError: 'Clusters cannot be edited.' - }; - exports.en_EN = exports.en; - exports.en_US = exports.en; - - // Dutch - exports.nl = { - edit: 'Wijzigen', - del: 'Selectie verwijderen', - back: 'Terug', - addNode: 'Node toevoegen', - addEdge: 'Link toevoegen', - editNode: 'Node wijzigen', - editEdge: 'Link wijzigen', - addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', - edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.', - editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', - createEdgeError: 'Kan geen link maken naar een cluster.', - deleteClusterError: 'Clusters kunnen niet worden verwijderd.', - editClusterError: 'Clusters kunnen niet worden aangepast.' - }; - exports.nl_NL = exports.nl; - exports.nl_BE = exports.nl; - -/***/ }, -/* 83 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var Hammer = __webpack_require__(41); var hammerUtil = __webpack_require__(45); var util = __webpack_require__(1); @@ -36382,7 +35892,7 @@ return /******/ (function(modules) { // webpackBootstrap var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); hsv.v = value / 100; var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); - rgba.a = this.color.a; + rgba['a'] = this.color.a; this.color = rgba; this._updatePicker(); } @@ -36676,7 +36186,7 @@ return /******/ (function(modules) { // webpackBootstrap hsv.h = h; hsv.s = s; var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); - rgba.a = this.color.a; + rgba['a'] = this.color.a; this.color = rgba; // update previews @@ -36692,7 +36202,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 84 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; @@ -36890,7 +36400,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 85 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { function webpackContext(req) { @@ -36899,11 +36409,11 @@ return /******/ (function(modules) { // webpackBootstrap webpackContext.keys = function() { return []; }; webpackContext.resolve = webpackContext; module.exports = webpackContext; - webpackContext.id = 85; + webpackContext.id = 83; /***/ }, -/* 86 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { module.exports = function(module) { @@ -36919,7 +36429,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 87 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__; @@ -36927,28 +36437,30 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, {})) /***/ }, -/* 88 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NodeBase2 = __webpack_require__(105); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase = __webpack_require__(103); + + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); 'use strict'; @@ -37020,34 +36532,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Box; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = Box; module.exports = exports['default']; /***/ }, -/* 89 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _CircleImageBase2 = __webpack_require__(106); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _CircleImageBase3 = _interopRequireWildcard(_CircleImageBase2); + var _utilCircleImageBase = __webpack_require__(104); + + var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); 'use strict'; @@ -37102,34 +36616,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Circle; - })(_CircleImageBase3['default']); + })(_utilCircleImageBase2['default']); exports['default'] = Circle; module.exports = exports['default']; /***/ }, -/* 90 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _CircleImageBase2 = __webpack_require__(106); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _CircleImageBase3 = _interopRequireWildcard(_CircleImageBase2); + var _utilCircleImageBase = __webpack_require__(104); + + var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); 'use strict'; @@ -37203,34 +36719,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CircularImage; - })(_CircleImageBase3['default']); + })(_utilCircleImageBase2['default']); exports['default'] = CircularImage; module.exports = exports['default']; /***/ }, -/* 91 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NodeBase2 = __webpack_require__(105); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase = __webpack_require__(103); + + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); 'use strict'; @@ -37301,34 +36819,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Database; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = Database; module.exports = exports['default']; /***/ }, -/* 92 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase2 = __webpack_require__(107); + var _utilShapeBase = __webpack_require__(105); - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -37359,34 +36879,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Diamond; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = Diamond; module.exports = exports['default']; /***/ }, -/* 93 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase2 = __webpack_require__(107); + var _utilShapeBase = __webpack_require__(105); - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -37417,34 +36939,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Dot; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = Dot; module.exports = exports['default']; /***/ }, -/* 94 */ +/* 92 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NodeBase2 = __webpack_require__(105); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase = __webpack_require__(103); + + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); 'use strict'; @@ -37518,34 +37042,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Ellipse; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = Ellipse; module.exports = exports['default']; /***/ }, -/* 95 */ +/* 93 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase2 = __webpack_require__(105); + var _utilNodeBase = __webpack_require__(103); - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); 'use strict'; @@ -37626,34 +37152,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Icon; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = Icon; module.exports = exports['default']; /***/ }, -/* 96 */ +/* 94 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _CircleImageBase2 = __webpack_require__(106); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _CircleImageBase3 = _interopRequireWildcard(_CircleImageBase2); + var _utilCircleImageBase = __webpack_require__(104); + + var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); 'use strict'; @@ -37704,34 +37232,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Image; - })(_CircleImageBase3['default']); + })(_utilCircleImageBase2['default']); exports['default'] = Image; module.exports = exports['default']; /***/ }, -/* 97 */ +/* 95 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase2 = __webpack_require__(107); + var _utilShapeBase = __webpack_require__(105); - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -37763,34 +37293,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Square; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = Square; module.exports = exports['default']; /***/ }, -/* 98 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase2 = __webpack_require__(107); + var _utilShapeBase = __webpack_require__(105); - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -37821,34 +37353,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Star; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = Star; module.exports = exports['default']; /***/ }, -/* 99 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NodeBase2 = __webpack_require__(105); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase = __webpack_require__(103); + + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); 'use strict'; @@ -37899,34 +37433,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Text; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = Text; module.exports = exports['default']; /***/ }, -/* 100 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _ShapeBase2 = __webpack_require__(107); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase = __webpack_require__(105); + + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -37957,34 +37493,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return Triangle; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = Triangle; module.exports = exports['default']; /***/ }, -/* 101 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _ShapeBase2 = __webpack_require__(107); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _ShapeBase3 = _interopRequireWildcard(_ShapeBase2); + var _utilShapeBase = __webpack_require__(105); + + var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); 'use strict'; @@ -38015,34 +37553,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return TriangleDown; - })(_ShapeBase3['default']); + })(_utilShapeBase2['default']); exports['default'] = TriangleDown; module.exports = exports['default']; /***/ }, -/* 102 */ +/* 100 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _BezierEdgeBase2 = __webpack_require__(108); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _BezierEdgeBase3 = _interopRequireWildcard(_BezierEdgeBase2); + var _utilBezierEdgeBase = __webpack_require__(106); + + var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); var BezierEdgeDynamic = (function (_BezierEdgeBase) { function BezierEdgeDynamic(options, body, labelModule) { @@ -38171,34 +37711,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BezierEdgeDynamic; - })(_BezierEdgeBase3['default']); + })(_utilBezierEdgeBase2['default']); exports['default'] = BezierEdgeDynamic; module.exports = exports['default']; /***/ }, -/* 103 */ +/* 101 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x4, _x5, _x6) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x4, + property = _x5, + receiver = _x6; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x4 = parent; _x5 = property; _x6 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _BezierEdgeBase2 = __webpack_require__(108); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _BezierEdgeBase3 = _interopRequireWildcard(_BezierEdgeBase2); + var _utilBezierEdgeBase = __webpack_require__(106); + + var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); var BezierEdgeStatic = (function (_BezierEdgeBase) { function BezierEdgeStatic(options, body, labelModule) { @@ -38435,34 +37977,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return BezierEdgeStatic; - })(_BezierEdgeBase3['default']); + })(_utilBezierEdgeBase2['default']); exports['default'] = BezierEdgeStatic; module.exports = exports['default']; /***/ }, -/* 104 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _EdgeBase2 = __webpack_require__(109); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _EdgeBase3 = _interopRequireWildcard(_EdgeBase2); + var _utilEdgeBase = __webpack_require__(107); + + var _utilEdgeBase2 = _interopRequireDefault(_utilEdgeBase); var StraightEdge = (function (_EdgeBase) { function StraightEdge(options, body, labelModule) { @@ -38545,25 +38089,25 @@ return /******/ (function(modules) { // webpackBootstrap }]); return StraightEdge; - })(_EdgeBase3['default']); + })(_utilEdgeBase2['default']); exports['default'] = StraightEdge; module.exports = exports['default']; /***/ }, -/* 105 */ +/* 103 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var NodeBase = (function () { function NodeBase(options, body, labelModule) { _classCallCheck(this, NodeBase); @@ -38617,28 +38161,30 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 106 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase2 = __webpack_require__(105); + var _utilNodeBase = __webpack_require__(103); - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); var CircleImageBase = (function (_NodeBase) { function CircleImageBase(options, body, labelModule) { @@ -38732,34 +38278,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return CircleImageBase; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = CircleImageBase; module.exports = exports['default']; /***/ }, -/* 107 */ +/* 105 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x, + property = _x2, + receiver = _x3; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _NodeBase2 = __webpack_require__(105); + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _NodeBase3 = _interopRequireWildcard(_NodeBase2); + var _utilNodeBase = __webpack_require__(103); + + var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); var ShapeBase = (function (_NodeBase) { function ShapeBase(options, body, labelModule) { @@ -38822,34 +38370,36 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ShapeBase; - })(_NodeBase3['default']); + })(_utilNodeBase2['default']); exports['default'] = ShapeBase; module.exports = exports['default']; /***/ }, -/* 108 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + Object.defineProperty(exports, '__esModule', { + value: true + }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { desc = parent = getter = undefined; _again = false; var object = _x2, + property = _x3, + receiver = _x4; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - Object.defineProperty(exports, '__esModule', { - value: true - }); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _EdgeBase2 = __webpack_require__(109); + var _EdgeBase2 = __webpack_require__(107); - var _EdgeBase3 = _interopRequireWildcard(_EdgeBase2); + var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); var BezierEdgeBase = (function (_EdgeBase) { function BezierEdgeBase(options, body, labelModule) { @@ -38975,20 +38525,21 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 109 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _slicedToArray = function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - Object.defineProperty(exports, '__esModule', { value: true }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var util = __webpack_require__(1); var EdgeBase = (function () { @@ -39560,6 +39111,403 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = EdgeBase; module.exports = exports['default']; +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var util = __webpack_require__(1); + var Hammer = __webpack_require__(41); + var hammerUtil = __webpack_require__(45); + var keycharm = __webpack_require__(82); + + var NavigationHandler = (function () { + function NavigationHandler(body, canvas) { + var _this = this; + + _classCallCheck(this, NavigationHandler); + + this.body = body; + this.canvas = canvas; + + this.iconsCreated = false; + this.navigationHammers = []; + this.boundFunctions = {}; + this.touchTime = 0; + this.activated = false; + + this.body.emitter.on('release', function () { + _this._stopMovement(); + }); + this.body.emitter.on('activate', function () { + _this.activated = true;_this.configureKeyboardBindings(); + }); + this.body.emitter.on('deactivate', function () { + _this.activated = false;_this.configureKeyboardBindings(); + }); + this.body.emitter.on('destroy', function () { + if (_this.keycharm !== undefined) { + _this.keycharm.destroy(); + } + }); + + this.options = {}; + } + + _createClass(NavigationHandler, [{ + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + this.options = options; + this.create(); + } + } + }, { + key: 'create', + value: function create() { + if (this.options.navigationButtons === true) { + if (this.iconsCreated === false) { + this.loadNavigationElements(); + } + } else if (this.iconsCreated === true) { + this.cleanNavigation(); + } + + this.configureKeyboardBindings(); + } + }, { + key: 'cleanNavigation', + value: function cleanNavigation() { + // clean hammer bindings + if (this.navigationHammers.length != 0) { + for (var i = 0; i < this.navigationHammers.length; i++) { + this.navigationHammers[i].destroy(); + } + this.navigationHammers = []; + } + + this._navigationReleaseOverload = function () {}; + + // clean up previous navigation items + if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) { + this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']); + } + + this.iconsCreated = false; + } + }, { + key: 'loadNavigationElements', + + /** + * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation + * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent + * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. + * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. + * + * @private + */ + value: function loadNavigationElements() { + this.cleanNavigation(); + + this.navigationDOM = {}; + var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends']; + var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit']; + + this.navigationDOM['wrapper'] = document.createElement('div'); + this.navigationDOM['wrapper'].className = 'vis-navigation'; + this.canvas.frame.appendChild(this.navigationDOM['wrapper']); + + for (var i = 0; i < navigationDivs.length; i++) { + this.navigationDOM[navigationDivs[i]] = document.createElement('div'); + this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i]; + this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]); + + var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]); + if (navigationDivActions[i] === '_fit') { + hammerUtil.onTouch(hammer, this._fit.bind(this)); + } else { + hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this, navigationDivActions[i])); + } + + this.navigationHammers.push(hammer); + } + + this.iconsCreated = true; + } + }, { + key: 'bindToRedraw', + value: function bindToRedraw(action) { + if (this.boundFunctions[action] === undefined) { + this.boundFunctions[action] = this[action].bind(this); + this.body.emitter.on('initRedraw', this.boundFunctions[action]); + this.body.emitter.emit('_startRendering'); + } + } + }, { + key: 'unbindFromRedraw', + value: function unbindFromRedraw(action) { + if (this.boundFunctions[action] !== undefined) { + this.body.emitter.off('initRedraw', this.boundFunctions[action]); + this.body.emitter.emit('_stopRendering'); + delete this.boundFunctions[action]; + } + } + }, { + key: '_fit', + + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + value: function _fit() { + if (new Date().valueOf() - this.touchTime > 700) { + // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?) + this.body.emitter.emit('fit', { duration: 700 }); + this.touchTime = new Date().valueOf(); + } + } + }, { + key: '_stopMovement', + + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + value: function _stopMovement() { + for (var boundAction in this.boundFunctions) { + if (this.boundFunctions.hasOwnProperty(boundAction)) { + this.body.emitter.off('initRedraw', this.boundFunctions[boundAction]); + this.body.emitter.emit('_stopRendering'); + } + } + this.boundFunctions = {}; + } + }, { + key: '_moveUp', + value: function _moveUp() { + this.body.view.translation.y += this.options.keyboard.speed.y; + } + }, { + key: '_moveDown', + value: function _moveDown() { + this.body.view.translation.y -= this.options.keyboard.speed.y; + } + }, { + key: '_moveLeft', + value: function _moveLeft() { + this.body.view.translation.x += this.options.keyboard.speed.x; + } + }, { + key: '_moveRight', + value: function _moveRight() { + this.body.view.translation.x -= this.options.keyboard.speed.x; + } + }, { + key: '_zoomIn', + value: function _zoomIn() { + this.body.view.scale *= 1 + this.options.keyboard.speed.zoom; + } + }, { + key: '_zoomOut', + value: function _zoomOut() { + this.body.view.scale /= 1 + this.options.keyboard.speed.zoom; + } + }, { + key: 'configureKeyboardBindings', + + /** + * bind all keys using keycharm. + */ + value: function configureKeyboardBindings() { + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + if (this.options.keyboard.enabled === true) { + + if (this.options.keyboard.bindToWindow === true) { + this.keycharm = keycharm({ container: window, preventDefault: true }); + } else { + this.keycharm = keycharm({ container: this.canvas.frame, preventDefault: true }); + } + + this.keycharm.reset(); + + if (this.activated === true) { + this.keycharm.bind('up', this.bindToRedraw.bind(this, '_moveUp'), 'keydown'); + this.keycharm.bind('down', this.bindToRedraw.bind(this, '_moveDown'), 'keydown'); + this.keycharm.bind('left', this.bindToRedraw.bind(this, '_moveLeft'), 'keydown'); + this.keycharm.bind('right', this.bindToRedraw.bind(this, '_moveRight'), 'keydown'); + this.keycharm.bind('=', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); + this.keycharm.bind('num+', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); + this.keycharm.bind('num-', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); + this.keycharm.bind('-', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); + this.keycharm.bind('[', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); + this.keycharm.bind(']', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); + this.keycharm.bind('pageup', this.bindToRedraw.bind(this, '_zoomIn'), 'keydown'); + this.keycharm.bind('pagedown', this.bindToRedraw.bind(this, '_zoomOut'), 'keydown'); + + this.keycharm.bind('up', this.unbindFromRedraw.bind(this, '_moveUp'), 'keyup'); + this.keycharm.bind('down', this.unbindFromRedraw.bind(this, '_moveDown'), 'keyup'); + this.keycharm.bind('left', this.unbindFromRedraw.bind(this, '_moveLeft'), 'keyup'); + this.keycharm.bind('right', this.unbindFromRedraw.bind(this, '_moveRight'), 'keyup'); + this.keycharm.bind('=', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); + this.keycharm.bind('num+', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); + this.keycharm.bind('num-', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); + this.keycharm.bind('-', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); + this.keycharm.bind('[', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); + this.keycharm.bind(']', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); + this.keycharm.bind('pageup', this.unbindFromRedraw.bind(this, '_zoomIn'), 'keyup'); + this.keycharm.bind('pagedown', this.unbindFromRedraw.bind(this, '_zoomOut'), 'keyup'); + } + } + } + }]); + + return NavigationHandler; + })(); + + exports['default'] = NavigationHandler; + module.exports = exports['default']; + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + /** + * Popup is a class to create a popup window with some text + * @param {Element} container The container object. + * @param {Number} [x] + * @param {Number} [y] + * @param {String} [text] + * @param {Object} [style] An object containing borderColor, + * backgroundColor, etc. + */ + + var Popup = (function () { + function Popup(container) { + _classCallCheck(this, Popup); + + this.container = container; + + this.x = 0; + this.y = 0; + this.padding = 5; + this.hidden = false; + + // create the frame + this.frame = document.createElement('div'); + this.frame.className = 'vis-network-tooltip'; + this.container.appendChild(this.frame); + } + + _createClass(Popup, [{ + key: 'setPosition', + + /** + * @param {number} x Horizontal position of the popup window + * @param {number} y Vertical position of the popup window + */ + value: function setPosition(x, y) { + this.x = parseInt(x); + this.y = parseInt(y); + } + }, { + key: 'setText', + + /** + * Set the content for the popup window. This can be HTML code or text. + * @param {string | Element} content + */ + value: function setText(content) { + if (content instanceof Element) { + this.frame.innerHTML = ''; + this.frame.appendChild(content); + } else { + this.frame.innerHTML = content; // string containing text or HTML + } + } + }, { + key: 'show', + + /** + * Show the popup window + * @param {boolean} [doShow] Show or hide the window + */ + value: function show(doShow) { + if (doShow === undefined) { + doShow = true; + } + + if (doShow === true) { + var height = this.frame.clientHeight; + var width = this.frame.clientWidth; + var maxHeight = this.frame.parentNode.clientHeight; + var maxWidth = this.frame.parentNode.clientWidth; + + var top = this.y - height; + if (top + height + this.padding > maxHeight) { + top = maxHeight - height - this.padding; + } + if (top < this.padding) { + top = this.padding; + } + + var left = this.x; + if (left + width + this.padding > maxWidth) { + left = maxWidth - width - this.padding; + } + if (left < this.padding) { + left = this.padding; + } + + this.frame.style.left = left + 'px'; + this.frame.style.top = top + 'px'; + this.frame.style.visibility = 'visible'; + this.hidden = false; + } else { + this.hide(); + } + } + }, { + key: 'hide', + + /** + * Hide the popup window + */ + value: function hide() { + this.hidden = true; + this.frame.style.visibility = 'hidden'; + } + }]); + + return Popup; + })(); + + exports['default'] = Popup; + module.exports = exports['default']; + /***/ } /******/ ]) }); diff --git a/dist/vis.min.css b/dist/vis.min.css index 90c33c50..b68ef529 100644 --- a/dist/vis.min.css +++ b/dist/vis.min.css @@ -1 +1 @@ -.vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.vis-foreground .vis-group,.vis-item.background,.vis-item.vis-range,.vis-itemset,.vis-labelset,.vis-labelset .vis-label,.vis-panel,.vis-timeline{box-sizing:border-box}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}.vis-timeline{position:relative;border:1px solid #bfbfbf;padding:0;margin:0}.vis-panel{position:absolute;padding:0;margin:0}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset{position:relative}.vis-labelset .vis-label{position:relative;left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-itemset{position:relative;padding:0;margin:0}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-item{position:absolute;color:#1A1A1A;border-color:#97B0F8;border-width:1px;background-color:#D5DDF6;display:inline-block}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#FFF785}.vis-item.vis-selected{border-color:#FFC200;z-index:2}.vis-editable .vis-item.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px}.vis-item.background{border:none;background-color:rgba(213,221,246,.4);padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-delete{background:url(img/timeline/delete.png)center no-repeat;position:absolute;width:24px;height:24px;top:-4px;right:-24px;cursor:pointer}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-current-time{background-color:#FF7F6E;width:2px;z-index:1}.vis-custom-time{background-color:#6E94FF;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}div.vis-network div.vis-manipulation{border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc', GradientType=0 );position:absolute;left:0;top:0;width:100%;height:30px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:15px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{position:relative;top:-7px;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin:0 0 0 10px;vertical-align:middle;cursor:pointer;padding:0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{display:inline-block;width:1px;height:20px;background-color:#bdbdbd;margin:5px 7px 0 15px}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;font-color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2)}div.vis-network-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-network-configuration-wrapper{display:block;width:700px}div.vis-network-configuration.vis-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-network-configuration.button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-network-configuration.button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-network-configuration.item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-network-configuration.item.s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-network-configuration.item.s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-network-configuration.item.s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-network-configuration.header{font-size:18px;font-weight:700}div.vis-network-configuration.label{width:120px;height:25px;line-height:25px}div.vis-network-configuration.label.s3{width:110px}div.vis-network-configuration.label.s4{width:100px}div.vis-network-configuration.colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-network-configuration.checkbox{left:-5px}input.vis-network-configuration.rangeinput{position:relative;top:-5px;width:60px;height:13px;padding:1px;margin:0;pointer-events:none}input.vis-network-configuration.range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-network-configuration.range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-network-configuration.range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380', GradientType=0 );box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-network-configuration.range:focus{outline:0}input.vis-network-configuration.range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8', GradientType=0 )}input.vis-network-configuration.range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-network-configuration.range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-network-configuration.range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-network-configuration.range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-network-configuration.range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-network-configuration.range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-network-configuration.range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-network-configuration.range:focus::-ms-fill-lower{background:#888}input.vis-network-configuration.range:focus::-ms-fill-upper{background:#ccc}div.vis-color-picker{position:absolute;margin-top:-140px;margin-left:30px;width:293px;height:425px;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5)0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow:after,div.vis-color-picker div.vis-arrow:before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313', GradientType=0 )}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{top:380px;width:140px;height:20px;border-radius:5px;border:1px solid rgba(0,0,0,.1)}div.vis-color-picker div.vis-new-color{position:absolute;left:159px;text-align:right;padding-right:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-initial-color{position:absolute;left:10px;text-align:left;padding-left:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px} \ No newline at end of file +.vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.vis-foreground .vis-group,.vis-item.vis-background,.vis-item.vis-range,.vis-itemset,.vis-labelset,.vis-labelset .vis-label,.vis-panel,.vis-timeline{box-sizing:border-box}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}.vis-timeline{position:relative;border:1px solid #bfbfbf;padding:0;margin:0}.vis-panel{position:absolute;padding:0;margin:0}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset{position:relative}.vis-labelset .vis-label{position:relative;left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-itemset{position:relative;padding:0;margin:0}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-item{position:absolute;color:#1A1A1A;border-color:#97B0F8;border-width:1px;background-color:#D5DDF6;display:inline-block}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#FFF785}.vis-item.vis-selected{border-color:#FFC200;z-index:2}.vis-editable .vis-item.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-delete{background:url(img/timeline/delete.png)center no-repeat;position:absolute;width:24px;height:24px;top:-4px;right:-24px;cursor:pointer}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-current-time{background-color:#FF7F6E;width:2px;z-index:1}.vis-custom-time{background-color:#6E94FF;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}div.vis-network div.vis-manipulation{border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc', GradientType=0 );position:absolute;left:0;top:0;width:100%;height:30px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:15px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{position:relative;top:-7px;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin:0 0 0 10px;vertical-align:middle;cursor:pointer;padding:0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{display:inline-block;width:1px;height:20px;background-color:#bdbdbd;margin:5px 7px 0 15px}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;font-color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2)}div.vis-network-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-network-configuration-wrapper{display:block;width:700px}div.vis-network-configuration.vis-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-network-configuration.button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-network-configuration.button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-network-configuration.item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-network-configuration.item.s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-network-configuration.item.s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-network-configuration.item.s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-network-configuration.header{font-size:18px;font-weight:700}div.vis-network-configuration.label{width:120px;height:25px;line-height:25px}div.vis-network-configuration.label.s3{width:110px}div.vis-network-configuration.label.s4{width:100px}div.vis-network-configuration.colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-network-configuration.checkbox{left:-5px}input.vis-network-configuration.rangeinput{position:relative;top:-5px;width:60px;height:13px;padding:1px;margin:0;pointer-events:none}input.vis-network-configuration.range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-network-configuration.range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-network-configuration.range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380', GradientType=0 );box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-network-configuration.range:focus{outline:0}input.vis-network-configuration.range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8', GradientType=0 )}input.vis-network-configuration.range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-network-configuration.range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-network-configuration.range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-network-configuration.range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-network-configuration.range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-network-configuration.range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-network-configuration.range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-network-configuration.range:focus::-ms-fill-lower{background:#888}input.vis-network-configuration.range:focus::-ms-fill-upper{background:#ccc}div.vis-color-picker{position:absolute;margin-top:-140px;margin-left:30px;width:293px;height:425px;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5)0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow:after,div.vis-color-picker div.vis-arrow:before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313', GradientType=0 )}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{top:380px;width:140px;height:20px;border-radius:5px;border:1px solid rgba(0,0,0,.1)}div.vis-color-picker div.vis-new-color{position:absolute;left:159px;text-align:right;padding-right:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-initial-color{position:absolute;left:10px;text-align:left;padding-left:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px} \ No newline at end of file diff --git a/examples/network/17_network_info.html b/examples/network/17_network_info.html index 83fa4dd6..c40c8a1f 100644 --- a/examples/network/17_network_info.html +++ b/examples/network/17_network_info.html @@ -98,11 +98,11 @@ var x = - mynetwork.clientWidth / 2 + 50; var y = - mynetwork.clientHeight / 2 + 50; var step = 70; - nodes.push({id: 1000, x: x, y: y, label: 'Internet', group: 'internet', value: 1, mass:0}); - nodes.push({id: 1001, x: x, y: y + step, label: 'Switch', group: 'switch', value: 1, mass:0}); - nodes.push({id: 1002, x: x, y: y + 2 * step, label: 'Server', group: 'server', value: 1, mass:0}); - nodes.push({id: 1003, x: x, y: y + 3 * step, label: 'Computer', group: 'desktop', value: 1, mass:0}); - nodes.push({id: 1004, x: x, y: y + 4 * step, label: 'Smartphone', group: 'mobile', value: 1, mass:0}); + nodes.push({id: 1000, x: x, y: y, label: 'Internet', group: 'internet', value: 1, fixed: true, physics:false}); + nodes.push({id: 1001, x: x, y: y + step, label: 'Switch', group: 'switch', value: 1, fixed: true, physics:false}); + nodes.push({id: 1002, x: x, y: y + 2 * step, label: 'Server', group: 'server', value: 1, fixed: true, physics:false}); + nodes.push({id: 1003, x: x, y: y + 3 * step, label: 'Computer', group: 'desktop', value: 1, fixed: true, physics:false}); + nodes.push({id: 1004, x: x, y: y + 4 * step, label: 'Smartphone', group: 'mobile', value: 1, fixed: true, physics:false}); // create a network var container = document.getElementById('mynetwork'); diff --git a/lib/network/Network.js b/lib/network/Network.js index 4ec9753e..729d24ad 100644 --- a/lib/network/Network.js +++ b/lib/network/Network.js @@ -1,15 +1,16 @@ // Load custom shapes into CanvasRenderingContext2D require('./shapes'); -var Emitter = require('emitter-component'); -var Hammer = require('../module/hammer'); -var util = require('../util'); -var DataSet = require('../DataSet'); -var DataView = require('../DataView'); -var dotparser = require('./dotparser'); -var gephiParser = require('./gephiParser'); -var Images = require('./Images'); -var Activator = require('../shared/Activator'); +let Emitter = require('emitter-component'); +let Hammer = require('../module/hammer'); +let util = require('../util'); +let DataSet = require('../DataSet'); +let DataView = require('../DataView'); +let dotparser = require('./dotparser'); +let gephiParser = require('./gephiParser'); +let Images = require('./Images'); +let Activator = require('../shared/Activator'); +let locales = require('./locales'); import Groups from './modules/Groups'; import NodesHandler from './modules/NodesHandler'; @@ -28,6 +29,8 @@ import Validator from "./modules/Validator"; import {printStyle} from "./modules/Validator"; import {allOptions, configureOptions} from './modules/components/AllOptions.js'; + + /** * @constructor Network * Create a network visualization, displaying nodes and edges. @@ -47,8 +50,10 @@ function Network(container, data, options) { // set constant values this.options = {}; this.defaultOptions = { + locale: 'en', + locales: locales, clickToUse: false - }; + } util.extend(this.options, this.defaultOptions); // containers for nodes and edges @@ -93,6 +98,8 @@ function Network(container, data, options) { } }; + + // bind the event listeners this.bindEventListeners(); @@ -143,37 +150,50 @@ Network.prototype.setOptions = function (options) { console.log('%cErrors have been found in the supplied options object. None of the options will be used.', printStyle); } - //this.placeConvenienceOptions(options); + // copy the global fields over + let fields = ['locale','locales','clickToUse']; + util.selectiveDeepExtend(fields,this.options, options); // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system. options = this.layoutEngine.setOptions(options.layout, options); + this.canvas.setOptions(options); // options for canvas are in globals + // pass the options to the modules this.groups.setOptions(options.groups); this.nodesHandler.setOptions(options.nodes); this.edgesHandler.setOptions(options.edges); this.physics.setOptions(options.physics); - this.canvas.setOptions(options.canvas); - this.renderer.setOptions(options.rendering); - this.view.setOptions(options.view); + this.manipulation.setOptions(options.manipulation,options); // manipulation uses the locales in the globals + this.interactionHandler.setOptions(options.interaction); - this.selectionHandler.setOptions(options.selection); - this.clustering.setOptions(options.clustering); - this.manipulation.setOptions(options.manipulation); + this.renderer.setOptions(options.interaction); // options for rendering are in interaction + this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction + + // these two do not have options at the moment, here for completeness + //this.view.setOptions(options.view); + //this.clustering.setOptions(options.clustering); this.configurationSystem.setOptions(options.configure); // if the configuration system is enabled, copy all options and put them into the config system if (this.configurationSystem.options.enabled === true) { - let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},selection:{},rendering:{}}; + let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}}; util.deepExtend(networkOptions.nodes, this.nodesHandler.options); util.deepExtend(networkOptions.edges, this.edgesHandler.options); util.deepExtend(networkOptions.layout, this.layoutEngine.options); + // load the selectionHandler and rendere default options in to the interaction group + util.deepExtend(networkOptions.interaction, this.selectionHandler.options); + util.deepExtend(networkOptions.interaction, this.renderer.options); + util.deepExtend(networkOptions.interaction, this.interactionHandler.options); util.deepExtend(networkOptions.manipulation, this.manipulation.options); util.deepExtend(networkOptions.physics, this.physics.options); - util.deepExtend(networkOptions.selection, this.selectionHandler.options); - util.deepExtend(networkOptions.rendering, this.renderer.options); + + // load globals into the global object + util.deepExtend(networkOptions.global, this.canvas.options); + util.deepExtend(networkOptions.global, this.options); + this.configurationSystem.setModuleOptions(networkOptions); } @@ -204,25 +224,6 @@ Network.prototype.setOptions = function (options) { } }; -// -///** -// * -// */ -//Network.prototype.placeConvenienceOptions = function (options) { -// if (options.locale !== undefined) { -// if (options.manipulation === undefined) { -// options.manipulation = {enabled:false, locale:options.locale}; -// } -// else if (typeof options.manipulation === 'boolean') { -// options.manipulation = {enabled: options.manipulation, locale:options.locale}; -// } -// else { -// options.manipulation.locale = options.locale; -// } -// } -//} - - /** * Update the this.body.nodeIndices with the most recent node index list diff --git a/lib/network/modules/Canvas.js b/lib/network/modules/Canvas.js index 327fab9b..c3a15e6c 100644 --- a/lib/network/modules/Canvas.js +++ b/lib/network/modules/Canvas.js @@ -50,8 +50,8 @@ class Canvas { setOptions(options) { if (options !== undefined) { - if (options.width !== undefined) {this.options.width = this._prepareValue(options.width );} - if (options.height!== undefined) {this.options.height= this._prepareValue(options.height);} + let fields = ['width','height','autoResize']; + util.selectiveDeepExtend(fields,this.options, options); } if (this.options.autoResize === true) { diff --git a/lib/network/modules/CanvasRenderer.js b/lib/network/modules/CanvasRenderer.js index c3ccac12..aba55bb5 100644 --- a/lib/network/modules/CanvasRenderer.js +++ b/lib/network/modules/CanvasRenderer.js @@ -70,7 +70,8 @@ class CanvasRenderer { setOptions(options) { if (options !== undefined) { - util.deepExtend(this.options, options); + let fields = ['hideEdgesOnDrag','hideNodesOnDrag']; + util.selectiveDeepExtend(fields,this.options, options); } } @@ -143,7 +144,7 @@ class CanvasRenderer { this.canvas.setSize(); } - if (this.pixelRation === undefined) { + if (this.pixelRatio === undefined) { this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || @@ -207,6 +208,10 @@ class CanvasRenderer { var nodeIndices = this.body.nodeIndices; var node; var selected = []; + var topLeft = this.canvas.DOMtoCanvas({x:0,y:0}); + var bottomRight = this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth,y:this.canvas.frame.canvas.clientHeight});; + var viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x}; + // draw unselected nodes; for (let i = 0; i < nodeIndices.length; i++) { @@ -219,10 +224,9 @@ class CanvasRenderer { if (alwaysShow === true) { node.draw(ctx); } - // todo: replace check - //else if (node.inArea() === true) { - node.draw(ctx); - //} + else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) { + node.draw(ctx); + } } } diff --git a/lib/network/modules/ConfigurationSystem.js b/lib/network/modules/ConfigurationSystem.js index 93df2a4e..50eff745 100644 --- a/lib/network/modules/ConfigurationSystem.js +++ b/lib/network/modules/ConfigurationSystem.js @@ -505,14 +505,16 @@ class ConfigurationSystem { value = value === 'false' ? false : value; for (let i = 0; i < path.length; i++) { - if (pointer[path[i]] === undefined) { - pointer[path[i]] = {}; - } - if (i !== path.length -1) { - pointer = pointer[path[i]]; - } - else { - pointer[path[i]] = value; + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } + else { + pointer[path[i]] = value; + } } } return optionsObj; diff --git a/lib/network/modules/InteractionHandler.js b/lib/network/modules/InteractionHandler.js index 659dd26f..21829305 100644 --- a/lib/network/modules/InteractionHandler.js +++ b/lib/network/modules/InteractionHandler.js @@ -38,15 +38,15 @@ class InteractionHandler { this.defaultOptions = { dragNodes:true, dragView: true, - zoomView: true, hoverEnabled: false, - navigationButtons: false, - tooltipDelay: 300, keyboard: { enabled: false, speed: {x: 10, y: 10, zoom: 0.02}, bindToWindow: true - } + }, + navigationButtons: false, + tooltipDelay: 300, + zoomView: true } util.extend(this.options,this.defaultOptions); @@ -63,7 +63,7 @@ class InteractionHandler { setOptions(options) { if (options !== undefined) { // extend all but the values in fields - let fields = ['keyboard']; + let fields = ['hideEdgesOnDrag','hideNodesOnDrag','keyboard','multiselect','selectable','selectConnectedEdges']; util.selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in. @@ -116,8 +116,9 @@ class InteractionHandler { */ onTap(event) { let pointer = this.getPointer(event.center); + let multiselect = this.selectionHandler.options.multiselect && event.changedPointers[0].ctrlKey; - this.checkSelectionChanges(pointer, event); + this.checkSelectionChanges(pointer, event, multiselect); this.selectionHandler._generateClickEvent('click', event, pointer); } @@ -139,8 +140,9 @@ class InteractionHandler { */ onHold(event) { let pointer = this.getPointer(event.center); + let multiselect = this.selectionHandler.options.multiselect; - this.checkSelectionChanges(pointer, event, true); + this.checkSelectionChanges(pointer, event, multiselect); this.selectionHandler._generateClickEvent('click', event, pointer); this.selectionHandler._generateClickEvent('hold', event, pointer); @@ -204,7 +206,6 @@ class InteractionHandler { selected = true; } - if (selected === true) { // select or unselect this.selectionHandler._generateClickEvent('select', event, pointer); } diff --git a/lib/network/modules/ManipulationSystem.js b/lib/network/modules/ManipulationSystem.js index 69ca6450..f774a6ac 100644 --- a/lib/network/modules/ManipulationSystem.js +++ b/lib/network/modules/ManipulationSystem.js @@ -2,7 +2,6 @@ let util = require('../../util'); let Hammer = require('../../module/hammer'); let hammerUtil = require('../../hammerUtil'); -let locales = require('../locales'); /** * clears the toolbar div element of children @@ -34,8 +33,6 @@ class ManipulationSystem { this.defaultOptions = { enabled: false, initiallyActive: false, - locale: 'en', - locales: locales, addNode: true, addEdge: true, editNode: undefined, @@ -77,7 +74,12 @@ class ManipulationSystem { * Set the Options * @param options */ - setOptions(options) { + setOptions(options, allOptions) { + if (allOptions !== undefined) { + if (allOptions.locale !== undefined) {this.options.locale = allOptions.locale}; + if (allOptions.locales !== undefined) {this.options.locales = allOptions.locales}; + } + if (options !== undefined) { if (typeof options === 'boolean') { this.options.enabled = options; diff --git a/lib/network/modules/SelectionHandler.js b/lib/network/modules/SelectionHandler.js index ef42775b..5c51d277 100644 --- a/lib/network/modules/SelectionHandler.js +++ b/lib/network/modules/SelectionHandler.js @@ -9,7 +9,8 @@ class SelectionHandler { this.options = {}; this.defaultOptions = { - select: true, + multiselect: false, + selectable: true, selectConnectedEdges: true }; util.extend(this.options, this.defaultOptions); @@ -22,7 +23,8 @@ class SelectionHandler { setOptions(options) { if (options !== undefined) { - util.deepExtend(this.options, options); + let fields = ['multiselect','selectable','selectConnectedEdges']; + util.selectiveDeepExtend(fields,this.options, options); } } @@ -35,7 +37,7 @@ class SelectionHandler { */ selectOnPoint(pointer) { let selected = false; - if (this.options.select === true) { + if (this.options.selectable === true) { this.unselectAll(); let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);; if (obj !== undefined) { @@ -48,7 +50,7 @@ class SelectionHandler { selectAdditionalOnPoint(pointer) { let selectionChanged = false; - if (this.options.select === true) { + if (this.options.selectable === true) { let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);; if (obj !== undefined) { @@ -517,7 +519,7 @@ class SelectionHandler { */ getSelectedNodes() { let idArray = []; - if (this.options.select === true) { + if (this.options.selectable === true) { for (let nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { idArray.push(nodeId); @@ -535,7 +537,7 @@ class SelectionHandler { */ getSelectedEdges() { let idArray = []; - if (this.options.select === true) { + if (this.options.selectable === true) { for (let edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { idArray.push(edgeId); diff --git a/lib/network/modules/components/AllOptions.js b/lib/network/modules/components/AllOptions.js index dc5b12dd..abb35b19 100644 --- a/lib/network/modules/components/AllOptions.js +++ b/lib/network/modules/components/AllOptions.js @@ -9,30 +9,19 @@ let string = 'string'; let boolean = 'boolean'; let number = 'number'; let array = 'array'; -let object = 'object'; +let object = 'object'; // should only be in a __type__ property let dom = 'dom'; let fn = 'function'; let undef = 'undefined'; +let any = 'any' let allOptions = { - canvas: { - width: {string}, - height: {string}, - autoResize: {boolean}, - __type__: {object} - }, - rendering: { - hideEdgesOnDrag: {boolean}, - hideNodesOnDrag: {boolean}, - __type__: {object} - }, - clustering: {}, configure: { enabled: {boolean}, - filter: {boolean,string:['nodes','edges','layout','physics','manipulation','interaction','selection','rendering'],array}, + filter: {boolean,string,array}, container: {dom}, - __type__: {object,boolean,string:['nodes','edges','layout','physics','manipulation','interaction','selection','rendering'],array} + __type__: {object,boolean,string,array} }, edges: { arrows: { @@ -102,22 +91,27 @@ let allOptions = { }, groups: { useDefaultGroups: {boolean}, - __any__: ['__ref__','nodes'], + __any__: 'get from nodes, will be overwritten below', __type__: {object} }, interaction: { dragNodes: {boolean}, dragView: {boolean}, - zoomView: {boolean}, + hideEdgesOnDrag: {boolean}, + hideNodesOnDrag: {boolean}, hoverEnabled: {boolean}, - navigationButtons: {boolean}, - tooltipDelay: {number}, keyboard: { enabled: {boolean}, speed: {x: {number}, y: {number}, zoom: {number}, __type__: {object}}, bindToWindow: {boolean}, __type__: {object,boolean} }, + multiselect: {boolean}, + navigationButtons: {boolean}, + selectable: {boolean}, + selectConnectedEdges: {boolean}, + tooltipDelay: {number}, + zoomView: {boolean}, __type__: {object} }, layout: { @@ -134,15 +128,13 @@ let allOptions = { manipulation: { enabled: {boolean}, initiallyActive: {boolean}, - locale: {string}, - locales: {object}, addNode: {boolean,fn}, addEdge: {boolean,fn}, editNode: {fn}, editEdge: {boolean,fn}, deleteNode: {boolean,fn}, deleteEdge: {boolean,fn}, - controlNodeStyle: ['__ref__','nodes'], + controlNodeStyle: 'get from nodes, will be overwritten below', __type__: {object,boolean} }, nodes: { @@ -214,7 +206,7 @@ let allOptions = { y: {number}, __type__: {object,boolean} }, - shape: {string:['ellipse', 'circle', 'database', 'box', 'text','image', 'circularImage','diamond', 'dot', 'star', 'triangle','triangleDown', 'square','icon']}, + shape: {string:['ellipse', 'circle', 'database', 'box', 'text','image', 'circularImage','diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square','icon']}, size: {number}, title: {string,undef}, value: {number,undef}, @@ -261,19 +253,22 @@ let allOptions = { timestep: {number}, __type__: {object,boolean} }, - selection: { - selectable: {boolean}, - selectConnectedEdges: {boolean}, + + //globals : + autoResize: {boolean}, + clickToUse: {boolean}, + locale:{string}, + locales:{ + __any__: {object}, __type__: {object} }, - view: {}, + height: {string}, + width: {string}, __type__: {object} }; allOptions.groups.__any__ = allOptions.nodes; allOptions.manipulation.controlNodeStyle = allOptions.nodes; -//allOptions.locale = allOptions.manipulation.locale; -//allOptions.locales = allOptions.manipulation.locales; let configureOptions = { @@ -399,20 +394,24 @@ let configureOptions = { interaction: { dragNodes: true, dragView: true, - zoomView: true, + hideEdgesOnDrag: false, + hideNodesOnDrag: false, hoverEnabled: false, - navigationButtons: false, - tooltipDelay: [300, 0, 1000, 25], keyboard: { enabled: false, speed: {x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005]}, bindToWindow: true - } + }, + multiselect: false, + navigationButtons: false, + selectable: true, + selectConnectedEdges: true, + tooltipDelay: [300, 0, 1000, 25], + zoomView: true }, manipulation: { enabled: false, - initiallyActive: false, - locale: ['en', 'nl'] + initiallyActive: false }, physics: { barnesHut: { @@ -442,13 +441,8 @@ let configureOptions = { solver: ['barnesHut', 'repulsion', 'hierarchicalRepulsion'], timestep: [0.5, 0, 1, 0.05] }, - selection: { - selectable: true, - selectConnectedEdges: true - }, - rendering: { - hideEdgesOnDrag: false, - hideNodesOnDrag: false + global: { + locale: ['en', 'nl'] } }; diff --git a/lib/network/modules/components/Node.js b/lib/network/modules/components/Node.js index c61ddcd5..ce39e65a 100644 --- a/lib/network/modules/components/Node.js +++ b/lib/network/modules/components/Node.js @@ -393,6 +393,20 @@ class Node { ); } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + isBoundingBoxOverlappingWith(obj) { + return ( + this.shape.boundingBox.left < obj.right && + this.shape.boundingBox.right > obj.left && + this.shape.boundingBox.top < obj.bottom && + this.shape.boundingBox.bottom > obj.top + ); + } + }