diff --git a/HISTORY.md b/HISTORY.md index cc097f1d..3083a37c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,11 +2,243 @@ http://visjs.org -## not yet released, version 4.8.1-SNAPSHOT +## not-yet-released, version 4.15.1 + +### Graph2d + +- Fixed #1692: Error when y-axis values are equal. + +### Timeline + +- Fixed #1695: Item line and dot not correctly reckoning with the line width + when using left or right align. + + +## 2016-02-23, version 4.15.0 + +### Timeline + +- Implemented `currentTimeTick` event (see #1683). +- Fixed #1630: method `getItemRange` missing in docs. +- Fixed #1455: allow vertical panning of the web page on touch devices. + +### Graph2d + +- Fixed #1630: method `getDataRange` was wrongly called `getItemRange` in docs. +- Fixed #1655: use parseFloat instead of Number.parseFloat, as the latter is + not supported in IE. Thanks @ttjoseph. + +### Graph3d + +- Changed the built-in tooltip to show the provided `xLabel`, `yLabel`, and + `zLabel` instead of `'x'`, `'y'`, and `'z'`. Thanks @jacklightbody. + +### Network + +- Implemented interpolation option for interpolation of images, default true. +- Implemented parentCentralization option for hierarchical layout. +- Fixed #1635: edges are now referring to the correct points. +- Fixed #1644, #1631: overlapping nodes in hierarchical layout should no longer occur. +- Fixed #1575: fixed selection events +- Fixed #1677: updating groups through manipulation now works as it should. +- Fixed #1672: Implemented stepped scaling for nice interpolation of images. + + +## 2016-02-04, version 4.14.0 + +### Timeline + +- Fixed a regression: Timeline/Graph2d constructor throwing an exception when + no options are provided via the constructor. + +### Graph2d + +- Fixed a regression: Timeline/Graph2d constructor throwing an exception when + no options are provided via the constructor. + +### Graph3d + +- Fixed #1615: implemented new option `dotSizeRatio`. + + +## 2016-02-01, version 4.13.0 + +### Network + +- Added options to customize the hierarchical layout without the use of physics. +- Altered edges for arrows and added the arrowStrikethrough option. +- Improved the hierarchical layout algorithm by adding a condensing method to remove whitespace. +- Fixed #1556: Network throwing an error when clicking the "Edit" button + on the manipulation toolbar. +- Fixed #1334 (again): Network now ignores scroll when interaction:zoomView is false. +- Fixed #1588: destroy now unsubscribed from the dataset. +- Fixed #1584: Navigation buttons broken. +- Fixed #1596: correct clean up of manipulation dom elements. +- Fixed #1594: bug in hierarchical layout. +- Fixed #1597: Allow zero borders and addressed scaling artifacts. +- Fixed #1608: Fixed wrong variable reference + +### Timeline + +- Moved initial autoscale/fit method to an handler of the "changed" event. +- Fixed #1580: Invisible timeline/graph should not be drawn, as most inputs are invalid +- Fixed #1521: Prevent items from staying stuck to the left side of the viewport. +- Fixed #1592: Emit a "changed" event after each redraw. +- Fixed #1541: Timeline and Graph2d did not load synchronously anymore. + +### Graph2d + +- Major redesign of data axis/scales, with large focus on creating a sane slave axis setup +- Cleanup of linegraph's event handling. +- Fixed #1585: Allow bar groups to exclude from stacking +- Fixed #1580: Invisible timeline/graph should not be drawn, as most inputs are invalid +- Fixed #1177: Fix custom range of slaved right axis. +- Fixed #1592: Emit a "changed" event after each redraw. +- Fixed #1017: Fixed minWidth behavior for bars. +- Fixes #1557: Fix default axis formatting function. +- Fixed #1541: Timeline and Graph2d did not load synchronously anymore. +- Fixed a performance regression + + +## 2016-01-08, version 4.12.0 + +### Timeline + +- Fixed #1527: error when creating/updating a Timeline without data. +- Fixed #1127: `doubleClick` event not being fired. +- Fixed #1554: wrong cursor on readonly range items. + +### Network + +- Fixed #1531, #1335: border distances for arrow positioning +- Fixed findNode method. It now does not return internal objects anymore. +- Fixed #1529, clustering and declustering now respects the original settings of the edges for physics and hidden. +- Fixed #1406, control nodes are now drawn immediately without a second redraw. +- Fixed #1404, made the array returned by findNode match the docs. +- Added #1138, enable the user to define the color of the shadows for nodes and edges. +- Fixed #1528, #1278, avoided ID's being cast to string for methods that return ID's as well as storePositions casting to string. +- Fixed upscaling when the window size increases. +- Accepted pull request #1544, thanks @felixhayashi! +- Fixed documented bug in #1544. + + +## 2015-12-18, version 4.11.0 + +### Network + +- Expose `setSelection` method. Thanks @zefrog. + +### Timeline + +- Fixed #1441: Height of subgroups not immediately updated after updating + data in a DataSet or DataView. +- Fixed #1491: Problem using ctrl+drag in combination with using a `DataView`, + and an issue with ctrl+drag when using `snap: null`. +- Fixed #1486: Item range sometimes wrongly calculated on IE in case of old dates. +- Fixed #1523: end of data range wrongly determined. + +### Graph2d + +- Large refactoring of Graph2d code base: + - Implemented a new option for `shaded.orientation` to always shade towards zero. + - Implemented a new option for `shaded.orientation` to follow another group (fill in between) + - Implemented line-graph stacking + - Fixed support for using a `DataView` in Graph2d. + - Implemented a new zindex option for controlling svg rendering order. + - Performance updates and fixes + +### DataSet +- Fixed #1487: DataSet cannot remove an item with id `0` correctly. + +### DataView +- Added the map() function from DataSet. + + +## 2015-11-27, version 4.10.0 + +### General + +- Fixed #1353: Custom bundling with browserify requiring manual installation + of `babelify`. + +### Network + +- Implemented new method `setSelection({nodes:[...], edges: [...]})`. + Thanks @zefrog. +- Fixed #1343: Connected edges are now deselected too when deselecting a node. +- Fixed #1398: Support nodes start with the correct positions. +- Fixed #1324: Labels now scale again. +- Fixed #1362: Layout of hierarchicaly systems no longer overlaps NODES. +- Fixed #1414: Fixed color references for nodes and edges. +- Fixed #1408: Unclustering without release function respects fixed positions now. +- Fixed #1358: Fixed example for clustering on zoom. +- Fixed #1416: Fixed error in improvedLayout. +- Improvements on hierarchical layout. + +### Timeline + +- Implemented option `itemsAlwaysDraggable`, See #1395. Thanks @liuqingc. +- Implemented option `multiselectPerGroup`. Thanks @hansmaulwurf23. +- Implemented property `oldData` on change events of the DataSet, and + deprecated the `data` property which wrongly contained new data instead of + old data. Thanks @hansmaulwurf23. +- Implemented option `maxMinorChars` to customize the width of the grid. +- Expose `vis.timeline.Core` for customization purposes. +- Fixed #1449, #1393: text of minor grids sometimes not being drawn. + +### Graph2d + +- Fixed #1385: Draw lines on top of bars. +- Fixed #1461 and #1345: Reset order of SVG elements in legend icons. + +### DataSet/DataView + +- Performance improvements (see #1381). Thanks @phimimms. + + +## 2015-10-01, version 4.9.0 + +### Network + +- Fixed bug where an edge that was not connected would crash the layout algorithms. +- Fixed bug where a box shape could not be drawn outside of the viewable area. +- Fixed bug where dragging a node that is not a control node during edit edge mode would throw an error. +- Made auto scaling on container size change pick the lowest between delta height and delta width. +- Added images with borders option (useBorderWithImage) +- Updated the manipulation css to fix offset if there is no separator. + +### Timeline + +- Fixed #1326: wrongly positioned dot of PointItems. +- Fixed #1249: option `hiddenDates` not accepting a single hidden date. +- Fixed a bug when pinching and using hidden dates. Thanks @lauzierj. + + +## 2015-09-14, version 4.8.2 + +### Network + +- Fixed Phantom Edges during clustering. +- Fixed scaling not doing anything to edges. +- Fixed setting font to null so the network won't crash anymore. +- Fixed stabilized event not firing if layout algorithm does very well. +- Fixed arrows with some shapes when they are selected. #1292 +- Fixed deletion of options by settings them to null. + + +## 2015-09-07, version 4.8.1 ### Network - Added German (de) locale. Thanks @Tooa. +- Fixed critical camera zoom bug #1273. +- Fixed unselectAll method. #1256 +- Fixed bug that broke the network if drawn in a hidden div #1254 + +### Timeline + +- Fixed #1215: inconsistent types of properties `start` and `end` in callback + functions `onMove`, `onMoving`, `onAdd`. ## 2015-08-28, version 4.8.0 diff --git a/LICENSE-MIT b/LICENSE-MIT index 9585e4bf..61da206c 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2015 Almende B.V. +Copyright (c) 2014-2016 Almende B.V. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NOTICE b/NOTICE index 45c5d3d1..a5ef8dbf 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Vis.js -Copyright 2010-2015 Almende B.V. +Copyright 2010-2016 Almende B.V. Vis.js is dual licensed under both diff --git a/README.md b/README.md index 7237c5f0..00f1666f 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,13 @@ The vis.js library is developed by [Almende B.V](http://almende.com). Install via npm: - npm install vis + $ npm install vis Install via bower: - bower install vis + $ bower install vis -Link via cdnjs: - - http://cdnjs.com +Link via cdnjs: http://cdnjs.com Or download the library from the github project: [https://github.com/almende/vis.git](https://github.com/almende/vis.git). @@ -126,28 +124,28 @@ of the project. To build the library from source, clone the project from github - git clone git://github.com/almende/vis.git + $ git clone git://github.com/almende/vis.git The source code uses the module style of node (require and module.exports) to organize dependencies. To install all dependencies and build the library, run `npm install` in the root of the project. - cd vis - npm install + $ cd vis + $ npm install Then, the project can be build running: - npm run build + $ npm run build To automatically rebuild on changes in the source files, once can use - npm run watch + $ npm run watch This will both build and minify the library on changes. Minifying is relatively slow, so when only the non-minified library is needed, one can use the `watch-dev` script instead: - npm run watch-dev + $ npm run watch-dev ## Custom builds @@ -163,10 +161,25 @@ The source code of vis.js consists of commonjs modules, which makes it possible Before you can do a build: -- Install node.js, npm, browserify, and uglify-js on your system. -- Download or clone the vis.js project. -- Install the dependencies of vis.js by running `npm install` in the root of the project. +- Install node.js and npm on your system: https://nodejs.org/ +- Install the following modules using npm: `browserify`, `babelify`, and `uglify-js`: + + ``` + $ [sudo] npm install -g browserify babelify uglify-js + ``` + +- Download or clone the vis.js project: + + ``` + $ git clone https://github.com/almende/vis.git + ``` + +- Install the dependencies of vis.js by running `npm install` in the root of the project: + ``` + $ cd vis + $ npm install + ``` #### Example 1: Bundle a single visualization @@ -177,13 +190,13 @@ exports.DataSet = require('./lib/DataSet'); exports.Timeline = require('./lib/timeline/Timeline'); ``` -Install browserify globally via `[sudo] npm install -g browserify`, then create a custom bundle like: +Then create a custom bundle using browserify, like: - browserify custom.js -t babelify -o vis-custom.js -s vis + $ browserify custom.js -t babelify -o vis-custom.js -s vis -This will generate a custom bundle *vis-custom.js*, which exposes the namespace `vis` containing only `DataSet` and `Timeline`. The generated bundle can be minified with uglifyjs (installed globally with `[sudo] npm install -g uglify-js`): +This will generate a custom bundle *vis-custom.js*, which exposes the namespace `vis` containing only `DataSet` and `Timeline`. The generated bundle can be minified using uglifyjs: - uglifyjs vis-custom.js -o vis-custom.min.js + $ uglifyjs vis-custom.js -o vis-custom.min.js The custom bundle can now be loaded like: @@ -204,11 +217,11 @@ The custom bundle can now be loaded like: The default bundle `vis.js` is standalone and includes external dependencies such as hammer.js and moment.js. When these libraries are already loaded by the application, vis.js does not need to include these dependencies itself too. To build a custom bundle of vis.js excluding moment.js and hammer.js, run browserify in the root of the project: - browserify index.js -t babelify -o vis-custom.js -s vis -x moment -x hammerjs + $ browserify index.js -t babelify -o vis-custom.js -s vis -x moment -x hammerjs This will generate a custom bundle *vis-custom.js*, which exposes the namespace `vis`, and has moment and hammerjs excluded. The generated bundle can be minified with uglifyjs: - uglifyjs vis-custom.js -o vis-custom.min.js + $ uglifyjs vis-custom.js -o vis-custom.min.js The custom bundle can now be loaded as: @@ -254,12 +267,12 @@ var timeline = new Timeline(container, data, options); Install the application dependencies via npm: - npm install vis moment + $ npm install vis moment The application can be bundled and minified: - browserify app.js -o app-bundle.js -t babelify - uglifyjs app-bundle.js -o app-bundle.min.js + $ browserify app.js -o app-bundle.js -t babelify + $ uglifyjs app-bundle.js -o app-bundle.min.js And loaded into a webpage: @@ -282,11 +295,11 @@ And loaded into a webpage: To test the library, install the project dependencies once: - npm install + $ npm install Then run the tests: - npm test + $ npm test ## License diff --git a/bower.json b/bower.json index 6fe859f2..2b709948 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,6 @@ { "name": "vis", - "version": "4.8.1-SNAPSHOT", - "main": ["dist/vis.min.js", "dist/vis.min.css"], + "main": ["dist/vis.js", "dist/vis.css"], "description": "A dynamic, browser-based visualization library.", "homepage": "http://visjs.org/", "license": ["Apache-2.0", "MIT"], diff --git a/dist/vis.css b/dist/vis.css index 90511f71..93889d03 100644 --- a/dist/vis.css +++ b/dist/vis.css @@ -32,6 +32,11 @@ div.vis-configuration-wrapper { width:700px; } +div.vis-configuration-wrapper::after { + clear: both; + content: ""; + display: block; +} div.vis-configuration.vis-config-option-container{ display:block; @@ -133,7 +138,7 @@ input.vis-configuration.vis-config-rangeinput{ position:relative; top:-5px; width:60px; - height:13px; + /*height:13px;*/ padding:1px; margin:0; pointer-events:none; @@ -584,6 +589,11 @@ input.vis-configuration.vis-config-range:focus::-ms-fill-upper { cursor: e-resize; } +.vis-range.vis-item.vis-readonly .vis-drag-left, +.vis-range.vis-item.vis-readonly .vis-drag-right { + cursor: auto; +} + .vis-time-axis { position: relative; overflow: hidden; @@ -903,17 +913,18 @@ div.vis-network div.vis-manipulation { background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */ + padding-top:4px; position: absolute; left: 0; top: 0; width: 100%; - height: 30px; + height: 28px; } div.vis-network div.vis-edit-mode { position:absolute; left: 0; - top: 15px; + top: 5px; height: 30px; } @@ -944,8 +955,7 @@ div.vis-network div.vis-close:hover { div.vis-network div.vis-manipulation div.vis-button, div.vis-network div.vis-edit-mode div.vis-button { - position:relative; - top:-7px; + float:left; font-family: verdana; font-size: 12px; -moz-border-radius: 15px; @@ -954,8 +964,8 @@ div.vis-network div.vis-edit-mode div.vis-button { background-position: 0px 0px; background-repeat:no-repeat; height:24px; - margin: 0px 0px 0px 10px; - vertical-align:middle; + margin-left: 10px; + /*vertical-align:middle;*/ cursor: pointer; padding: 0px 8px 0px 8px; -webkit-touch-callout: none; @@ -1021,11 +1031,12 @@ div.vis-network div.vis-edit-mode div.vis-label { line-height: 25px; } div.vis-network div.vis-manipulation div.vis-separator-line { + float:left; display:inline-block; width:1px; - height:20px; + height:21px; background-color: #bdbdbd; - margin: 5px 7px 0 15px; + margin: 0px 7px 0 15px; /*top right bottom left*/ } /* TODO: is this redundant? @@ -1045,7 +1056,7 @@ div.vis-network-tooltip { font-family: verdana; font-size:14px; - font-color:#000000; + color:#000000; background-color: #f5f4ed; -moz-border-radius: 3px; @@ -1120,14 +1131,17 @@ div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { div.vis-color-picker { position:absolute; + top: 0px; + left: 30px; margin-top:-140px; margin-left:30px; - width:293px; - height:425px; + width:310px; + height:444px; + z-index: 1; padding: 10px; border-radius:15px; background-color:#ffffff; - display:none; + display: none; box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; } @@ -1137,8 +1151,8 @@ div.vis-color-picker div.vis-arrow { left:5px; } -div.vis-color-picker div.vis-arrow:after, -div.vis-color-picker div.vis-arrow:before { +div.vis-color-picker div.vis-arrow::after, +div.vis-color-picker div.vis-arrow::before { right: 100%; top: 50%; border: solid transparent; diff --git a/dist/vis.js b/dist/vis.js index 76dfffa0..df5bb392 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -4,11 +4,11 @@ * * A dynamic, browser-based visualization library. * - * @version 4.8.1-SNAPSHOT - * @date 2015-08-28 + * @version 4.14.0 + * @date 2016-03-01 * * @license - * Copyright (C) 2011-2015 Almende B.V, http://almende.com + * Copyright (C) 2011-2016 Almende B.V, http://almende.com * * Vis.js is dual licensed under both * @@ -105,39 +105,40 @@ return /******/ (function(modules) { // webpackBootstrap // Timeline exports.Timeline = __webpack_require__(19); - exports.Graph2d = __webpack_require__(49); + exports.Graph2d = __webpack_require__(48); exports.timeline = { - DateUtil: __webpack_require__(27), - DataStep: __webpack_require__(52), - Range: __webpack_require__(24), - stack: __webpack_require__(32), - TimeStep: __webpack_require__(30), + Core: __webpack_require__(27), + DateUtil: __webpack_require__(26), + Range: __webpack_require__(23), + stack: __webpack_require__(31), + TimeStep: __webpack_require__(29), components: { items: { - Item: __webpack_require__(34), - BackgroundItem: __webpack_require__(38), - BoxItem: __webpack_require__(36), - PointItem: __webpack_require__(37), - RangeItem: __webpack_require__(33) + Item: __webpack_require__(33), + BackgroundItem: __webpack_require__(37), + BoxItem: __webpack_require__(35), + PointItem: __webpack_require__(36), + RangeItem: __webpack_require__(32) }, - Component: __webpack_require__(26), - CurrentTime: __webpack_require__(44), - CustomTime: __webpack_require__(42), - DataAxis: __webpack_require__(51), - GraphGroup: __webpack_require__(53), - Group: __webpack_require__(31), - BackgroundGroup: __webpack_require__(35), - ItemSet: __webpack_require__(29), - Legend: __webpack_require__(57), - LineGraph: __webpack_require__(50), - TimeAxis: __webpack_require__(39) + BackgroundGroup: __webpack_require__(34), + Component: __webpack_require__(25), + CurrentTime: __webpack_require__(43), + CustomTime: __webpack_require__(41), + DataAxis: __webpack_require__(50), + DataScale: __webpack_require__(51), + GraphGroup: __webpack_require__(52), + Group: __webpack_require__(30), + ItemSet: __webpack_require__(28), + Legend: __webpack_require__(56), + LineGraph: __webpack_require__(49), + TimeAxis: __webpack_require__(38) } }; // Network - exports.Network = __webpack_require__(59); + exports.Network = __webpack_require__(58); exports.network = { Images: __webpack_require__(116), dotparser: __webpack_require__(114), @@ -154,7 +155,7 @@ return /******/ (function(modules) { // webpackBootstrap // bundled external libraries exports.moment = __webpack_require__(2); exports.Hammer = __webpack_require__(20); - exports.keycharm = __webpack_require__(41); + exports.keycharm = __webpack_require__(40); /***/ }, /* 1 */ @@ -388,7 +389,11 @@ return /******/ (function(modules) { // webpackBootstrap } else if (Array.isArray(b[prop])) { throw new TypeError('Arrays are not supported by deepExtend'); } else { - a[prop] = b[prop]; + if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } else { + a[prop] = b[prop]; + } } } } @@ -433,7 +438,11 @@ return /******/ (function(modules) { // webpackBootstrap a[prop].push(b[prop][i]); } } else { - a[prop] = b[prop]; + if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } else { + a[prop] = b[prop]; + } } } } @@ -472,7 +481,11 @@ return /******/ (function(modules) { // webpackBootstrap a[prop].push(b[prop][i]); } } else { - a[prop] = b[prop]; + if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } else { + a[prop] = b[prop]; + } } } } @@ -551,11 +564,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return new Date(Number(match[1])); // parse number } else { - return moment(object).toDate(); // parse string - } + return moment(object).toDate(); // parse string + } } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); - } + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } case 'Moment': if (exports.isNumber(object)) { @@ -572,11 +585,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return moment(Number(match[1])); // parse number } else { - return moment(object); // parse string - } + return moment(object); // parse string + } } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); - } + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } case 'ISODate': if (exports.isNumber(object)) { @@ -591,11 +604,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return new Date(Number(match[1])).toISOString(); // parse number } else { - return new Date(object).toISOString(); // parse string - } + return new Date(object).toISOString(); // parse string + } } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate'); - } + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate'); + } case 'ASPDate': if (exports.isNumber(object)) { @@ -609,8 +622,8 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date value = new Date(Number(match[1])).valueOf(); // parse number } else { - value = new Date(object).valueOf(); // parse string - } + value = new Date(object).valueOf(); // parse string + } return '/Date(' + value + ')/'; } else { throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ASPDate'); @@ -842,13 +855,13 @@ return /******/ (function(modules) { // webpackBootstrap if (element.addEventListener) { if (useCapture === undefined) useCapture = false; - if (action === 'mousewheel' && navigator.userAgent.indexOf('Firefox') >= 0) { - action = 'DOMMouseScroll'; // For Firefox + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox } element.addEventListener(action, listener, useCapture); } else { - element.attachEvent('on' + action, listener); // IE browsers + element.attachEvent("on" + action, listener); // IE browsers } }; @@ -864,14 +877,14 @@ return /******/ (function(modules) { // webpackBootstrap // non-IE browsers if (useCapture === undefined) useCapture = false; - if (action === 'mousewheel' && navigator.userAgent.indexOf('Firefox') >= 0) { - action = 'DOMMouseScroll'; // For Firefox + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox } element.removeEventListener(action, listener, useCapture); } else { // IE browsers - element.detachEvent('on' + action, listener); + element.detachEvent("on" + action, listener); } }; @@ -884,8 +897,8 @@ return /******/ (function(modules) { // webpackBootstrap if (event.preventDefault) { event.preventDefault(); // non-IE browsers } else { - event.returnValue = false; // IE browsers - } + event.returnValue = false; // IE browsers + } }; /** @@ -1050,17 +1063,17 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} */ exports.overrideOpacity = function (color, opacity) { - if (color.indexOf('rgba') != -1) { + if (color.indexOf("rgba") != -1) { return color; - } else if (color.indexOf('rgb') != -1) { - var rgb = color.substr(color.indexOf('(') + 1).replace(')', '').split(','); - return 'rgba(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ',' + opacity + ')'; + } else if (color.indexOf("rgb") != -1) { + var rgb = color.substr(color.indexOf("(") + 1).replace(")", "").split(","); + return "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "," + opacity + ")"; } else { var rgb = exports.hexToRGB(color); if (rgb == null) { return color; } else { - return 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + opacity + ')'; + return "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + opacity + ")"; } } }; @@ -1074,7 +1087,7 @@ return /******/ (function(modules) { // webpackBootstrap * @constructor */ exports.RGBToHex = function (red, green, blue) { - return '#' + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1); + return "#" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1); }; /** @@ -1290,12 +1303,12 @@ return /******/ (function(modules) { // webpackBootstrap }; exports.isValidRGB = function (rgb) { - rgb = rgb.replace(' ', ''); + rgb = rgb.replace(" ", ""); var isOk = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(rgb); return isOk; }; exports.isValidRGBA = function (rgba) { - rgba = rgba.replace(' ', ''); + rgba = rgba.replace(" ", ""); var isOk = /rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(rgba); return isOk; }; @@ -1308,11 +1321,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} */ exports.selectiveBridgeObject = function (fields, referenceObject) { - if (typeof referenceObject == 'object') { + if (typeof referenceObject == "object") { var objectTo = Object.create(referenceObject); for (var i = 0; i < fields.length; i++) { if (referenceObject.hasOwnProperty(fields[i])) { - if (typeof referenceObject[fields[i]] == 'object') { + if (typeof referenceObject[fields[i]] == "object") { objectTo[fields[i]] = exports.bridgeObject(referenceObject[fields[i]]); } } @@ -1331,11 +1344,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} */ exports.bridgeObject = function (referenceObject) { - if (typeof referenceObject == 'object') { + if (typeof referenceObject == "object") { var objectTo = Object.create(referenceObject); for (var i in referenceObject) { if (referenceObject.hasOwnProperty(i)) { - if (typeof referenceObject[i] == 'object') { + if (typeof referenceObject[i] == "object") { objectTo[i] = exports.bridgeObject(referenceObject[i]); } } @@ -1346,6 +1359,24 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * This method provides a stable sort implementation, very fast for presorted data + * + * @param a the array + * @param a order comparator + * @returns {the array} + */ + exports.insertSort = function (a, compare) { + for (var i = 0; i < a.length; i++) { + var k = a[i]; + for (var j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) { + a[j] = a[j - 1]; + } + a[j] = k; + } + return a; + }; + /** * this is used to set the options of subobjects in the options object. A requirement of these subobjects * is that they have an 'enabled' element which is optional for the user but mandatory for the program. @@ -1353,14 +1384,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param [object] mergeTarget | this is either this.options or the options used for the groups. * @param [object] options | options * @param [String] option | this is the option key in the options argument - * @private */ exports.mergeOptions = function (mergeTarget, options, option) { var allowDeletion = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var globalOptions = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4]; if (options[option] === null) { - mergeTarget[option] = undefined; - delete mergeTarget[option]; + mergeTarget[option] = Object.create(globalOptions[option]); } else { if (options[option] !== undefined) { if (typeof options[option] === 'boolean') { @@ -1384,13 +1414,13 @@ return /******/ (function(modules) { // webpackBootstrap * this function will then iterate in both directions over this sorted list to find all visible items. * * @param {Item[]} orderedItems | Items ordered by start - * @param {function} searchFunction | -1 is lower, 0 is found, 1 is higher + * @param {function} comparator | -1 is lower, 0 is equal, 1 is higher * @param {String} field * @param {String} field2 * @returns {number} * @private */ - exports.binarySearchCustom = function (orderedItems, searchFunction, field, field2) { + exports.binarySearchCustom = function (orderedItems, comparator, field, field2) { var maxIterations = 10000; var iteration = 0; var low = 0; @@ -1402,7 +1432,7 @@ return /******/ (function(modules) { // webpackBootstrap var item = orderedItems[middle]; var value = field2 === undefined ? item[field] : item[field][field2]; - var searchResult = searchFunction(value); + var searchResult = comparator(value); if (searchResult == 0) { // jihaa, found a visible item! return middle; @@ -1429,16 +1459,21 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{start: number, end: number}} target * @param {String} field * @param {String} sidePreference 'before' or 'after' + * @param {function} comparator an optional comparator, returning -1,0,1 for <,==,>. * @returns {number} * @private */ - exports.binarySearchValue = function (orderedItems, target, field, sidePreference) { + exports.binarySearchValue = function (orderedItems, target, field, sidePreference, comparator) { var maxIterations = 10000; var iteration = 0; var low = 0; var high = orderedItems.length - 1; var prevValue, value, nextValue, middle; + var comparator = comparator != undefined ? comparator : function (a, b) { + return a == b ? 0 : a < b ? -1 : 1; + }; + while (low <= high && iteration < maxIterations) { // get a new guess middle = Math.floor(0.5 * (high + low)); @@ -1446,18 +1481,18 @@ return /******/ (function(modules) { // webpackBootstrap value = orderedItems[middle][field]; nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field]; - if (value == target) { + if (comparator(value, target) == 0) { // we found the target return middle; - } else if (prevValue < target && value > target) { + } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) { // target is in between of the previous and the current return sidePreference == 'before' ? Math.max(0, middle - 1) : middle; - } else if (value < target && nextValue > target) { + } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) { // target is in between of the current and the next return sidePreference == 'before' ? middle : Math.min(orderedItems.length - 1, middle + 1); } else { // didnt find the target, we need to change our boundaries. - if (value < target) { + if (comparator(value, target) < 0) { // it is too small --> increase low low = middle + 1; } else { @@ -1547,12 +1582,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {//! moment.js - //! version : 2.10.6 + //! version : 2.11.2 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com - (function (global, factory) { + ;(function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory() @@ -1669,39 +1704,45 @@ return /******/ (function(modules) { // webpackBootstrap return m; } + function isUndefined(input) { + return input === void 0; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. var momentProperties = utils_hooks__hooks.momentProperties = []; function copyConfig(to, from) { var i, prop, val; - if (typeof from._isAMomentObject !== 'undefined') { + if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } - if (typeof from._i !== 'undefined') { + if (!isUndefined(from._i)) { to._i = from._i; } - if (typeof from._f !== 'undefined') { + if (!isUndefined(from._f)) { to._f = from._f; } - if (typeof from._l !== 'undefined') { + if (!isUndefined(from._l)) { to._l = from._l; } - if (typeof from._strict !== 'undefined') { + if (!isUndefined(from._strict)) { to._strict = from._strict; } - if (typeof from._tzm !== 'undefined') { + if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } - if (typeof from._isUTC !== 'undefined') { + if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } - if (typeof from._offset !== 'undefined') { + if (!isUndefined(from._offset)) { to._offset = from._offset; } - if (typeof from._pf !== 'undefined') { + if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } - if (typeof from._locale !== 'undefined') { + if (!isUndefined(from._locale)) { to._locale = from._locale; } @@ -1709,7 +1750,7 @@ return /******/ (function(modules) { // webpackBootstrap for (i in momentProperties) { prop = momentProperties[i]; val = from[prop]; - if (typeof val !== 'undefined') { + if (!isUndefined(val)) { to[prop] = val; } } @@ -1756,6 +1797,7 @@ return /******/ (function(modules) { // webpackBootstrap return value; } + // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), @@ -1773,6 +1815,7 @@ return /******/ (function(modules) { // webpackBootstrap function Locale() { } + // internal storage for locale config files var locales = {}; var globalLocale; @@ -1810,7 +1853,7 @@ return /******/ (function(modules) { // webpackBootstrap function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node - if (!locales[name] && typeof module !== 'undefined' && + if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { oldLocale = globalLocale._abbr; @@ -1829,7 +1872,7 @@ return /******/ (function(modules) { // webpackBootstrap function locale_locales__getSetGlobalLocale (key, values) { var data; if (key) { - if (typeof values === 'undefined') { + if (isUndefined(values)) { data = locale_locales__getLocale(key); } else { @@ -1914,6 +1957,10 @@ return /******/ (function(modules) { // webpackBootstrap return normalizedInput; } + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { @@ -1927,11 +1974,14 @@ return /******/ (function(modules) { // webpackBootstrap } function get_set__get (mom, unit) { - return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function get_set__set (mom, unit, value) { - return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + if (mom.isValid()) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } } // MOMENTS @@ -1944,7 +1994,7 @@ return /******/ (function(modules) { // webpackBootstrap } } else { units = normalizeUnits(units); - if (typeof this[units] === 'function') { + if (isFunction(this[units])) { return this[units](value); } } @@ -1959,7 +2009,7 @@ return /******/ (function(modules) { // webpackBootstrap Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } - var formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; @@ -2055,6 +2105,8 @@ return /******/ (function(modules) { // webpackBootstrap var match4 = /\d{4}/; // 0000 - 9999 var match6 = /[+-]?\d{6}/; // -999999 - 999999 var match1to2 = /\d\d?/; // 0 - 99 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 var match1to3 = /\d{1,3}/; // 0 - 999 var match1to4 = /\d{1,4}/; // 0 - 9999 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 @@ -2063,23 +2115,19 @@ return /******/ (function(modules) { // webpackBootstrap var matchSigned = /[+-]?\d+/; // -inf - inf var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; - var regexes = {}; - - function isFunction (sth) { - // https://github.com/moment/moment/issues/2325 - return typeof sth === 'function' && - Object.prototype.toString.call(sth) === '[object Function]'; - } + var regexes = {}; function addRegexToken (token, regex, strictRegex) { - regexes[token] = isFunction(regex) ? regex : function (isStrict) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return (isStrict && strictRegex) ? strictRegex : regex; }; } @@ -2094,9 +2142,13 @@ return /******/ (function(modules) { // webpackBootstrap // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { - return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; - }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; @@ -2136,6 +2188,8 @@ return /******/ (function(modules) { // webpackBootstrap var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; function daysInMonth(year, month) { return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); @@ -2163,8 +2217,12 @@ return /******/ (function(modules) { // webpackBootstrap addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); - addRegexToken('MMM', matchWord); - addRegexToken('MMMM', matchWord); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; @@ -2182,14 +2240,17 @@ return /******/ (function(modules) { // webpackBootstrap // LOCALES + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); - function localeMonths (m) { - return this._months[m.month()]; + function localeMonths (m, format) { + return isArray(this._months) ? this._months[m.month()] : + this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); - function localeMonthsShort (m) { - return this._monthsShort[m.month()]; + function localeMonthsShort (m, format) { + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function localeMonthsParse (monthName, format, strict) { @@ -2228,6 +2289,11 @@ return /******/ (function(modules) { // webpackBootstrap function setMonth (mom, value) { var dayOfMonth; + if (!mom.isValid()) { + // No op + return mom; + } + // TODO: Move this out of here! if (typeof value === 'string') { value = mom.localeData().monthsParse(value); @@ -2256,6 +2322,72 @@ return /******/ (function(modules) { // webpackBootstrap return daysInMonth(this.year(), this.month()); } + var defaultMonthsShortRegex = matchWord; + function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')$', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')$', 'i'); + } + function checkOverflow (m) { var overflow; var a = m._a; @@ -2273,6 +2405,12 @@ return /******/ (function(modules) { // webpackBootstrap if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } getParsingFlags(m).overflow = overflow; } @@ -2281,7 +2419,8 @@ return /******/ (function(modules) { // webpackBootstrap } function warn(msg) { - if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + if (utils_hooks__hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { console.warn('Deprecation warning: ' + msg); } } @@ -2291,7 +2430,7 @@ return /******/ (function(modules) { // webpackBootstrap return extend(function () { if (firstTime) { - warn(msg + '\n' + (new Error()).stack); + warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); @@ -2309,22 +2448,39 @@ return /******/ (function(modules) { // webpackBootstrap utils_hooks__hooks.suppressDeprecationWarnings = false; - var from_string__isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], - ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], - ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], - ['GGGG-[W]WW', /\d{4}-W\d{2}/], - ['YYYY-DDD', /\d{4}-\d{3}/] + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] ]; // iso time formats and regexes var isoTimes = [ - ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], - ['HH:mm', /(T| )\d\d:\d\d/], - ['HH', /(T| )\d\d/] + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] ]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; @@ -2333,26 +2489,49 @@ return /******/ (function(modules) { // webpackBootstrap function configFromISO(config) { var i, l, string = config._i, - match = from_string__isoRegex.exec(string); + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; + for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(string)) { - config._f = isoDates[i][0]; + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; break; } } - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(string)) { - // match[6] should be 'T' or space - config._f += (match[6] || ' ') + isoTimes[i][0]; - break; + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; } } - if (string.match(matchOffset)) { - config._f += 'Z'; + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; @@ -2390,8 +2569,8 @@ return /******/ (function(modules) { // webpackBootstrap //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply var date = new Date(y, m, d, h, M, s, ms); - //the date constructor doesn't accept years < 1970 - if (y < 1970) { + //the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { date.setFullYear(y); } return date; @@ -2399,12 +2578,21 @@ return /******/ (function(modules) { // webpackBootstrap function createUTCDate (y) { var date = new Date(Date.UTC.apply(null, arguments)); - if (y < 1970) { + + //the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } return date; } + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); @@ -2432,6 +2620,9 @@ return /******/ (function(modules) { // webpackBootstrap addParseToken('YY', function (input, array) { array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS @@ -2457,124 +2648,66 @@ return /******/ (function(modules) { // webpackBootstrap return isLeapYear(this.year()); } - addFormatToken('w', ['ww', 2], 'wo', 'week'); - addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - - // ALIASES - - addUnitAlias('week', 'w'); - addUnitAlias('isoWeek', 'W'); - - // PARSING - - addRegexToken('w', match1to2); - addRegexToken('ww', match1to2, match2); - addRegexToken('W', match1to2); - addRegexToken('WW', match1to2, match2); - - addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); - }); - - // HELPERS - - // firstDayOfWeek 0 = sun, 6 = sat - // the day of the week that starts the week - // (usually sunday or monday) - // firstDayOfWeekOfYear 0 = sun, 6 = sat - // the first week is the week that contains the first - // of this day of the week - // (eg. ISO weeks use thursday (4)) - function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { - var end = firstDayOfWeekOfYear - firstDayOfWeek, - daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), - adjustedMoment; - + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - if (daysToDayOfWeek > end) { - daysToDayOfWeek -= 7; - } + return -fwdlw + fwd - 1; + } - if (daysToDayOfWeek < end - 7) { - daysToDayOfWeek += 7; + //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; } - adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd'); return { - week: Math.ceil(adjustedMoment.dayOfYear() / 7), - year: adjustedMoment.year() + year: resYear, + dayOfYear: resDayOfYear }; } - // LOCALES - - function localeWeek (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - } - - var defaultLocaleWeek = { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. - }; - - function localeFirstDayOfWeek () { - return this._week.dow; - } - - function localeFirstDayOfYear () { - return this._week.doy; - } - - // MOMENTS - - function getSetWeek (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - function getSetISOWeek (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - } + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; - addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); - - // ALIASES - - addUnitAlias('dayOfYear', 'DDD'); - - // PARSING - - addRegexToken('DDD', match1to3); - addRegexToken('DDDD', match3); - addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); - }); - - // HELPERS - - //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { - var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, janX = createUTCDate(year, 0, 1 + week1Jan), d = janX.getUTCDay(), dayOfYear; - if (d < firstDayOfWeek) { - d += 7; + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; } - weekday = weekday != null ? 1 * weekday : firstDayOfWeek; - - dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday; - return { - year: dayOfYear > 0 ? year : year - 1, - dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear + week: resWeek, + year: resYear }; } - // MOMENTS - - function getSetDayOfYear (input) { - var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // Pick the first defined of two or three arguments. @@ -2589,11 +2722,12 @@ return /******/ (function(modules) { // webpackBootstrap } function currentDateArray(config) { - var now = new Date(); + // hooks is actually the exported moment object + var nowValue = new Date(utils_hooks__hooks.now()); if (config._useUTC) { - return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } - return [now.getFullYear(), now.getMonth(), now.getDate()]; + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. @@ -2663,7 +2797,7 @@ return /******/ (function(modules) { // webpackBootstrap } function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp; + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { @@ -2677,6 +2811,9 @@ return /******/ (function(modules) { // webpackBootstrap weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; @@ -2687,23 +2824,32 @@ return /******/ (function(modules) { // webpackBootstrap if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; - if (weekday < dow) { - ++week; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from begining of week weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } } else { // default to begining of week weekday = dow; } } - temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); - - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } } + // constant that refers to the ISO standard utils_hooks__hooks.ISO_8601 = function () {}; // date from string and format string @@ -2728,6 +2874,8 @@ return /******/ (function(modules) { // webpackBootstrap for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { @@ -2796,6 +2944,7 @@ return /******/ (function(modules) { // webpackBootstrap } } + // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, @@ -2846,7 +2995,9 @@ return /******/ (function(modules) { // webpackBootstrap } var i = normalizeObjectUnits(config._i); - config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond]; + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); configFromArray(config); } @@ -2888,13 +3039,17 @@ return /******/ (function(modules) { // webpackBootstrap configFromInput(config); } + if (!valid__isValid(config)) { + config._d = null; + } + return config; } function configFromInput(config) { var input = config._i; if (input === undefined) { - config._d = new Date(); + config._d = new Date(utils_hooks__hooks.now()); } else if (isDate(input)) { config._d = new Date(+input); } else if (typeof input === 'string') { @@ -2941,7 +3096,11 @@ return /******/ (function(modules) { // webpackBootstrap 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', function () { var other = local__createLocal.apply(null, arguments); - return other < this ? this : other; + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return valid__createInvalid(); + } } ); @@ -2949,7 +3108,11 @@ return /******/ (function(modules) { // webpackBootstrap 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', function () { var other = local__createLocal.apply(null, arguments); - return other > this ? this : other; + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return valid__createInvalid(); + } } ); @@ -2988,6 +3151,10 @@ return /******/ (function(modules) { // webpackBootstrap return pickBy('isAfter', args); } + var now = function () { + return Date.now ? Date.now() : +(new Date()); + }; + function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, @@ -3027,6 +3194,8 @@ return /******/ (function(modules) { // webpackBootstrap return obj instanceof Duration; } + // FORMATTING + function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); @@ -3044,11 +3213,11 @@ return /******/ (function(modules) { // webpackBootstrap // PARSING - addRegexToken('Z', matchOffset); - addRegexToken('ZZ', matchOffset); + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; - config._tzm = offsetFromString(input); + config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS @@ -3058,8 +3227,8 @@ return /******/ (function(modules) { // webpackBootstrap // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; - function offsetFromString(string) { - var matches = ((string || '').match(matchOffset) || []); + function offsetFromString(matcher, string) { + var matches = ((string || '').match(matcher) || []); var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); @@ -3109,11 +3278,13 @@ return /******/ (function(modules) { // webpackBootstrap function getSetOffset (input, keepLocalTime) { var offset = this._offset || 0, localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } if (input != null) { if (typeof input === 'string') { - input = offsetFromString(input); - } - if (Math.abs(input) < 16) { + input = offsetFromString(matchShortOffset, input); + } else if (Math.abs(input) < 16) { input = input * 60; } if (!this._isUTC && keepLocalTime) { @@ -3173,12 +3344,15 @@ return /******/ (function(modules) { // webpackBootstrap if (this._tzm) { this.utcOffset(this._tzm); } else if (typeof this._i === 'string') { - this.utcOffset(offsetFromString(this._i)); + this.utcOffset(offsetFromString(matchOffset, this._i)); } return this; } function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } input = input ? local__createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; @@ -3192,7 +3366,7 @@ return /******/ (function(modules) { // webpackBootstrap } function isDaylightSavingTimeShifted () { - if (typeof this._isDSTShifted !== 'undefined') { + if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } @@ -3213,22 +3387,23 @@ return /******/ (function(modules) { // webpackBootstrap } function isLocal () { - return !this._isUTC; + return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { - return this._isUTC; + return this.isValid() ? this._isUTC : false; } function isUtc () { - return this._isUTC && this._offset === 0; + return this.isValid() ? this._isUTC && this._offset === 0 : false; } - var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/; + // ASP.NET json date format regex + var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; + var isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; function create__createDuration (input, key) { var duration = input, @@ -3261,7 +3436,7 @@ return /******/ (function(modules) { // webpackBootstrap s : toInt(match[SECOND]) * sign, ms : toInt(match[MILLISECOND]) * sign }; - } else if (!!(match = create__isoRegex.exec(input))) { + } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : parseIso(match[2], sign), @@ -3318,6 +3493,10 @@ return /******/ (function(modules) { // webpackBootstrap function momentsDifference(base, other) { var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); @@ -3330,6 +3509,7 @@ return /******/ (function(modules) { // webpackBootstrap return res; } + // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; @@ -3350,6 +3530,12 @@ return /******/ (function(modules) { // webpackBootstrap var milliseconds = duration._milliseconds, days = duration._days, months = duration._months; + + if (!mom.isValid()) { + // No op + return; + } + updateOffset = updateOffset == null ? true : updateOffset; if (milliseconds) { @@ -3381,7 +3567,10 @@ return /******/ (function(modules) { // webpackBootstrap diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now))); + + var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); } function clone () { @@ -3389,26 +3578,28 @@ return /******/ (function(modules) { // webpackBootstrap } function isAfter (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + var localInput = isMoment(input) ? input : local__createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { - input = isMoment(input) ? input : local__createLocal(input); - return +this > +input; + return +this > +localInput; } else { - inputMs = isMoment(input) ? +input : +local__createLocal(input); - return inputMs < +this.clone().startOf(units); + return +localInput < +this.clone().startOf(units); } } function isBefore (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + var localInput = isMoment(input) ? input : local__createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { - input = isMoment(input) ? input : local__createLocal(input); - return +this < +input; + return +this < +localInput; } else { - inputMs = isMoment(input) ? +input : +local__createLocal(input); - return +this.clone().endOf(units) < inputMs; + return +this.clone().endOf(units) < +localInput; } } @@ -3417,22 +3608,45 @@ return /******/ (function(modules) { // webpackBootstrap } function isSame (input, units) { - var inputMs; + var localInput = isMoment(input) ? input : local__createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } units = normalizeUnits(units || 'millisecond'); if (units === 'millisecond') { - input = isMoment(input) ? input : local__createLocal(input); - return +this === +input; + return +this === +localInput; } else { - inputMs = +local__createLocal(input); + inputMs = +localInput; return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); } } + function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input,units); + } + + function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input,units); + } + function diff (input, units, asFloat) { - var that = cloneWithOffset(input, this), - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4, + var that, + zoneDelta, delta, output; + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); if (units === 'year' || units === 'month' || units === 'quarter') { @@ -3483,7 +3697,7 @@ return /******/ (function(modules) { // webpackBootstrap function moment_format__toISOString () { var m = this.clone().utc(); if (0 < m.year() && m.year() <= 9999) { - if ('function' === typeof Date.prototype.toISOString) { + if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can return this.toDate().toISOString(); } else { @@ -3500,10 +3714,13 @@ return /******/ (function(modules) { // webpackBootstrap } function from (time, withoutSuffix) { - if (!this.isValid()) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + local__createLocal(time).isValid())) { + return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { return this.localeData().invalidDate(); } - return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } function fromNow (withoutSuffix) { @@ -3511,16 +3728,22 @@ return /******/ (function(modules) { // webpackBootstrap } function to (time, withoutSuffix) { - if (!this.isValid()) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + local__createLocal(time).isValid())) { + return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { return this.localeData().invalidDate(); } - return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); } function toNow (withoutSuffix) { return this.to(local__createLocal(), withoutSuffix); } + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. function locale (key) { var newLocaleData; @@ -3631,6 +3854,11 @@ return /******/ (function(modules) { // webpackBootstrap }; } + function toJSON () { + // JSON.stringify(new Date(NaN)) === 'null' + return this.isValid() ? this.toISOString() : 'null'; + } + function moment_valid__isValid () { return valid__isValid(this); } @@ -3643,6 +3871,18 @@ return /******/ (function(modules) { // webpackBootstrap return getParsingFlags(this).overflow; } + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + + // FORMATTING + addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); @@ -3684,22 +3924,20 @@ return /******/ (function(modules) { // webpackBootstrap week[token] = utils_hooks__hooks.parseTwoDigitYear(input); }); - // HELPERS - - function weeksInYear(year, dow, doy) { - return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week; - } - // MOMENTS function getSetWeekYear (input) { - var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; - return input == null ? year : this.add((input - year), 'y'); + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); } function getSetISOWeekYear (input) { - var year = weekOfYear(this, 1, 4).year; - return input == null ? year : this.add((input - year), 'y'); + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { @@ -3711,7 +3949,33 @@ return /******/ (function(modules) { // webpackBootstrap return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } - addFormatToken('Q', 0, 0, 'quarter'); + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + // console.log("got", weekYear, week, weekday, "set", date.toISOString()); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES @@ -3730,6 +3994,62 @@ return /******/ (function(modules) { // webpackBootstrap return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. + }; + + function localeFirstDayOfWeek () { + return this._week.dow; + } + + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES @@ -3753,6 +4073,8 @@ return /******/ (function(modules) { // webpackBootstrap var getSetDayOfMonth = makeGetSet('Date', true); + // FORMATTING + addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { @@ -3785,8 +4107,8 @@ return /******/ (function(modules) { // webpackBootstrap addRegexToken('ddd', matchWord); addRegexToken('dddd', matchWord); - addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) { - var weekday = config._locale.weekdaysParse(input); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; @@ -3821,8 +4143,9 @@ return /******/ (function(modules) { // webpackBootstrap // LOCALES var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); - function localeWeekdays (m) { - return this._weekdays[m.day()]; + function localeWeekdays (m, format) { + return isArray(this._weekdays) ? this._weekdays[m.day()] : + this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); @@ -3835,20 +4158,37 @@ return /******/ (function(modules) { // webpackBootstrap return this._weekdaysMin[m.day()]; } - function localeWeekdaysParse (weekdayName) { + function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; - this._weekdaysParse = this._weekdaysParse || []; + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } for (i = 0; i < 7; i++) { // make the regex if we don't have it already + + mom = local__createLocal([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + } if (!this._weekdaysParse[i]) { - mom = local__createLocal([2000, 1]).day(i); regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex - if (this._weekdaysParse[i].test(weekdayName)) { + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } @@ -3857,6 +4197,9 @@ return /******/ (function(modules) { // webpackBootstrap // MOMENTS function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); @@ -3867,20 +4210,73 @@ return /******/ (function(modules) { // webpackBootstrap } function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); } - addFormatToken('H', ['HH', 2], 0, 'hour'); - addFormatToken('h', ['hh', 2], 0, function () { + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // FORMATTING + + function hFormat() { return this.hours() % 12 || 12; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { @@ -3909,6 +4305,11 @@ return /******/ (function(modules) { // webpackBootstrap addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); @@ -3918,6 +4319,32 @@ return /******/ (function(modules) { // webpackBootstrap array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES @@ -3945,6 +4372,8 @@ return /******/ (function(modules) { // webpackBootstrap // this rule. var getSetHour = makeGetSet('Hours', true); + // FORMATTING + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES @@ -3961,6 +4390,8 @@ return /******/ (function(modules) { // webpackBootstrap var getSetMinute = makeGetSet('Minutes', false); + // FORMATTING + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES @@ -3977,6 +4408,8 @@ return /******/ (function(modules) { // webpackBootstrap var getSetSecond = makeGetSet('Seconds', false); + // FORMATTING + addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); @@ -4032,6 +4465,8 @@ return /******/ (function(modules) { // webpackBootstrap var getSetMillisecond = makeGetSet('Milliseconds', false); + // FORMATTING + addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); @@ -4047,40 +4482,43 @@ return /******/ (function(modules) { // webpackBootstrap var momentPrototype__proto = Moment.prototype; - momentPrototype__proto.add = add_subtract__add; - momentPrototype__proto.calendar = moment_calendar__calendar; - momentPrototype__proto.clone = clone; - momentPrototype__proto.diff = diff; - momentPrototype__proto.endOf = endOf; - momentPrototype__proto.format = format; - momentPrototype__proto.from = from; - momentPrototype__proto.fromNow = fromNow; - momentPrototype__proto.to = to; - momentPrototype__proto.toNow = toNow; - momentPrototype__proto.get = getSet; - momentPrototype__proto.invalidAt = invalidAt; - momentPrototype__proto.isAfter = isAfter; - momentPrototype__proto.isBefore = isBefore; - momentPrototype__proto.isBetween = isBetween; - momentPrototype__proto.isSame = isSame; - momentPrototype__proto.isValid = moment_valid__isValid; - momentPrototype__proto.lang = lang; - momentPrototype__proto.locale = locale; - momentPrototype__proto.localeData = localeData; - momentPrototype__proto.max = prototypeMax; - momentPrototype__proto.min = prototypeMin; - momentPrototype__proto.parsingFlags = parsingFlags; - momentPrototype__proto.set = getSet; - momentPrototype__proto.startOf = startOf; - momentPrototype__proto.subtract = add_subtract__subtract; - momentPrototype__proto.toArray = toArray; - momentPrototype__proto.toObject = toObject; - momentPrototype__proto.toDate = toDate; - momentPrototype__proto.toISOString = moment_format__toISOString; - momentPrototype__proto.toJSON = moment_format__toISOString; - momentPrototype__proto.toString = toString; - momentPrototype__proto.unix = unix; - momentPrototype__proto.valueOf = to_type__valueOf; + momentPrototype__proto.add = add_subtract__add; + momentPrototype__proto.calendar = moment_calendar__calendar; + momentPrototype__proto.clone = clone; + momentPrototype__proto.diff = diff; + momentPrototype__proto.endOf = endOf; + momentPrototype__proto.format = format; + momentPrototype__proto.from = from; + momentPrototype__proto.fromNow = fromNow; + momentPrototype__proto.to = to; + momentPrototype__proto.toNow = toNow; + momentPrototype__proto.get = getSet; + momentPrototype__proto.invalidAt = invalidAt; + momentPrototype__proto.isAfter = isAfter; + momentPrototype__proto.isBefore = isBefore; + momentPrototype__proto.isBetween = isBetween; + momentPrototype__proto.isSame = isSame; + momentPrototype__proto.isSameOrAfter = isSameOrAfter; + momentPrototype__proto.isSameOrBefore = isSameOrBefore; + momentPrototype__proto.isValid = moment_valid__isValid; + momentPrototype__proto.lang = lang; + momentPrototype__proto.locale = locale; + momentPrototype__proto.localeData = localeData; + momentPrototype__proto.max = prototypeMax; + momentPrototype__proto.min = prototypeMin; + momentPrototype__proto.parsingFlags = parsingFlags; + momentPrototype__proto.set = getSet; + momentPrototype__proto.startOf = startOf; + momentPrototype__proto.subtract = add_subtract__subtract; + momentPrototype__proto.toArray = toArray; + momentPrototype__proto.toObject = toObject; + momentPrototype__proto.toDate = toDate; + momentPrototype__proto.toISOString = moment_format__toISOString; + momentPrototype__proto.toJSON = toJSON; + momentPrototype__proto.toString = toString; + momentPrototype__proto.unix = unix; + momentPrototype__proto.valueOf = to_type__valueOf; + momentPrototype__proto.creationData = creationData; // Year momentPrototype__proto.year = getSetYear; @@ -4166,7 +4604,7 @@ return /******/ (function(modules) { // webpackBootstrap function locale_calendar__calendar (key, mom, now) { var output = this._calendar[key]; - return typeof output === 'function' ? output.call(mom, now) : output; + return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { @@ -4228,21 +4666,21 @@ return /******/ (function(modules) { // webpackBootstrap function relative__relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; - return (typeof output === 'function') ? + return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); + return isFunction(format) ? format(output) : format.replace(/%s/i, output); } function locale_set__set (config) { var prop, i; for (i in config) { prop = config[i]; - if (typeof prop === 'function') { + if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; @@ -4272,11 +4710,15 @@ return /******/ (function(modules) { // webpackBootstrap prototype__proto.set = locale_set__set; // Month - prototype__proto.months = localeMonths; - prototype__proto._months = defaultLocaleMonths; - prototype__proto.monthsShort = localeMonthsShort; - prototype__proto._monthsShort = defaultLocaleMonthsShort; - prototype__proto.monthsParse = localeMonthsParse; + prototype__proto.months = localeMonths; + prototype__proto._months = defaultLocaleMonths; + prototype__proto.monthsShort = localeMonthsShort; + prototype__proto._monthsShort = defaultLocaleMonthsShort; + prototype__proto.monthsParse = localeMonthsParse; + prototype__proto._monthsRegex = defaultMonthsRegex; + prototype__proto.monthsRegex = monthsRegex; + prototype__proto._monthsShortRegex = defaultMonthsShortRegex; + prototype__proto.monthsShortRegex = monthsShortRegex; // Week prototype__proto.week = localeWeek; @@ -4564,15 +5006,15 @@ return /******/ (function(modules) { // webpackBootstrap var years = round(duration.as('y')); var a = seconds < thresholds.s && ['s', seconds] || - minutes === 1 && ['m'] || + minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || - hours === 1 && ['h'] || + hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || - days === 1 && ['d'] || + days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || - months === 1 && ['M'] || + months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || - years === 1 && ['y'] || ['yy', years]; + years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; @@ -4693,6 +5135,8 @@ return /******/ (function(modules) { // webpackBootstrap // Side effect imports + // FORMATTING + addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); @@ -4710,13 +5154,14 @@ return /******/ (function(modules) { // webpackBootstrap // Side effect imports - utils_hooks__hooks.version = '2.10.6'; + utils_hooks__hooks.version = '2.11.2'; setHookCallback(local__createLocal); utils_hooks__hooks.fn = momentPrototype; utils_hooks__hooks.min = min; utils_hooks__hooks.max = max; + utils_hooks__hooks.now = now; utils_hooks__hooks.utc = create_utc__createUTC; utils_hooks__hooks.unix = moment__createUnix; utils_hooks__hooks.months = lists__listMonths; @@ -4735,6 +5180,7 @@ return /******/ (function(modules) { // webpackBootstrap utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits = normalizeUnits; utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; + utils_hooks__hooks.prototype = momentPrototype; var _moment = utils_hooks__hooks; @@ -5032,6 +5478,16 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param JSONcontainer + */ + exports.resetElements = function (JSONcontainer) { + exports.prepareElements(JSONcontainer); + exports.cleanupElements(JSONcontainer); + exports.prepareElements(JSONcontainer); + }; + /** * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. @@ -5125,21 +5581,21 @@ return /******/ (function(modules) { // webpackBootstrap var point; if (groupTemplate.style == 'circle') { point = exports.getSVGElement('circle', JSONcontainer, svgContainer); - point.setAttributeNS(null, 'cx', x); - point.setAttributeNS(null, 'cy', y); - point.setAttributeNS(null, 'r', 0.5 * groupTemplate.size); + point.setAttributeNS(null, "cx", x); + point.setAttributeNS(null, "cy", y); + point.setAttributeNS(null, "r", 0.5 * groupTemplate.size); } else { point = exports.getSVGElement('rect', JSONcontainer, svgContainer); - point.setAttributeNS(null, 'x', x - 0.5 * groupTemplate.size); - point.setAttributeNS(null, 'y', y - 0.5 * groupTemplate.size); - point.setAttributeNS(null, 'width', groupTemplate.size); - point.setAttributeNS(null, 'height', groupTemplate.size); + point.setAttributeNS(null, "x", x - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "y", y - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "width", groupTemplate.size); + point.setAttributeNS(null, "height", groupTemplate.size); } - if (groupTemplate.style !== undefined) { - point.setAttributeNS(null, 'style', groupTemplate.style); + if (groupTemplate.styles !== undefined) { + point.setAttributeNS(null, "style", groupTemplate.styles); } - point.setAttributeNS(null, 'class', groupTemplate.className + ' vis-point'); + point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); //handle label if (labelObj) { @@ -5156,10 +5612,10 @@ return /******/ (function(modules) { // webpackBootstrap } if (labelObj.className) { - label.setAttributeNS(null, 'class', labelObj.className + ' vis-label'); + label.setAttributeNS(null, "class", labelObj.className + " vis-label"); } - label.setAttributeNS(null, 'x', x); - label.setAttributeNS(null, 'y', y); + label.setAttributeNS(null, "x", x); + label.setAttributeNS(null, "y", y); } return point; @@ -5179,13 +5635,13 @@ return /******/ (function(modules) { // webpackBootstrap y -= height; } var rect = exports.getSVGElement('rect', JSONcontainer, svgContainer); - rect.setAttributeNS(null, 'x', x - 0.5 * width); - rect.setAttributeNS(null, 'y', y); - rect.setAttributeNS(null, 'width', width); - rect.setAttributeNS(null, 'height', height); - rect.setAttributeNS(null, 'class', className); + rect.setAttributeNS(null, "x", x - 0.5 * width); + rect.setAttributeNS(null, "y", y); + rect.setAttributeNS(null, "width", width); + rect.setAttributeNS(null, "height", height); + rect.setAttributeNS(null, "class", className); if (style) { - rect.setAttributeNS(null, 'style', style); + rect.setAttributeNS(null, "style", style); } } }; @@ -5258,14 +5714,14 @@ return /******/ (function(modules) { // webpackBootstrap // all variants of a Date are internally stored as Date, so we can convert // from everything to everything (also from ISODate to Number for example) if (this._options.type) { - for (var field in this._options.type) { - if (this._options.type.hasOwnProperty(field)) { - var value = this._options.type[field]; - if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { - this._type[field] = 'Date'; - } else { - this._type[field] = value; - } + var fields = Object.keys(this._options.type); + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = this._options.type[field]; + if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { + this._type[field] = 'Date'; + } else { + this._type[field] = value; } } } @@ -5382,7 +5838,7 @@ return /******/ (function(modules) { // webpackBootstrap subscribers = subscribers.concat(this._subscribers['*']); } - for (var i = 0; i < subscribers.length; i++) { + for (var i = 0, len = subscribers.length; i < len; i++) { var subscriber = subscribers[i]; if (subscriber.callback) { subscriber.callback(event, params, senderId || null); @@ -5432,6 +5888,7 @@ return /******/ (function(modules) { // webpackBootstrap DataSet.prototype.update = function (data, senderId) { var addedIds = []; var updatedIds = []; + var oldData = []; var updatedData = []; var me = this; var fieldId = me._fieldId; @@ -5439,10 +5896,12 @@ return /******/ (function(modules) { // webpackBootstrap var addOrUpdate = function addOrUpdate(item) { var id = item[fieldId]; if (me._data[id]) { + var oldItem = util.extend({}, me._data[id]); // update item id = me._updateItem(item); updatedIds.push(id); updatedData.push(item); + oldData.push(oldItem); } else { // add new item id = me._addItem(item); @@ -5453,7 +5912,11 @@ return /******/ (function(modules) { // webpackBootstrap if (Array.isArray(data)) { // Array for (var i = 0, len = data.length; i < len; i++) { - addOrUpdate(data[i]); + if (data[i] instanceof Object) { + addOrUpdate(data[i]); + } else { + console.warn('Ignoring input item, which is not an object at index ' + i); + } } } else if (data instanceof Object) { // Single item @@ -5466,7 +5929,15 @@ return /******/ (function(modules) { // webpackBootstrap this._trigger('add', { items: addedIds }, senderId); } if (updatedIds.length) { - this._trigger('update', { items: updatedIds, data: updatedData }, senderId); + var props = { items: updatedIds, oldData: oldData, data: updatedData }; + // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + this._trigger('update', props, senderId); } return addedIds.concat(updatedIds); @@ -5532,6 +6003,7 @@ return /******/ (function(modules) { // webpackBootstrap var filter = options && options.filter; var items = [], item, + itemIds, itemId, i, len; @@ -5540,7 +6012,7 @@ return /******/ (function(modules) { // webpackBootstrap if (id != undefined) { // return a single item item = me._getItem(id, type); - if (filter && !filter(item)) { + if (item && filter && !filter(item)) { item = null; } } else if (ids != undefined) { @@ -5553,12 +6025,12 @@ return /******/ (function(modules) { // webpackBootstrap } } else { // return all items - for (itemId in this._data) { - if (this._data.hasOwnProperty(itemId)) { - item = me._getItem(itemId, type); - if (!filter || filter(item)) { - items.push(item); - } + itemIds = Object.keys(this._data); + for (i = 0, len = itemIds.length; i < len; i++) { + itemId = itemIds[i]; + item = me._getItem(itemId, type); + if (!filter || filter(item)) { + items.push(item); } } } @@ -5582,9 +6054,11 @@ return /******/ (function(modules) { // webpackBootstrap // return the results if (returnType == 'Object') { - var result = {}; - for (i = 0; i < items.length; i++) { - result[items[i].id] = items[i]; + var result = {}, + resultant; + for (i = 0, len = items.length; i < len; i++) { + resultant = items[i]; + result[resultant.id] = resultant; } return result; } else { @@ -5611,6 +6085,7 @@ return /******/ (function(modules) { // webpackBootstrap filter = options && options.filter, order = options && options.order, type = options && options.type || this._options.type, + itemIds = Object.keys(data), i, len, id, @@ -5623,28 +6098,26 @@ return /******/ (function(modules) { // webpackBootstrap if (order) { // create ordered list items = []; - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (filter(item)) { - items.push(item); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + items.push(item); } } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { - ids[i] = items[i][this._fieldId]; + ids.push(items[i][this._fieldId]); } } else { // create unordered list - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (filter(item)) { - ids.push(item[this._fieldId]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + ids.push(item[this._fieldId]); } } } @@ -5653,24 +6126,22 @@ return /******/ (function(modules) { // webpackBootstrap if (order) { // create an ordered list items = []; - for (id in data) { - if (data.hasOwnProperty(id)) { - items.push(data[id]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + items.push(data[id]); } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { - ids[i] = items[i][this._fieldId]; + ids.push(items[i][this._fieldId]); } } else { // create unordered list - for (id in data) { - if (data.hasOwnProperty(id)) { - item = data[id]; - ids.push(item[this._fieldId]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = data[id]; + ids.push(item[this._fieldId]); } } } @@ -5700,6 +6171,9 @@ return /******/ (function(modules) { // webpackBootstrap var filter = options && options.filter, type = options && options.type || this._options.type, data = this._data, + itemIds = Object.keys(data), + i, + len, item, id; @@ -5707,19 +6181,18 @@ return /******/ (function(modules) { // webpackBootstrap // execute forEach on ordered list var items = this.get(options); - for (var i = 0, len = items.length; i < len; i++) { + for (i = 0, len = items.length; i < len; i++) { item = items[i]; id = item[this._fieldId]; callback(item, id); } } else { // unordered - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (!filter || filter(item)) { - callback(item, id); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + callback(item, id); } } } @@ -5741,15 +6214,18 @@ return /******/ (function(modules) { // webpackBootstrap type = options && options.type || this._options.type, mappedItems = [], data = this._data, + itemIds = Object.keys(data), + i, + len, + id, item; // convert and filter items - for (var id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (!filter || filter(item)) { - mappedItems.push(callback(item, id)); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); } } @@ -5774,17 +6250,23 @@ return /******/ (function(modules) { // webpackBootstrap return item; } - var filteredItem = {}; + var filteredItem = {}, + itemFields = Object.keys(item), + len = itemFields.length, + i, + field; if (Array.isArray(fields)) { - for (var field in item) { - if (item.hasOwnProperty(field) && fields.indexOf(field) != -1) { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.indexOf(field) != -1) { filteredItem[field] = item[field]; } } } else { - for (var field in item) { - if (item.hasOwnProperty(field) && fields.hasOwnProperty(field)) { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.hasOwnProperty(field)) { filteredItem[fields[field]] = item[field]; } } @@ -5815,8 +6297,8 @@ return /******/ (function(modules) { // webpackBootstrap // TODO: extend order by an Object {field:String, direction:String} // where direction can be 'asc' or 'desc' else { - throw new TypeError('Order must be a function or a string'); - } + throw new TypeError('Order must be a function or a string'); + } }; /** @@ -5868,7 +6350,7 @@ return /******/ (function(modules) { // webpackBootstrap } } else if (id instanceof Object) { var itemId = id[this._fieldId]; - if (itemId && this._data[itemId]) { + if (itemId !== undefined && this._data[itemId]) { delete this._data[itemId]; this.length--; return itemId; @@ -5900,17 +6382,19 @@ return /******/ (function(modules) { // webpackBootstrap */ DataSet.prototype.max = function (field) { var data = this._data, + itemIds = Object.keys(data), max = null, - maxField = null; + maxField = null, + i, + len; - for (var id in data) { - if (data.hasOwnProperty(id)) { - var item = data[id]; - var itemField = item[field]; - if (itemField != null && (!max || itemField > maxField)) { - max = item; - maxField = itemField; - } + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!max || itemField > maxField)) { + max = item; + maxField = itemField; } } @@ -5924,17 +6408,19 @@ return /******/ (function(modules) { // webpackBootstrap */ DataSet.prototype.min = function (field) { var data = this._data, + itemIds = Object.keys(data), min = null, - minField = null; + minField = null, + i, + len; - for (var id in data) { - if (data.hasOwnProperty(id)) { - var item = data[id]; - var itemField = item[field]; - if (itemField != null && (!min || itemField < minField)) { - min = item; - minField = itemField; - } + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!min || itemField < minField)) { + min = item; + minField = itemField; } } @@ -5950,31 +6436,31 @@ return /******/ (function(modules) { // webpackBootstrap */ DataSet.prototype.distinct = function (field) { var data = this._data; + var itemIds = Object.keys(data); var values = []; var fieldType = this._options.type && this._options.type[field] || null; var count = 0; - var i; - - for (var prop in data) { - if (data.hasOwnProperty(prop)) { - var item = data[prop]; - var value = item[field]; - var exists = false; - for (i = 0; i < count; i++) { - if (values[i] == value) { - exists = true; - break; - } - } - if (!exists && value !== undefined) { - values[count] = value; - count++; + var i, j, len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var value = item[field]; + var exists = false; + for (j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; } } + if (!exists && value !== undefined) { + values[count] = value; + count++; + } } if (fieldType) { - for (i = 0; i < values.length; i++) { + for (i = 0, len = values.length; i < len; i++) { values[i] = util.convert(values[i], fieldType); } } @@ -6003,12 +6489,14 @@ return /******/ (function(modules) { // webpackBootstrap item[this._fieldId] = id; } - var d = {}; - for (var field in item) { - if (item.hasOwnProperty(field)) { - var fieldType = this._type[field]; // type may be undefined - d[field] = util.convert(item[field], fieldType); - } + var d = {}, + fields = Object.keys(item), + i, + len; + for (i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); } this._data[id] = d; this.length++; @@ -6024,7 +6512,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ DataSet.prototype._getItem = function (id, types) { - var field, value; + var field, value, i, len; // get the item from the dataset var raw = this._data[id]; @@ -6033,21 +6521,21 @@ return /******/ (function(modules) { // webpackBootstrap } // convert the items field types - var converted = {}; + var converted = {}, + fields = Object.keys(raw); + if (types) { - for (field in raw) { - if (raw.hasOwnProperty(field)) { - value = raw[field]; - converted[field] = util.convert(value, types[field]); - } + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = util.convert(value, types[field]); } } else { // no field types specified, no converting needed - for (field in raw) { - if (raw.hasOwnProperty(field)) { - value = raw[field]; - converted[field] = value; - } + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = value; } } return converted; @@ -6073,11 +6561,11 @@ return /******/ (function(modules) { // webpackBootstrap } // merge with current item - for (var field in item) { - if (item.hasOwnProperty(field)) { - var fieldType = this._type[field]; // type may be undefined - d[field] = util.convert(item[field], fieldType); - } + var fields = Object.keys(item); + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); } return id; @@ -6333,7 +6821,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {DataSet | DataView} data */ DataView.prototype.setData = function (data) { - var ids, i, len; + var ids, id, i, len; if (this._data) { // unsubscribe from current dataset @@ -6342,12 +6830,7 @@ return /******/ (function(modules) { // webpackBootstrap } // trigger a remove of all items in memory - ids = []; - for (var id in this._ids) { - if (this._ids.hasOwnProperty(id)) { - ids.push(id); - } - } + ids = Object.keys(this._ids); this._ids = {}; this.length = 0; this._trigger('remove', { items: ids }); @@ -6380,34 +6863,34 @@ return /******/ (function(modules) { // webpackBootstrap * containing a variable parameter. */ DataView.prototype.refresh = function () { - var id; + var id, i, len; var ids = this._data.getIds({ filter: this._options && this._options.filter }); + var oldIds = Object.keys(this._ids); var newIds = {}; var added = []; var removed = []; // check for additions - for (var i = 0; i < ids.length; i++) { + for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; newIds[id] = true; if (!this._ids[id]) { added.push(id); this._ids[id] = true; - this.length++; } } // check for removals - for (id in this._ids) { - if (this._ids.hasOwnProperty(id)) { - if (!newIds[id]) { - removed.push(id); - delete this._ids[id]; - this.length--; - } + for (i = 0, len = oldIds.length; i < len; i++) { + id = oldIds[i]; + if (!newIds[id]) { + removed.push(id); + delete this._ids[id]; } } + this.length += added.length - removed.length; + // trigger events if (added.length) { this._trigger('add', { items: added }); @@ -6527,6 +7010,46 @@ return /******/ (function(modules) { // webpackBootstrap return ids; }; + /** + * Map every item in the dataset. + * @param {function} callback + * @param {Object} [options] Available options: + * {Object.} [type] + * {String[]} [fields] filter fields + * {function} [filter] filter items + * {String | function} [order] Order the items by + * a field name or custom sort function. + * @return {Object[]} mappedItems + */ + DataView.prototype.map = function (callback, options) { + var mappedItems = []; + if (this._data) { + var defaultFilter = this._options.filter; + var filter; + + if (options && options.filter) { + if (defaultFilter) { + filter = function (item) { + return defaultFilter(item) && options.filter(item); + }; + } else { + filter = options.filter; + } + } else { + filter = defaultFilter; + } + + mappedItems = this._data.map(callback, { + filter: filter, + order: options && options.order + }); + } else { + mappedItems = []; + } + + return mappedItems; + }; + /** * Get the DataSet to which this DataView is connected. In case there is a chain * of multiple DataViews, the root DataSet of this chain is returned. @@ -6592,7 +7115,9 @@ return /******/ (function(modules) { // webpackBootstrap if (this._ids[id]) { delete this._ids[id]; removed.push(id); - } else {} + } else { + // nothing interesting for me :-( + } } } @@ -6636,8 +7161,6 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = DataView; - // nothing interesting for me :-( - /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { @@ -6744,6 +7267,8 @@ return /******/ (function(modules) { // webpackBootstrap strokeWidth: 1 // px }; + this.dotSizeRatio = 0.02; // size of the dots as a fraction of the graph width + // create a frame and canvas this.create(); @@ -6881,9 +7406,11 @@ return /******/ (function(modules) { // webpackBootstrap if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; - } else if (backgroundColor === undefined) {} else { - throw 'Unsupported type of backgroundColor'; - } + } else if (backgroundColor === undefined) { + // use use defaults + } else { + throw 'Unsupported type of backgroundColor'; + } this.frame.style.backgroundColor = fill; this.frame.style.borderColor = stroke; @@ -7460,6 +7987,8 @@ return /******/ (function(modules) { // webpackBootstrap if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel; if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel; + if (options.dotSizeRatio !== undefined) this.dotSizeRatio = options.dotSizeRatio; + if (options.style !== undefined) { var styleNumber = this._getStyleNumber(options.style); if (styleNumber !== -1) { @@ -7582,16 +8111,16 @@ return /******/ (function(modules) { // webpackBootstrap if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { - var dotSize = this.frame.clientWidth * 0.02; + var dotSize = this.frame.clientWidth * this.dotSizeRatio; var widthMin, widthMax; if (this.style === Graph3d.STYLE.DOTSIZE) { widthMin = dotSize / 2; // px widthMax = dotSize / 2 + dotSize * 2; // Todo: put this in one function } else { - widthMin = 20; // px - widthMax = 20; // px - } + widthMin = 20; // px + widthMax = 20; // px + } var height = Math.max(this.frame.clientHeight * 0.25, 100); var top = this.margin; @@ -8127,9 +8656,9 @@ return /******/ (function(modules) { // webpackBootstrap strokeStyle = this.axisColor; // TODO: should be customizable } } else { - fillStyle = 'gray'; - strokeStyle = this.axisColor; - } + fillStyle = 'gray'; + strokeStyle = this.axisColor; + } ctx.lineWidth = this._getStrokeWidth(point); ctx.fillStyle = fillStyle; @@ -8145,39 +8674,39 @@ return /******/ (function(modules) { // webpackBootstrap } } } else { - // grid style - for (i = 0; i < this.dataPoints.length; i++) { - point = this.dataPoints[i]; - right = this.dataPoints[i].pointRight; - top = this.dataPoints[i].pointTop; + // grid style + for (i = 0; i < this.dataPoints.length; i++) { + point = this.dataPoints[i]; + right = this.dataPoints[i].pointRight; + top = this.dataPoints[i].pointTop; - if (point !== undefined && right !== undefined) { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - zAvg = (point.point.z + right.point.z) / 2; - h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; + if (point !== undefined && right !== undefined) { + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + zAvg = (point.point.z + right.point.z) / 2; + h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; - ctx.lineWidth = this._getStrokeWidth(point) * 2; - ctx.strokeStyle = this._hsv2rgb(h, 1, 1); - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); - ctx.lineTo(right.screen.x, right.screen.y); - ctx.stroke(); - } + ctx.lineWidth = this._getStrokeWidth(point) * 2; + ctx.strokeStyle = this._hsv2rgb(h, 1, 1); + ctx.beginPath(); + ctx.moveTo(point.screen.x, point.screen.y); + ctx.lineTo(right.screen.x, right.screen.y); + ctx.stroke(); + } - if (point !== undefined && top !== undefined) { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - zAvg = (point.point.z + top.point.z) / 2; - h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; + if (point !== undefined && top !== undefined) { + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + zAvg = (point.point.z + top.point.z) / 2; + h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; - ctx.lineWidth = this._getStrokeWidth(point) * 2; - ctx.strokeStyle = this._hsv2rgb(h, 1, 1); - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); - ctx.lineTo(top.screen.x, top.screen.y); - ctx.stroke(); + ctx.lineWidth = this._getStrokeWidth(point) * 2; + ctx.strokeStyle = this._hsv2rgb(h, 1, 1); + ctx.beginPath(); + ctx.moveTo(point.screen.x, point.screen.y); + ctx.lineTo(top.screen.x, top.screen.y); + ctx.stroke(); + } } } - } }; Graph3d.prototype._getStrokeWidth = function (point) { @@ -8222,7 +8751,7 @@ return /******/ (function(modules) { // webpackBootstrap this.dataPoints.sort(sortDepth); // draw the datapoints as colored circles - var dotSize = this.frame.clientWidth * 0.02; // px + var dotSize = this.frame.clientWidth * this.dotSizeRatio; // px for (i = 0; i < this.dataPoints.length; i++) { var point = this.dataPoints[i]; @@ -8814,7 +9343,7 @@ return /******/ (function(modules) { // webpackBootstrap if (typeof this.showTooltip === 'function') { content.innerHTML = this.showTooltip(dataPoint.point); } else { - content.innerHTML = '' + '' + '' + '' + '
x:' + dataPoint.point.x + '
y:' + dataPoint.point.y + '
z:' + dataPoint.point.z + '
'; + content.innerHTML = '' + '' + '' + '' + '
' + this.xLabel + ':' + dataPoint.point.x + '
' + this.yLabel + ':' + dataPoint.point.y + '
' + this.zLabel + ':' + dataPoint.point.z + '
'; } content.style.left = '0'; @@ -8884,8 +9413,6 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Graph3d; - // use use defaults - /***/ }, /* 12 */ /***/ function(module, exports) { @@ -10013,18 +10540,18 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Range = __webpack_require__(24); - var Core = __webpack_require__(28); - var TimeAxis = __webpack_require__(39); - var CurrentTime = __webpack_require__(44); - var CustomTime = __webpack_require__(42); - var ItemSet = __webpack_require__(29); + var Range = __webpack_require__(23); + var Core = __webpack_require__(27); + var TimeAxis = __webpack_require__(38); + var CurrentTime = __webpack_require__(43); + var CustomTime = __webpack_require__(41); + var ItemSet = __webpack_require__(28); - var Configurator = __webpack_require__(45); - var Validator = __webpack_require__(47)['default']; - var printStyle = __webpack_require__(47).printStyle; - var allOptions = __webpack_require__(48).allOptions; - var configureOptions = __webpack_require__(48).configureOptions; + var Configurator = __webpack_require__(44); + var Validator = __webpack_require__(46)['default']; + var printStyle = __webpack_require__(46).printStyle; + var allOptions = __webpack_require__(47).allOptions; + var configureOptions = __webpack_require__(47).configureOptions; /** * Create a timeline visualization @@ -10130,6 +10657,27 @@ return /******/ (function(modules) { // webpackBootstrap me.emit('contextmenu', me.getEventProperties(event)); }; + //Single time autoscale/fit + this.fitDone = false; + this.on('changed', function () { + if (this.itemsData == null) return; + if (!me.fitDone) { + me.fitDone = true; + if (me.options.start != undefined || me.options.end != undefined) { + if (me.options.start == undefined || me.options.end == undefined) { + var range = me.getItemRange(); + } + + var start = me.options.start != undefined ? me.options.start : range.min; + var end = me.options.end != undefined ? me.options.end : range.max; + + me.setWindow(start, end, { animation: false }); + } else { + me.fit({ animation: false }); + } + } + }); + // apply options if (options) { this.setOptions(options); @@ -10143,9 +10691,10 @@ return /******/ (function(modules) { // webpackBootstrap // create itemset if (items) { this.setItems(items); - } else { - this._redraw(); } + + // draw for the first time + this._redraw(); } // Extend the functionality from Core @@ -10202,8 +10751,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param {vis.DataSet | Array | null} items */ Timeline.prototype.setItems = function (items) { - var initialLoad = this.itemsData == null; - // convert to type DataSet when needed var newDataSet; if (!items) { @@ -10223,21 +10770,6 @@ return /******/ (function(modules) { // webpackBootstrap // set items this.itemsData = newDataSet; this.itemSet && this.itemSet.setItems(newDataSet); - - if (initialLoad) { - if (this.options.start != undefined || this.options.end != undefined) { - if (this.options.start == undefined || this.options.end == undefined) { - var range = this.getItemRange(); - } - - var start = this.options.start != undefined ? this.options.start : range.min; - var end = this.options.end != undefined ? this.options.end : range.max; - - this.setWindow(start, end, { animation: false }); - } else { - this.fit({ animation: false }); - } - } }; /** @@ -10384,8 +10916,8 @@ return /******/ (function(modules) { // webpackBootstrap // get a rough approximation for the range based on the items start and end dates var range = this.getDataRange(); - var min = range.min; - var max = range.max; + var min = range.min !== null ? range.min.valueOf() : null; + var max = range.max !== null ? range.max.valueOf() : null; var minItem = null; var maxItem = null; @@ -10404,7 +10936,10 @@ return /******/ (function(modules) { // webpackBootstrap var getEnd = function getEnd(item) { var end = item.data.end != undefined ? item.data.end : item.data.start; return util.convert(end, 'Date').valueOf(); - }; + } + + // calculate the date of the left side and right side of the items given + ; interval = max - min; // ms @@ -10412,16 +10947,15 @@ return /******/ (function(modules) { // webpackBootstrap interval = 10; } factor = interval / _this.props.center.width; - - // calculate the date of the left side and right side of the items given util.forEach(_this.itemSet.items, (function (item) { item.show(); + item.repositionX(); var start = getStart(item); var end = getEnd(item); - var left = new Date(start - (item.getWidthLeft() + 10) * factor); - var right = new Date(end + (item.getWidthRight() + 10) * factor); + var left = start - (item.getWidthLeft() + 10) * factor; + var right = end + (item.getWidthRight() + 10) * factor; if (left < min) { min = left; @@ -10470,7 +11004,7 @@ return /******/ (function(modules) { // webpackBootstrap min = start; } if (max === null || end > max) { - max = start; + max = end; } }); } @@ -10614,14 +11148,14 @@ return /******/ (function(modules) { // webpackBootstrap var PropagatingHammer = function(element, options) { var o = Object.create(_options); - if (options) Hammer.extend(o, options); + if (options) Hammer.assign(o, options); return propagating(new Hammer(element, o), o); }; - Hammer.extend(PropagatingHammer, Hammer); + Hammer.assign(PropagatingHammer, Hammer); PropagatingHammer.Manager = function (element, options) { var o = Object.create(_options); - if (options) Hammer.extend(o, options); + if (options) Hammer.assign(o, options); return propagating(new Hammer.Manager(element, o), o); }; @@ -10634,7 +11168,9 @@ return /******/ (function(modules) { // webpackBootstrap // attach to DOM element var element = hammer.element; - element.hammer = wrapper; + + if(!element.hammer) element.hammer = []; + element.hammer.push(wrapper); // register an event to catch the start of a gesture and store the // target in a singleton @@ -10715,7 +11251,10 @@ return /******/ (function(modules) { // webpackBootstrap wrapper.destroy = function () { // Detach from DOM element - delete hammer.element.hammer; + var hammers = hammer.element.hammer; + var idx = hammers.indexOf(wrapper); + if(idx !== -1) hammers.splice(idx,1); + if(!hammers.length) delete hammer.element.hammer; // clear all handlers wrapper._handlers = {}; @@ -10756,19 +11295,31 @@ return /******/ (function(modules) { // webpackBootstrap stopped = true; }; + //wrap the srcEvent's stopPropagation to also stop hammer propagation: + var srcStop = event.srcEvent.stopPropagation; + if(typeof srcStop == "function") { + event.srcEvent.stopPropagation = function(){ + srcStop(); + event.stopPropagation(); + } + } + // attach firstTarget property to the event event.firstTarget = _firstTarget; // propagate over all elements (until stopped) var elem = _firstTarget; while (elem && !stopped) { - var _handlers = elem.hammer && elem.hammer._handlers[event.type]; - if (_handlers) { - for (var i = 0; i < _handlers.length && !stopped; i++) { - _handlers[i](event); + var elemHammer = elem.hammer; + if(elemHammer){ + var _handlers; + for(var k = 0; k < elemHammer.length; k++){ + _handlers = elemHammer[k]._handlers[event.type]; + if(_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) { + _handlers[i](event); + } } } - elem = elem.parentNode; } } @@ -10782,15 +11333,15 @@ return /******/ (function(modules) { // webpackBootstrap /* 22 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.4 - 2014-09-28 + var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.6 - 2015-12-23 * http://hammerjs.github.io/ * - * Copyright (c) 2014 Jorik Tangelder; - * Licensed under the MIT license */ + * Copyright (c) 2015 Jorik Tangelder; + * Licensed under the license */ (function(window, document, exportName, undefined) { 'use strict'; - var VENDOR_PREFIXES = ['', 'webkit', 'moz', 'MS', 'ms', 'o']; + var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; var TEST_ELEMENT = document.createElement('div'); var TYPE_FUNCTION = 'function'; @@ -10855,15 +11406,69 @@ return /******/ (function(modules) { // webpackBootstrap } } + /** + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ + function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function() { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; + } + + /** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + var assign; + if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; + } else { + assign = Object.assign; + } + /** * extend object. * means that properties in dest will be overwritten by the ones in src. * @param {Object} dest * @param {Object} src - * @param {Boolean} [merge] + * @param {Boolean=false} [merge] * @returns {Object} dest */ - function extend(dest, src, merge) { + var extend = deprecate(function extend(dest, src, merge) { var keys = Object.keys(src); var i = 0; while (i < keys.length) { @@ -10873,7 +11478,7 @@ return /******/ (function(modules) { // webpackBootstrap i++; } return dest; - } + }, 'extend', 'Use `assign`.'); /** * merge the values from src in the dest. @@ -10882,9 +11487,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} src * @returns {Object} dest */ - function merge(dest, src) { + var merge = deprecate(function merge(dest, src) { return extend(dest, src, true); - } + }, 'merge', 'Use `assign`.'); /** * simple class inheritance @@ -10901,7 +11506,7 @@ return /******/ (function(modules) { // webpackBootstrap childP._super = baseP; if (properties) { - extend(childP, properties); + assign(childP, properties); } } @@ -11104,8 +11709,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {DocumentView|Window} */ function getWindowForElement(element) { - var doc = element.ownerDocument; - return (doc.defaultView || doc.parentWindow); + var doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); } var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; @@ -11284,9 +11889,17 @@ return /******/ (function(modules) { // webpackBootstrap computeDeltaXY(session, input); input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + computeIntervalInputData(session, input); // find the correct target @@ -11330,8 +11943,8 @@ return /******/ (function(modules) { // webpackBootstrap velocity, velocityX, velocityY, direction; if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { - var deltaX = last.deltaX - input.deltaX; - var deltaY = last.deltaY - input.deltaY; + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; var v = getVelocity(deltaTime, deltaX, deltaY); velocityX = v.x; @@ -11436,9 +12049,9 @@ return /******/ (function(modules) { // webpackBootstrap } if (abs(x) >= abs(y)) { - return x > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; } - return y > 0 ? DIRECTION_UP : DIRECTION_DOWN; + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; } /** @@ -11481,7 +12094,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} rotation */ function getRotation(start, end) { - return getAngle(end[1], end[0], PROPS_CLIENT_XY) - getAngle(start[1], start[0], PROPS_CLIENT_XY); + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); } /** @@ -11574,7 +12187,7 @@ return /******/ (function(modules) { // webpackBootstrap var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive - if (window.MSPointerEvent) { + if (window.MSPointerEvent && !window.PointerEvent) { POINTER_ELEMENT_EVENTS = 'MSPointerDown'; POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; } @@ -11898,7 +12511,7 @@ return /******/ (function(modules) { // webpackBootstrap value = this.compute(); } - if (NATIVE_TOUCH_ACTION) { + if (NATIVE_TOUCH_ACTION && this.manager.element.style) { this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; } this.actions = value.toLowerCase().trim(); @@ -11949,6 +12562,23 @@ return /******/ (function(modules) { // webpackBootstrap var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + if (hasNone) { + //do not prevent defaults if this is a tap gesture + + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + if (hasNone || (hasPanY && direction & DIRECTION_HORIZONTAL) || (hasPanX && direction & DIRECTION_VERTICAL)) { @@ -11980,9 +12610,12 @@ return /******/ (function(modules) { // webpackBootstrap var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - // pan-x and pan-y can be combined + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning if (hasPanX && hasPanY) { - return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y; + return TOUCH_ACTION_NONE; } // pan-x OR pan-y @@ -12040,10 +12673,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} options */ function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); + this.id = uniqueId(); this.manager = null; - this.options = merge(options || {}, this.defaults); // default is enable true this.options.enable = ifUndefined(this.options.enable, true); @@ -12067,7 +12701,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Recognizer} */ set: function(options) { - extend(this.options, options); + assign(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state this.manager && this.manager.touchAction.update(); @@ -12171,20 +12805,24 @@ return /******/ (function(modules) { // webpackBootstrap var self = this; var state = this.state; - function emit(withState) { - self.manager.emit(self.options.event + (withState ? stateStr(state) : ''), input); + function emit(event) { + self.manager.emit(event, input); } // 'panstart' and 'panmove' if (state < STATE_ENDED) { - emit(true); + emit(self.options.event + stateStr(state)); } - emit(); // simple 'eventName' events + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } // panend and pancancel if (state >= STATE_ENDED) { - emit(true); + emit(self.options.event + stateStr(state)); } }, @@ -12224,7 +12862,7 @@ return /******/ (function(modules) { // webpackBootstrap recognize: function(inputData) { // make a new copy of the inputData // so we can change the inputData without messing up the other recognizers - var inputDataClone = extend({}, inputData); + var inputDataClone = assign({}, inputData); // is is enabled and allow recognizing? if (!boolOrFn(this.options.enable, [this, inputDataClone])) { @@ -12449,14 +13087,15 @@ return /******/ (function(modules) { // webpackBootstrap }, emit: function(input) { + this.pX = input.deltaX; this.pY = input.deltaY; var direction = directionStr(input.direction); + if (direction) { - this.manager.emit(this.options.event + direction, input); + input.additionalEvent = this.options.event + direction; } - this._super.emit.call(this, input); } }); @@ -12492,11 +13131,11 @@ return /******/ (function(modules) { // webpackBootstrap }, emit: function(input) { - this._super.emit.call(this, input); if (input.scale !== 1) { var inOut = input.scale < 1 ? 'in' : 'out'; - this.manager.emit(this.options.event + inOut, input); + input.additionalEvent = this.options.event + inOut; } + this._super.emit.call(this, input); } }); @@ -12521,8 +13160,8 @@ return /******/ (function(modules) { // webpackBootstrap defaults: { event: 'press', pointers: 1, - time: 500, // minimal time of the pointer to be pressed - threshold: 5 // a minimal movement is ok, but keep it low + time: 251, // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low }, getTouchAction: function() { @@ -12620,7 +13259,7 @@ return /******/ (function(modules) { // webpackBootstrap defaults: { event: 'swipe', threshold: 10, - velocity: 0.65, + velocity: 0.3, direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, pointers: 1 }, @@ -12634,21 +13273,22 @@ return /******/ (function(modules) { // webpackBootstrap var velocity; if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { - velocity = input.velocity; + velocity = input.overallVelocity; } else if (direction & DIRECTION_HORIZONTAL) { - velocity = input.velocityX; + velocity = input.overallVelocityX; } else if (direction & DIRECTION_VERTICAL) { - velocity = input.velocityY; + velocity = input.overallVelocityY; } return this._super.attrTest.call(this, input) && - direction & input.direction && + direction & input.offsetDirection && input.distance > this.options.threshold && + input.maxPointers == this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; }, emit: function(input) { - var direction = directionStr(input.direction); + var direction = directionStr(input.offsetDirection); if (direction) { this.manager.emit(this.options.event + direction, input); } @@ -12691,7 +13331,7 @@ return /******/ (function(modules) { // webpackBootstrap taps: 1, interval: 300, // max time between the multi-tap taps time: 250, // max time of the pointer to be down (like finger on the screen) - threshold: 2, // a minimal movement is ok, but keep it low + threshold: 9, // a minimal movement is ok, but keep it low posThreshold: 10 // a multi-tap can be a bit off the initial position }, @@ -12765,7 +13405,7 @@ return /******/ (function(modules) { // webpackBootstrap }, emit: function() { - if (this.state == STATE_RECOGNIZED ) { + if (this.state == STATE_RECOGNIZED) { this._input.tapCount = this.count; this.manager.emit(this.options.event, this._input); } @@ -12773,7 +13413,7 @@ return /******/ (function(modules) { // webpackBootstrap }); /** - * Simple way to create an manager with a default set of recognizers. + * Simple way to create a manager with a default set of recognizers. * @param {HTMLElement} element * @param {Object} [options] * @constructor @@ -12787,7 +13427,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @const {string} */ - Hammer.VERSION = '2.0.4'; + Hammer.VERSION = '2.0.6'; /** * default settings @@ -12839,12 +13479,12 @@ return /******/ (function(modules) { // webpackBootstrap */ preset: [ // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] - [RotateRecognizer, { enable: false }], - [PinchRecognizer, { enable: false }, ['rotate']], - [SwipeRecognizer,{ direction: DIRECTION_HORIZONTAL }], - [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], + [RotateRecognizer, {enable: false}], + [PinchRecognizer, {enable: false}, ['rotate']], + [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], + [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], [TapRecognizer], - [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], + [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], [PressRecognizer] ], @@ -12911,9 +13551,8 @@ return /******/ (function(modules) { // webpackBootstrap * @constructor */ function Manager(element, options) { - options = options || {}; + this.options = assign({}, Hammer.defaults, options || {}); - this.options = merge(options, Hammer.defaults); this.options.inputTarget = this.options.inputTarget || element; this.handlers = {}; @@ -12926,7 +13565,7 @@ return /******/ (function(modules) { // webpackBootstrap toggleCssProps(this, true); - each(options.recognizers, function(item) { + each(this.options.recognizers, function(item) { var recognizer = this.add(new (item[0])(item[1])); item[2] && recognizer.recognizeWith(item[2]); item[3] && recognizer.requireFailure(item[3]); @@ -12940,7 +13579,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {Manager} */ set: function(options) { - extend(this.options, options); + assign(this.options, options); // Options that need a little more setup if (options.touchAction) { @@ -13074,11 +13713,19 @@ return /******/ (function(modules) { // webpackBootstrap return this; } - var recognizers = this.recognizers; recognizer = this.get(recognizer); - recognizers.splice(inArray(recognizers, recognizer), 1); - this.touchAction.update(); + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + return this; }, @@ -13109,7 +13756,7 @@ return /******/ (function(modules) { // webpackBootstrap if (!handler) { delete handlers[event]; } else { - handlers[event].splice(inArray(handlers[event], handler), 1); + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); } }); return this; @@ -13165,6 +13812,9 @@ return /******/ (function(modules) { // webpackBootstrap */ function toggleCssProps(manager, add) { var element = manager.element; + if (!element.style) { + return; + } each(manager.options.cssProps, function(value, name) { element.style[prefixed(element.style, name)] = add ? value : ''; }); @@ -13182,7 +13832,7 @@ return /******/ (function(modules) { // webpackBootstrap data.target.dispatchEvent(gestureEvent); } - extend(Hammer, { + assign(Hammer, { INPUT_START: INPUT_START, INPUT_MOVE: INPUT_MOVE, INPUT_END: INPUT_END, @@ -13229,12 +13879,18 @@ return /******/ (function(modules) { // webpackBootstrap each: each, merge: merge, extend: extend, + assign: assign, inherit: inherit, bindFn: bindFn, prefixed: prefixed }); - if ("function" == TYPE_FUNCTION && __webpack_require__(23)) { + // this prevents errors when Hammer is loaded in the presence of an AMD + // style loader but by script tag, not by the loader. + var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line + freeGlobal.Hammer = Hammer; + + if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return Hammer; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -13249,23 +13905,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 23 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__; - - /* WEBPACK VAR INJECTION */}.call(exports, {})) - -/***/ }, -/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var hammerUtil = __webpack_require__(25); + var hammerUtil = __webpack_require__(24); var moment = __webpack_require__(2); - var Component = __webpack_require__(26); - var DateUtil = __webpack_require__(27); + var Component = __webpack_require__(25); + var DateUtil = __webpack_require__(26); /** * @constructor Range @@ -13682,10 +14330,13 @@ return /******/ (function(modules) { // webpackBootstrap this.previousDelta = delta; this._applyRange(newStart, newEnd); + var startDate = new Date(this.start); + var endDate = new Date(this.end); + // fire a rangechange event this.body.emitter.emit('rangechange', { - start: new Date(this.start), - end: new Date(this.end), + start: startDate, + end: endDate, byUser: true }); }; @@ -13805,7 +14456,7 @@ return /******/ (function(modules) { // webpackBootstrap var scale = 1 / (event.scale + this.scaleOffset); var centerDate = this._pointerToDate(this.props.touch.center); - var hiddenDuration = DateUtil.getHiddenDurationBetween(this.options.moment, this.body.hiddenDates, this.start, this.end); + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate); var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; @@ -13964,7 +14615,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Range; /***/ }, -/* 25 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -13978,23 +14629,14 @@ return /******/ (function(modules) { // webpackBootstrap */ exports.onTouch = function (hammer, callback) { callback.inputHandler = function (event) { - if (event.isFirst && !isTouching) { + if (event.isFirst) { callback(event); - - isTouching = true; - setTimeout(function () { - isTouching = false; - }, 0); } }; hammer.on('hammer.input', callback.inputHandler); }; - // isTouching is true while a touch action is being emitted - // this is a hack to prevent `touch` from being fired twice - var isTouching = false; - /** * Register a release event, taking place after a gesture * @param {Hammer} hammer A hammer instance @@ -14002,23 +14644,14 @@ return /******/ (function(modules) { // webpackBootstrap */ exports.onRelease = function (hammer, callback) { callback.inputHandler = function (event) { - if (event.isFinal && !isReleasing) { + if (event.isFinal) { callback(event); - - isReleasing = true; - setTimeout(function () { - isReleasing = false; - }, 0); } }; return hammer.on('hammer.input', callback.inputHandler); }; - // isReleasing is true while a release action is being emitted - // this is a hack to prevent `release` from being fired twice - var isReleasing = false; - /** * Unregister a touch event, taking place before a gesture * @param {Hammer} hammer A hammer instance @@ -14036,7 +14669,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.offRelease = exports.offTouch; /***/ }, -/* 26 */ +/* 25 */ /***/ function(module, exports) { /** @@ -14074,7 +14707,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * Destroy the component. Cleanup DOM and event listeners */ - Component.prototype.destroy = function () {}; + Component.prototype.destroy = function () { + // should be implemented by the component + }; /** * Test whether the component is resized since the last time _isResized() was @@ -14093,10 +14728,8 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Component; - // should be implemented by the component - /***/ }, -/* 27 */ +/* 26 */ /***/ function(module, exports) { @@ -14105,11 +14738,15 @@ return /******/ (function(modules) { // webpackBootstrap * * @param {function} moment * @param {Object} body - * @param {Array} hiddenDates + * @param {Array | Object} hiddenDates */ "use strict"; exports.convertHiddenOptions = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.convertHiddenOptions(moment, body, [hiddenDates]); + } + body.hiddenDates = []; if (hiddenDates) { if (Array.isArray(hiddenDates) == true) { @@ -14132,9 +14769,13 @@ return /******/ (function(modules) { // webpackBootstrap * create new entrees for the repeating hidden dates * @param {function} moment * @param {Object} body - * @param {Array} hiddenDates + * @param {Array | Object} hiddenDates */ exports.updateHiddenDates = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.updateHiddenDates(moment, body, [hiddenDates]); + } + if (hiddenDates && body.domProps.centerContainer.width !== undefined) { exports.convertHiddenOptions(moment, body, hiddenDates); @@ -14169,16 +14810,16 @@ return /******/ (function(modules) { // webpackBootstrap } startDate.dayOfYear(start.dayOfYear()); startDate.year(start.year()); - startDate.subtract(7, "days"); + startDate.subtract(7, 'days'); endDate.dayOfYear(start.dayOfYear()); endDate.year(start.year()); - endDate.subtract(7 - offset, "days"); + endDate.subtract(7 - offset, 'days'); - runUntil.add(1, "weeks"); + runUntil.add(1, 'weeks'); break; case "weekly": - var dayOffset = endDate.diff(startDate, "days"); + var dayOffset = endDate.diff(startDate, 'days'); var day = startDate.day(); // set the start date to the range.start @@ -14190,12 +14831,12 @@ return /******/ (function(modules) { // webpackBootstrap // force startDate.day(day); endDate.day(day); - endDate.add(dayOffset, "days"); + endDate.add(dayOffset, 'days'); - startDate.subtract(1, "weeks"); - endDate.subtract(1, "weeks"); + startDate.subtract(1, 'weeks'); + endDate.subtract(1, 'weeks'); - runUntil.add(1, "weeks"); + runUntil.add(1, 'weeks'); break; case "monthly": if (startDate.month() != endDate.month()) { @@ -14203,26 +14844,26 @@ return /******/ (function(modules) { // webpackBootstrap } startDate.month(start.month()); startDate.year(start.year()); - startDate.subtract(1, "months"); + startDate.subtract(1, 'months'); endDate.month(start.month()); endDate.year(start.year()); - endDate.subtract(1, "months"); - endDate.add(offset, "months"); + endDate.subtract(1, 'months'); + endDate.add(offset, 'months'); - runUntil.add(1, "months"); + runUntil.add(1, 'months'); break; case "yearly": if (startDate.year() != endDate.year()) { offset = 1; } startDate.year(start.year()); - startDate.subtract(1, "years"); + startDate.subtract(1, 'years'); endDate.year(start.year()); - endDate.subtract(1, "years"); - endDate.add(offset, "years"); + endDate.subtract(1, 'years'); + endDate.add(offset, 'years'); - runUntil.add(1, "years"); + runUntil.add(1, 'years'); break; default: console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); @@ -14232,20 +14873,20 @@ return /******/ (function(modules) { // webpackBootstrap body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); switch (hiddenDates[i].repeat) { case "daily": - startDate.add(1, "days"); - endDate.add(1, "days"); + startDate.add(1, 'days'); + endDate.add(1, 'days'); break; case "weekly": - startDate.add(1, "weeks"); - endDate.add(1, "weeks"); + startDate.add(1, 'weeks'); + endDate.add(1, 'weeks'); break; case "monthly": - startDate.add(1, "months"); - endDate.add(1, "months"); + startDate.add(1, 'months'); + endDate.add(1, 'months'); break; case "yearly": - startDate.add(1, "y"); - endDate.add(1, "y"); + startDate.add(1, 'y'); + endDate.add(1, 'y'); break; default: console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); @@ -14292,14 +14933,14 @@ return /******/ (function(modules) { // webpackBootstrap } // j start inside i else if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].start <= hiddenDates[i].end) { - hiddenDates[i].end = hiddenDates[j].end; - hiddenDates[j].remove = true; - } - // j end inside i - else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { - hiddenDates[i].start = hiddenDates[j].start; - hiddenDates[j].remove = true; - } + hiddenDates[i].end = hiddenDates[j].end; + hiddenDates[j].remove = true; + } + // j end inside i + else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { + hiddenDates[i].start = hiddenDates[j].start; + hiddenDates[j].remove = true; + } } } } @@ -14560,23 +15201,23 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 28 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var Emitter = __webpack_require__(12); var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(25); + var hammerUtil = __webpack_require__(24); var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Range = __webpack_require__(24); - var ItemSet = __webpack_require__(29); - var TimeAxis = __webpack_require__(39); - var Activator = __webpack_require__(40); - var DateUtil = __webpack_require__(27); - var CustomTime = __webpack_require__(42); + var Range = __webpack_require__(23); + var ItemSet = __webpack_require__(28); + var TimeAxis = __webpack_require__(38); + var Activator = __webpack_require__(39); + var DateUtil = __webpack_require__(26); + var CustomTime = __webpack_require__(41); /** * Create a timeline visualization @@ -14658,13 +15299,15 @@ return /******/ (function(modules) { // webpackBootstrap this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); this.on('rangechange', (function () { - this._redraw(); // this allows overriding the _redraw method + if (this.initialDrawDone === true) { + this._redraw(); // this allows overriding the _redraw method + } }).bind(this)); this.on('touch', this._onTouch.bind(this)); this.on('pan', this._onDrag.bind(this)); var me = this; - this.on('change', function (properties) { + this.on('_change', function (properties) { if (properties && properties.queue == true) { // redraw once on next tick if (!me._redrawTimer) { @@ -14744,6 +15387,7 @@ return /******/ (function(modules) { // webpackBootstrap this.touch = {}; this.redrawCount = 0; + this.initialDrawDone = false; // attach the root panel to the provided container if (!container) throw new Error('No container provided'); @@ -14781,6 +15425,7 @@ return /******/ (function(modules) { // webpackBootstrap var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'throttleRedraw']; util.selectiveExtend(fields, this.options, options); + this.options.orientation = { item: undefined, axis: undefined }; if ('orientation' in options) { if (typeof options.orientation === 'string') { this.options.orientation = { @@ -14874,11 +15519,11 @@ return /******/ (function(modules) { // webpackBootstrap // override redraw with a throttled version if (!this._origRedraw) { this._origRedraw = this._redraw.bind(this); + this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); + } else { + // Not the initial run: redraw everything + this._redraw(); } - this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); - - // redraw everything - this._redraw(); }; /** @@ -14967,6 +15612,24 @@ return /******/ (function(modules) { // webpackBootstrap return customTimes[0].getCustomTime(); }; + /** + * Set a custom title for the custom time bar. + * @param {String} [title] Custom title + * @param {number} [id=undefined] Id of the custom time bar. + */ + Core.prototype.setCustomTimeTitle = function (title, id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)); + } + if (customTimes.length > 0) { + return customTimes[0].setCustomTitle(title); + } + }; + /** * Retrieve meta information from an event. * Should be overridden by classes extending Core @@ -15157,12 +15820,13 @@ return /******/ (function(modules) { // webpackBootstrap * @protected */ Core.prototype._redraw = function () { + this.redrawCount++; var resized = false; var options = this.options; var props = this.props; var dom = this.dom; - if (!dom) return; // when destroyed + if (!dom || !dom.container || dom.container.clientWidth == 0) return; // when destroyed, or invisible DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); @@ -15298,17 +15962,21 @@ return /******/ (function(modules) { // webpackBootstrap this.components.forEach(function (component) { resized = component.redraw() || resized; }); + var MAX_REDRAW = 5; if (resized) { - // keep repainting until all sizes are settled - var MAX_REDRAWS = 3; // maximum number of consecutive redraws - if (this.redrawCount < MAX_REDRAWS) { - this.redrawCount++; - this._redraw(); + if (this.redrawCount < MAX_REDRAW) { + this.body.emitter.emit('_change'); + return; } else { console.log('WARNING: infinite loop in redraw?'); } + } else { this.redrawCount = 0; } + this.initialDrawDone = true; + + //Emit public 'changed' event for UI updates, see issue #1592 + this.body.emitter.emit("changed"); }; // TODO: deprecated since version 1.1.0, remove some day @@ -15433,7 +16101,7 @@ return /******/ (function(modules) { // webpackBootstrap me.props.lastWidth = me.dom.root.offsetWidth; me.props.lastHeight = me.dom.root.offsetHeight; - me.emit('change'); + me.body.emitter.emit('_change'); } } }; @@ -15441,6 +16109,12 @@ return /******/ (function(modules) { // webpackBootstrap // add event listener to window resize util.addEventListener(window, 'resize', this._onResize); + //Prevent initial unnecessary redraw + if (me.dom.root) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; + } + this.watchTimer = setInterval(this._onResize, 1000); }; @@ -15496,8 +16170,7 @@ return /******/ (function(modules) { // webpackBootstrap var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); if (newScrollTop != oldScrollTop) { - this._redraw(); // TODO: this causes two redraws when dragging, the other is triggered by rangechange already - this.emit('verticalDrag'); + this.emit("verticalDrag"); } }; @@ -15558,7 +16231,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Core; /***/ }, -/* 29 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -15567,14 +16240,14 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var TimeStep = __webpack_require__(30); - var Component = __webpack_require__(26); - var Group = __webpack_require__(31); - var BackgroundGroup = __webpack_require__(35); - var BoxItem = __webpack_require__(36); - var PointItem = __webpack_require__(37); - var RangeItem = __webpack_require__(33); - var BackgroundItem = __webpack_require__(38); + var TimeStep = __webpack_require__(29); + var Component = __webpack_require__(25); + var Group = __webpack_require__(30); + var BackgroundGroup = __webpack_require__(34); + var BoxItem = __webpack_require__(35); + var PointItem = __webpack_require__(36); + var RangeItem = __webpack_require__(32); + var BackgroundItem = __webpack_require__(37); var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items var BACKGROUND = '__background__'; // reserved group id for background items without group @@ -15607,6 +16280,7 @@ return /******/ (function(modules) { // webpackBootstrap selectable: true, multiselect: false, + itemsAlwaysDraggable: false, editable: { updateTime: false, @@ -15871,7 +16545,7 @@ return /******/ (function(modules) { // webpackBootstrap ItemSet.prototype.setOptions = function (options) { if (options) { // copy all options that we know - var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; + var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; util.selectiveExtend(fields, this.options, options); if ('orientation' in options) { @@ -16280,6 +16954,8 @@ return /******/ (function(modules) { // webpackBootstrap // update the group holding all ungrouped items this._updateUngrouped(); } + + this.body.emitter.emit('_change', { queue: true }); }; /** @@ -16337,7 +17013,7 @@ return /******/ (function(modules) { // webpackBootstrap // update the order of all items in each group this._order(); - this.body.emitter.emit('change', { queue: true }); + this.body.emitter.emit('_change', { queue: true }); }; /** @@ -16442,7 +17118,7 @@ return /******/ (function(modules) { // webpackBootstrap this._order(); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change', { queue: true }); + this.body.emitter.emit('_change', { queue: true }); }; /** @@ -16472,7 +17148,7 @@ return /******/ (function(modules) { // webpackBootstrap // update order this._order(); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change', { queue: true }); + this.body.emitter.emit('_change', { queue: true }); } }; @@ -16541,7 +17217,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - this.body.emitter.emit('change', { queue: true }); + this.body.emitter.emit('_change', { queue: true }); }; /** @@ -16562,7 +17238,7 @@ return /******/ (function(modules) { // webpackBootstrap this.markDirty(); - this.body.emitter.emit('change', { queue: true }); + this.body.emitter.emit('_change', { queue: true }); }; /** @@ -16715,7 +17391,7 @@ return /******/ (function(modules) { // webpackBootstrap var me = this; var props; - if (item && item.selected) { + if (item && (item.selected || this.options.itemsAlwaysDraggable)) { if (!this.options.editable.updateTime && !this.options.editable.updateGroup && !item.editable) { return; @@ -16734,7 +17410,7 @@ return /******/ (function(modules) { // webpackBootstrap item: dragLeftItem, initialX: event.center.x, dragLeft: true, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; this.touchParams.itemProps = [props]; @@ -16743,7 +17419,7 @@ return /******/ (function(modules) { // webpackBootstrap item: dragRightItem, initialX: event.center.x, dragRight: true, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; this.touchParams.itemProps = [props]; @@ -16752,18 +17428,18 @@ return /******/ (function(modules) { // webpackBootstrap var baseGroupIndex = this._getGroupIndex(item.data.group); - this.touchParams.itemProps = this.getSelection().map(function (id) { + var itemsToDrag = this.options.itemsAlwaysDraggable && !item.selected ? [item.id] : this.getSelection(); + + this.touchParams.itemProps = itemsToDrag.map((function (id) { var item = me.items[id]; var groupIndex = me._getGroupIndex(item.data.group); - var props = { + return { item: item, initialX: event.center.x, groupOffset: baseGroupIndex - groupIndex, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; - - return props; - }); + }).bind(this)); } event.stopPropagation(); @@ -16785,7 +17461,7 @@ return /******/ (function(modules) { // webpackBootstrap var time = this.body.util.toTime(x); var scale = this.body.util.getScale(); var step = this.body.util.getStep(); - var start = snap ? snap(time, scale, step) : start; + var start = snap ? snap(time, scale, step) : time; var end = start; var itemData = { @@ -16805,14 +17481,14 @@ return /******/ (function(modules) { // webpackBootstrap var newItem = new RangeItem(itemData, this.conversion, this.options); newItem.id = id; // TODO: not so nice setting id afterwards - newItem.data = itemData; + newItem.data = this._cloneItemData(itemData); this._addItem(newItem); var props = { item: newItem, dragRight: true, initialX: event.center.x, - data: util.extend({}, itemData) + data: newItem.data }; this.touchParams.itemProps = [props]; @@ -16851,14 +17527,12 @@ return /******/ (function(modules) { // webpackBootstrap } // move - this.touchParams.itemProps.forEach(function (props) { - var newProps = {}; + this.touchParams.itemProps.forEach((function (props) { var current = me.body.util.toTime(event.center.x - xOffset); var initial = me.body.util.toTime(props.initialX - xOffset); - var offset = current - initial; - - var itemData = util.extend({}, props.item.data); // clone the data + var offset = current - initial; // ms + var itemData = this._cloneItemData(props.item.data); // clone the data if (props.item.editable === false) { return; } @@ -16871,6 +17545,7 @@ return /******/ (function(modules) { // webpackBootstrap if (itemData.start != undefined) { var initialStart = util.convert(props.data.start, 'Date'); var start = new Date(initialStart.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; } } else if (props.dragRight) { @@ -16878,6 +17553,7 @@ return /******/ (function(modules) { // webpackBootstrap if (itemData.end != undefined) { var initialEnd = util.convert(props.data.end, 'Date'); var end = new Date(initialEnd.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.end = snap ? snap(end, scale, step) : end; } } else { @@ -16890,9 +17566,11 @@ return /******/ (function(modules) { // webpackBootstrap var initialEnd = util.convert(props.data.end, 'Date'); var duration = initialEnd.valueOf() - initialStart.valueOf(); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; itemData.end = new Date(itemData.start.valueOf() + duration); } else { + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; } } @@ -16901,7 +17579,7 @@ return /******/ (function(modules) { // webpackBootstrap var updateGroupAllowed = me.options.editable.updateGroup || props.item.editable === true; - if (updateGroupAllowed && (!props.dragLeft && !props.dragRight) && newGroupBase != null) { + if (updateGroupAllowed && !props.dragLeft && !props.dragRight && newGroupBase != null) { if (itemData.group != undefined) { var newOffset = newGroupBase - props.groupOffset; @@ -16914,15 +17592,16 @@ return /******/ (function(modules) { // webpackBootstrap } // confirm moving the item - me.options.onMoving(itemData, function (itemData) { + itemData = this._cloneItemData(itemData); // convert start and end to the correct type + me.options.onMoving(itemData, (function (itemData) { if (itemData) { - props.item.setData(itemData); + props.item.setData(this._cloneItemData(itemData, 'Date')); } - }); - }); + }).bind(this)); + }).bind(this)); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change'); + this.body.emitter.emit('_change'); } }; @@ -16959,7 +17638,7 @@ return /******/ (function(modules) { // webpackBootstrap var itemProps = this.touchParams.itemProps; this.touchParams.itemProps = null; - itemProps.forEach(function (props) { + itemProps.forEach((function (props) { var id = props.item.id; var exists = me.itemsData.get(id, me.itemOptions) != null; @@ -16973,11 +17652,11 @@ return /******/ (function(modules) { // webpackBootstrap // force re-stacking of all items next redraw me.stackDirty = true; - me.body.emitter.emit('change'); + me.body.emitter.emit('_change'); }); } else { // update existing item - var itemData = util.extend({}, props.item.data); // clone the data + var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type me.options.onMove(itemData, function (itemData) { if (itemData) { // apply changes @@ -16988,11 +17667,11 @@ return /******/ (function(modules) { // webpackBootstrap props.item.setData(props.data); me.stackDirty = true; // force re-stacking of all items next redraw - me.body.emitter.emit('change'); + me.body.emitter.emit('_change'); } }); } - }); + }).bind(this)); } }; @@ -17082,25 +17761,25 @@ return /******/ (function(modules) { // webpackBootstrap } // if dragged group was move downwards everything above should have an offset else if (origOrder[curPos + orgOffset] == draggedId) { - orgOffset = 1; - continue; - } - // found a group (apart from dragged group) that has the wrong position -> switch with the - // group at the position where other one should be, fix index arrays and continue - else { - var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); - var switchGroup = groupsData.get(newOrder[curPos + newOffset]); - var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]); - this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData); - groupsData.update(switchGroup); - groupsData.update(shouldBeGroup); - - var switchGroupId = newOrder[curPos + newOffset]; - newOrder[curPos + newOffset] = origOrder[curPos + orgOffset]; - newOrder[slippedPosition] = switchGroupId; - - curPos++; - } + orgOffset = 1; + continue; + } + // found a group (apart from dragged group) that has the wrong position -> switch with the + // group at the position where other one should be, fix index arrays and continue + else { + var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); + var switchGroup = groupsData.get(newOrder[curPos + newOffset]); + var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]); + this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData); + groupsData.update(switchGroup); + groupsData.update(shouldBeGroup); + + var switchGroupId = newOrder[curPos + newOffset]; + newOrder[curPos + newOffset] = origOrder[curPos + orgOffset]; + newOrder[slippedPosition] = switchGroupId; + + curPos++; + } } } } @@ -17213,8 +17892,6 @@ return /******/ (function(modules) { // webpackBootstrap var snap = this.options.snap || null; var item = this.itemFromTarget(event); - event.stopPropagation(); - if (item) { // update item @@ -17233,7 +17910,7 @@ return /******/ (function(modules) { // webpackBootstrap var scale = this.body.util.getScale(); var step = this.body.util.getStep(); - var newItem = { + var newItemData = { start: snap ? snap(start, scale, step) : start, content: 'new item' }; @@ -17241,18 +17918,19 @@ return /******/ (function(modules) { // webpackBootstrap // when default type is a range, add a default end date to the new item if (this.options.type === 'range') { var end = this.body.util.toTime(x + this.props.width / 5); - newItem.end = snap ? snap(end, scale, step) : end; + newItemData.end = snap ? snap(end, scale, step) : end; } - newItem[this.itemsData._fieldId] = util.randomUUID(); + newItemData[this.itemsData._fieldId] = util.randomUUID(); var group = this.groupFromTarget(event); if (group) { - newItem.group = group.groupId; + newItemData.group = group.groupId; } // execute async handler to customize (or cancel) adding an item - this.options.onAdd(newItem, function (item) { + newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type + this.options.onAdd(newItemData, function (item) { if (item) { me.itemsData.getDataSet().add(item); // TODO: need to trigger a redraw? @@ -17281,35 +17959,48 @@ return /******/ (function(modules) { // webpackBootstrap if (shiftKey && this.options.multiselect) { // select all items between the old selection and the tapped item + var itemGroup = this.itemsData.get(item.id).group; + + // when filtering get the group of the last selected item + var lastSelectedGroup = undefined; + if (this.options.multiselectPerGroup) { + if (selection.length > 0) { + lastSelectedGroup = this.itemsData.get(selection[0]).group; + } + } // determine the selection range - selection.push(item.id); + if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) { + selection.push(item.id); + } var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions)); - // select all items within the selection range - selection = []; - for (var id in this.items) { - if (this.items.hasOwnProperty(id)) { - var _item = this.items[id]; - var start = _item.data.start; - var end = _item.data.end !== undefined ? _item.data.end : start; - - if (start >= range.min && end <= range.max && !(_item instanceof BackgroundItem)) { - selection.push(_item.id); // do not use id but item.id, id itself is stringified + if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) { + // select all items within the selection range + selection = []; + for (var id in this.items) { + if (this.items.hasOwnProperty(id)) { + var _item = this.items[id]; + var start = _item.data.start; + var end = _item.data.end !== undefined ? _item.data.end : start; + + if (start >= range.min && end <= range.max && (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && !(_item instanceof BackgroundItem)) { + selection.push(_item.id); // do not use id but item.id, id itself is stringified + } } } } } else { - // add/remove this item from the current selection - var index = selection.indexOf(item.id); - if (index == -1) { - // item is not yet selected -> select it - selection.push(item.id); - } else { - // item is already selected -> deselect it - selection.splice(index, 1); + // add/remove this item from the current selection + var index = selection.indexOf(item.id); + if (index == -1) { + // item is not yet selected -> select it + selection.push(item.id); + } else { + // item is already selected -> deselect it + selection.splice(index, 1); + } } - } this.setSelection(selection); @@ -17419,16 +18110,43 @@ return /******/ (function(modules) { // webpackBootstrap return null; }; + /** + * Clone the data of an item, and "normalize" it: convert the start and end date + * to the type (Date, Moment, ...) configured in the DataSet. If not configured, + * start and end are converted to Date. + * @param {Object} itemData, typically `item.data` + * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken + * @return {Object} The cloned object + * @private + */ + ItemSet.prototype._cloneItemData = function (itemData, type) { + var clone = util.extend({}, itemData); + + if (!type) { + // convert start and end date to the type (Date, Moment, ...) configured in the DataSet + type = this.itemsData.getDataSet()._options.type; + } + + if (clone.start != undefined) { + clone.start = util.convert(clone.start, type && type.start || 'Date'); + } + if (clone.end != undefined) { + clone.end = util.convert(clone.end, type && type.end || 'Date'); + } + + return clone; + }; + module.exports = ItemSet; /***/ }, -/* 30 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var moment = __webpack_require__(2); - var DateUtil = __webpack_require__(27); + var DateUtil = __webpack_require__(26); var util = __webpack_require__(1); /** @@ -17476,8 +18194,11 @@ return /******/ (function(modules) { // webpackBootstrap this.switchedDay = false; this.switchedMonth = false; this.switchedYear = false; - this.hiddenDates = hiddenDates; - if (hiddenDates === undefined) { + if (Array.isArray(hiddenDates)) { + this.hiddenDates = hiddenDates; + } else if (hiddenDates != undefined) { + this.hiddenDates = [hiddenDates]; + } else { this.hiddenDates = []; } @@ -17545,7 +18266,7 @@ return /******/ (function(modules) { // webpackBootstrap */ TimeStep.prototype.setRange = function (start, end, minimumStep) { if (!(start instanceof Date) || !(end instanceof Date)) { - throw 'No legal start or end date in method setRange'; + throw "No legal start or end date in method setRange"; } this._start = start != undefined ? this.moment(start.valueOf()) : new Date(); @@ -17587,7 +18308,7 @@ return /******/ (function(modules) { // webpackBootstrap this.current.seconds(0); case 'second': this.current.milliseconds(0); - //case 'millisecond': // nothing to do for milliseconds + //case 'millisecond': // nothing to do for milliseconds } if (this.step != 1) { @@ -17880,8 +18601,8 @@ return /******/ (function(modules) { // webpackBootstrap clone.add(1, 'month'); // important: first set Date to 1, after that change the month. } else { - clone.date(1); - } + clone.date(1); + } clone.hours(0); clone.minutes(0); @@ -18129,14 +18850,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = TimeStep; /***/ }, -/* 31 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var stack = __webpack_require__(32); - var RangeItem = __webpack_require__(33); + var stack = __webpack_require__(31); + var RangeItem = __webpack_require__(32); /** * @constructor Group @@ -18168,7 +18889,7 @@ return /******/ (function(modules) { // webpackBootstrap }; this.checkRangedItems = false; // needed to refresh the ranged items if the window is programatically changed with NO overlap. var me = this; - this.itemSet.body.emitter.on('checkRangedItems', function () { + this.itemSet.body.emitter.on("checkRangedItems", function () { me.checkRangedItems = true; }); @@ -18308,6 +19029,9 @@ return /******/ (function(modules) { // webpackBootstrap restack = true; } + // recalculate the height of the subgroups + this._calculateSubGroupHeights(); + // reposition visible items vertically if (typeof this.itemSet.options.order === 'function') { // a custom order function @@ -18375,6 +19099,25 @@ return /******/ (function(modules) { // webpackBootstrap return resized; }; + /** + * recalculate the height of the subgroups + * @private + */ + Group.prototype._calculateSubGroupHeights = function () { + if (Object.keys(this.subgroups).length > 0) { + var me = this; + + this.resetSubgroups(); + + util.forEach(this.visibleItems, function (item) { + if (item.data.subgroup !== undefined) { + me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height); + me.subgroups[item.data.subgroup].visible = true; + } + }); + } + }; + /** * recalculate the height of the group * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin @@ -18385,20 +19128,12 @@ return /******/ (function(modules) { // webpackBootstrap // recalculate the height of the group var height; var visibleItems = this.visibleItems; - //var visibleSubgroups = []; - //this.visibleSubgroups = 0; - this.resetSubgroups(); - var me = this; if (visibleItems.length > 0) { var min = visibleItems[0].top; var max = visibleItems[0].top + visibleItems[0].height; util.forEach(visibleItems, function (item) { min = Math.min(min, item.top); max = Math.max(max, item.top + item.height); - if (item.data.subgroup !== undefined) { - me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height); - me.subgroups[item.data.subgroup].visible = true; - } }); if (min > margin.axis) { // there is an empty gap between the lowest item and the axis @@ -18740,7 +19475,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Group; /***/ }, -/* 32 */ +/* 31 */ /***/ function(module, exports) { // Utility functions for ordering and stacking of items @@ -18864,13 +19599,13 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 33 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var Hammer = __webpack_require__(20); - var Item = __webpack_require__(34); + var Item = __webpack_require__(33); /** * @constructor RangeItem @@ -19057,10 +19792,10 @@ return /******/ (function(modules) { // webpackBootstrap // a width which will not change when moving the Timeline // So no re-stacking needed, which is nicer for the eye; } else { - this.left = start; - this.width = boxWidth; - contentWidth = Math.min(end - start, this.props.content.width); - } + this.left = start; + this.width = boxWidth; + contentWidth = Math.min(end - start, this.props.content.width); + } this.dom.box.style.left = this.left + 'px'; this.dom.box.style.width = boxWidth + 'px'; @@ -19088,12 +19823,12 @@ return /******/ (function(modules) { // webpackBootstrap contentLeft = -contentWidth; // ensure it's not visible anymore } } else { - if (start < 0) { - contentLeft = -start; - } else { - contentLeft = 0; + if (start < 0) { + contentLeft = -start; + } else { + contentLeft = 0; + } } - } this.dom.content.style.left = contentLeft + 'px'; } }; @@ -19160,7 +19895,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = RangeItem; /***/ }, -/* 34 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -19285,17 +20020,23 @@ return /******/ (function(modules) { // webpackBootstrap /** * Repaint the item */ - Item.prototype.redraw = function () {}; + Item.prototype.redraw = function () { + // should be implemented by the item + }; /** * Reposition the Item horizontally */ - Item.prototype.repositionX = function () {}; + Item.prototype.repositionX = function () { + // should be implemented by the item + }; /** * Reposition the Item vertically */ - Item.prototype.repositionY = function () {}; + Item.prototype.repositionY = function () { + // should be implemented by the item + }; /** * Repaint a delete button on the top right of the item when the item is selected @@ -19454,20 +20195,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Item; - // should be implemented by the item - - // should be implemented by the item - - // should be implemented by the item - /***/ }, -/* 35 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Group = __webpack_require__(31); + var Group = __webpack_require__(30); /** * @constructor BackgroundGroup @@ -19525,12 +20260,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BackgroundGroup; /***/ }, -/* 36 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Item = __webpack_require__(34); + var Item = __webpack_require__(33); var util = __webpack_require__(1); /** @@ -19765,12 +20500,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BoxItem; /***/ }, -/* 37 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Item = __webpack_require__(34); + var Item = __webpack_require__(33); /** * @constructor PointItem @@ -19887,13 +20622,14 @@ return /******/ (function(modules) { // webpackBootstrap dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; //dom.content.style.marginRight = ... + 'px'; // TODO: margin right - dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px'; - dom.dot.style.left = this.props.dot.width / 2 + 'px'; - // recalculate size this.width = dom.point.offsetWidth; this.height = dom.point.offsetHeight; + // reposition the dot + dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px'; + dom.dot.style.left = this.props.dot.width / 2 + 'px'; + this.dirty = false; } @@ -19970,15 +20706,15 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = PointItem; /***/ }, -/* 38 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var Hammer = __webpack_require__(20); - var Item = __webpack_require__(34); - var BackgroundGroup = __webpack_require__(35); - var RangeItem = __webpack_require__(33); + var Item = __webpack_require__(33); + var BackgroundGroup = __webpack_require__(34); + var RangeItem = __webpack_require__(32); /** * @constructor BackgroundItem @@ -20152,54 +20888,54 @@ return /******/ (function(modules) { // webpackBootstrap } // and when the orientation is bottom: else { - var newTop = this.parent.top; - var totalHeight = 0; - for (var subgroup in subgroups) { - if (subgroups.hasOwnProperty(subgroup)) { - if (subgroups[subgroup].visible == true) { - var newHeight = subgroups[subgroup].height + margin.item.vertical; - totalHeight += newHeight; - if (subgroups[subgroup].index > subgroupIndex) { - newTop += newHeight; + var newTop = this.parent.top; + var totalHeight = 0; + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + if (subgroups[subgroup].visible == true) { + var newHeight = subgroups[subgroup].height + margin.item.vertical; + totalHeight += newHeight; + if (subgroups[subgroup].index > subgroupIndex) { + newTop += newHeight; + } } } } + height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; + this.dom.box.style.top = this.parent.height - totalHeight + newTop + 'px'; + this.dom.box.style.bottom = ''; } - height = this.parent.subgroups[itemSubgroup].height + margin.item.vertical; - this.dom.box.style.top = this.parent.height - totalHeight + newTop + 'px'; - this.dom.box.style.bottom = ''; - } } // and in the case of no subgroups: else { - // we want backgrounds with groups to only show in groups. - if (this.parent instanceof BackgroundGroup) { - // if the item is not in a group: - height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height); - this.dom.box.style.top = onTop ? '0' : ''; - this.dom.box.style.bottom = onTop ? '' : '0'; - } else { - height = this.parent.height; - // same alignment for items when orientation is top or bottom - this.dom.box.style.top = this.parent.top + 'px'; - this.dom.box.style.bottom = ''; + // we want backgrounds with groups to only show in groups. + if (this.parent instanceof BackgroundGroup) { + // if the item is not in a group: + height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height); + this.dom.box.style.top = onTop ? '0' : ''; + this.dom.box.style.bottom = onTop ? '' : '0'; + } else { + height = this.parent.height; + // same alignment for items when orientation is top or bottom + this.dom.box.style.top = this.parent.top + 'px'; + this.dom.box.style.bottom = ''; + } } - } this.dom.box.style.height = height + 'px'; }; module.exports = BackgroundItem; /***/ }, -/* 39 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Component = __webpack_require__(26); - var TimeStep = __webpack_require__(30); - var DateUtil = __webpack_require__(27); + var Component = __webpack_require__(25); + var TimeStep = __webpack_require__(29); + var DateUtil = __webpack_require__(26); var moment = __webpack_require__(2); /** @@ -20237,6 +20973,7 @@ return /******/ (function(modules) { // webpackBootstrap }, // axis orientation: 'top' or 'bottom' showMinorLabels: true, showMajorLabels: true, + maxMinorChars: 7, format: TimeStep.FORMAT, moment: moment, timeAxis: null @@ -20264,7 +21001,7 @@ return /******/ (function(modules) { // webpackBootstrap TimeAxis.prototype.setOptions = function (options) { if (options) { // copy all options that we know - util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'hiddenDates', 'timeAxis', 'moment'], this.options, options); + util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment'], this.options, options); // deep copy the format options util.selectiveDeepExtend(['format'], this.options, options); @@ -20382,7 +21119,7 @@ return /******/ (function(modules) { // webpackBootstrap // calculate range and step (step such that we have space for 7 characters per label) var start = util.convert(this.body.range.start, 'Number'); var end = util.convert(this.body.range.end, 'Number'); - var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * 7).valueOf(); + var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf(); var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize); minimumStep -= this.body.util.toTime(0).valueOf(); @@ -20411,19 +21148,21 @@ return /******/ (function(modules) { // webpackBootstrap var next; var x; var xNext; - var isMajor; - var width; + var isMajor, nextIsMajor; + var width = 0, + prevWidth; var line; var labelMinor; var xFirstMajorLabel = undefined; - var max = 0; + var count = 0; + var MAX = 1000; var className; step.start(); next = step.getCurrent(); xNext = this.body.util.toScreen(next); - while (step.hasNext() && max < 1000) { - max++; + while (step.hasNext() && count < MAX) { + count++; isMajor = step.isMajor(); className = step.getClassName(); @@ -20434,13 +21173,16 @@ return /******/ (function(modules) { // webpackBootstrap step.next(); next = step.getCurrent(); + nextIsMajor = step.isMajor(); xNext = this.body.util.toScreen(next); + prevWidth = width; width = xNext - x; - var labelFits = (labelMinor.length + 1) * this.props.minorCharWidth < width; + var showMinorGrid = width >= prevWidth * 0.4; // prevent displaying of the 31th of the month on a scale of 5 days - if (this.options.showMinorLabels && labelFits) { - this._repaintMinorText(x, labelMinor, orientation, className); + if (this.options.showMinorLabels && showMinorGrid) { + var label = this._repaintMinorText(x, labelMinor, orientation, className); + label.style.width = width + 'px'; // set width to prevent overflow } if (isMajor && this.options.showMajorLabels) { @@ -20448,20 +21190,27 @@ return /******/ (function(modules) { // webpackBootstrap if (xFirstMajorLabel == undefined) { xFirstMajorLabel = x; } - this._repaintMajorText(x, step.getLabelMajor(), orientation, className); + label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); } line = this._repaintMajorLine(x, width, orientation, className); } else { - if (labelFits) { + // minor line + if (showMinorGrid) { line = this._repaintMinorLine(x, width, orientation, className); } else { if (line) { + // adjust the width of the previous grid line.style.width = parseInt(line.style.width) + width + 'px'; } } } } + if (count === MAX && !warnedForOverflow) { + console.warn('Something is wrong with the Timeline scale. Limited drawing of grid lines to ' + MAX + ' lines.'); + warnedForOverflow = true; + } + // create a major label on the left when needed if (this.options.showMajorLabels) { var leftTime = this.body.util.toTime(0), @@ -20650,15 +21399,17 @@ return /******/ (function(modules) { // webpackBootstrap this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; }; + var warnedForOverflow = false; + module.exports = TimeAxis; /***/ }, -/* 40 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keycharm = __webpack_require__(41); + var keycharm = __webpack_require__(40); var Emitter = __webpack_require__(12); var Hammer = __webpack_require__(20); var util = __webpack_require__(1); @@ -20812,7 +21563,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Activator; /***/ }, -/* 41 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; @@ -21011,16 +21762,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 42 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var Hammer = __webpack_require__(20); var util = __webpack_require__(1); - var Component = __webpack_require__(26); + var Component = __webpack_require__(25); var moment = __webpack_require__(2); - var locales = __webpack_require__(43); + var locales = __webpack_require__(42); /** * A custom time bar @@ -21041,7 +21792,8 @@ return /******/ (function(modules) { // webpackBootstrap moment: moment, locales: locales, locale: 'en', - id: undefined + id: undefined, + title: undefined }; this.options = util.extend({}, this.defaultOptions); @@ -21141,8 +21893,12 @@ return /******/ (function(modules) { // webpackBootstrap locale = this.options.locales['en']; // fall back on english when not available } - var title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); + var title = this.options.title; + // To hide the title completely use empty string ''. + if (title === undefined) { + title = locale.time + ': ' + this.options.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; @@ -21177,6 +21933,14 @@ return /******/ (function(modules) { // webpackBootstrap return new Date(this.customTime.valueOf()); }; + /** + * Set custom title. + * @param {Date | number | string} title + */ + CustomTime.prototype.setCustomTitle = function (title) { + this.options.title = title; + }; + /** * Start moving horizontally * @param {Event} event @@ -21249,7 +22013,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = CustomTime; /***/ }, -/* 43 */ +/* 42 */ /***/ function(module, exports) { // English @@ -21271,15 +22035,15 @@ return /******/ (function(modules) { // webpackBootstrap exports['nl_BE'] = exports['nl']; /***/ }, -/* 44 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Component = __webpack_require__(26); + var Component = __webpack_require__(25); var moment = __webpack_require__(2); - var locales = __webpack_require__(43); + var locales = __webpack_require__(42); /** * A current time bar @@ -21369,7 +22133,7 @@ return /******/ (function(modules) { // webpackBootstrap 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'); + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); this.warned = true; } locale = this.options.locales['en']; // fall back on english when not available @@ -21406,6 +22170,7 @@ return /******/ (function(modules) { // webpackBootstrap if (interval > 1000) interval = 1000; me.redraw(); + me.body.emitter.emit('currentTimeTick'); // start a renderTimer to adjust for the new time me.currentTimeTimer = setTimeout(update, interval); @@ -21448,7 +22213,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = CurrentTime; /***/ }, -/* 45 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -21463,12 +22228,10 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _ColorPicker = __webpack_require__(46); + var _ColorPicker = __webpack_require__(45); var _ColorPicker2 = _interopRequireDefault(_ColorPicker); - var util = __webpack_require__(1); - /** * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. * Boolean options are recognised as Boolean @@ -21483,6 +22246,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param configureOptions | the fully configured and predefined options set found in allOptions.js * @param pixelRatio | canvas pixel ratio */ + var util = __webpack_require__(1); var Configurator = (function () { function Configurator(parentModule, defaultContainer, configureOptions) { @@ -21516,15 +22280,15 @@ return /******/ (function(modules) { // webpackBootstrap this.wrapper = undefined; } + /** + * refresh all options. + * Because all modules parse their options by themselves, we just use their options. We copy them here. + * + * @param options + */ + _createClass(Configurator, [{ key: 'setOptions', - - /** - * refresh all options. - * Because all modules parse their options by themselves, we just use their options. We copy them here. - * - * @param options - */ value: function setOptions(options) { if (options !== undefined) { // reset the popup history because the indices may have been changed. @@ -21576,13 +22340,13 @@ return /******/ (function(modules) { // webpackBootstrap this._create(); } } - }, { - key: '_create', /** * Create all DOM elements * @private */ + }, { + key: '_create', value: function _create() { var _this = this; @@ -21613,7 +22377,7 @@ return /******/ (function(modules) { // webpackBootstrap // a header for the category this._makeHeader(option); - // get the suboptions + // get the sub options this._handleObject(this.configureOptions[option], [option]); } counter++; @@ -21644,15 +22408,15 @@ return /******/ (function(modules) { // webpackBootstrap } this._push(); - this.colorPicker.insertTo(this.container); + //~ this.colorPicker.insertTo(this.container); } - }, { - key: '_push', /** * draw all DOM elements on the screen * @private */ + }, { + key: '_push', value: function _push() { this.wrapper = document.createElement('div'); this.wrapper.className = 'vis-configuration-wrapper'; @@ -21663,13 +22427,13 @@ return /******/ (function(modules) { // webpackBootstrap this._showPopupIfNeeded(); } - }, { - key: '_clean', /** * delete all DOM elements * @private */ + }, { + key: '_clean', value: function _clean() { for (var i = 0; i < this.domElements.length; i++) { this.wrapper.removeChild(this.domElements[i]); @@ -21683,8 +22447,6 @@ return /******/ (function(modules) { // webpackBootstrap this._removePopup(); } - }, { - key: '_getValue', /** * get the value from the actualOptions if it exists @@ -21692,6 +22454,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { + key: '_getValue', value: function _getValue(path) { var base = this.moduleOptions; for (var i = 0; i < path.length; i++) { @@ -21704,8 +22468,6 @@ return /******/ (function(modules) { // webpackBootstrap } return base; } - }, { - key: '_makeItem', /** * all option elements are wrapped in an item @@ -21713,6 +22475,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param domElements * @private */ + }, { + key: '_makeItem', value: function _makeItem(path) { var _arguments = arguments, _this2 = this; @@ -21741,22 +22505,20 @@ return /******/ (function(modules) { // webpackBootstrap } return 0; } - }, { - key: '_makeHeader', /** * header for major subjects * @param name * @private */ + }, { + key: '_makeHeader', value: function _makeHeader(name) { var div = document.createElement('div'); div.className = 'vis-configuration vis-config-header'; div.innerHTML = name; this._makeItem([], div); } - }, { - key: '_makeLabel', /** * make a label, if it is an object label, it gets different styling. @@ -21766,6 +22528,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {HTMLElement} * @private */ + }, { + key: '_makeLabel', value: function _makeLabel(name, path) { var objectLabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; @@ -21778,8 +22542,6 @@ return /******/ (function(modules) { // webpackBootstrap } return div; } - }, { - key: '_makeDropdown', /** * make a dropdown list for multiple possible string optoins @@ -21788,6 +22550,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_makeDropdown', value: function _makeDropdown(arr, value, path) { var select = document.createElement('select'); select.className = 'vis-configuration vis-config-select'; @@ -21816,8 +22580,6 @@ return /******/ (function(modules) { // webpackBootstrap var label = this._makeLabel(path[path.length - 1], path); this._makeItem(path, label, select); } - }, { - key: '_makeRange', /** * make a range object for numeric options @@ -21826,6 +22588,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_makeRange', value: function _makeRange(arr, value, path) { var defaultValue = arr[0]; var min = arr[1]; @@ -21886,8 +22650,6 @@ return /******/ (function(modules) { // webpackBootstrap this._setupPopup(popupString, itemIndex); } } - }, { - key: '_setupPopup', /** * prepare the popup @@ -21895,13 +22657,15 @@ return /******/ (function(modules) { // webpackBootstrap * @param index * @private */ + }, { + key: '_setupPopup', value: function _setupPopup(string, index) { var _this3 = this; if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { - var div = document.createElement('div'); - div.id = 'vis-configuration-popup'; - div.className = 'vis-configuration-popup'; + var div = document.createElement("div"); + div.id = "vis-configuration-popup"; + div.className = "vis-configuration-popup"; div.innerHTML = string; div.onclick = function () { _this3._removePopup(); @@ -21910,13 +22674,13 @@ return /******/ (function(modules) { // webpackBootstrap this.popupDiv = { html: div, index: index }; } } - }, { - key: '_removePopup', /** * remove the popup from the dom * @private */ + }, { + key: '_removePopup', value: function _removePopup() { if (this.popupDiv.html !== undefined) { this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); @@ -21925,21 +22689,21 @@ return /******/ (function(modules) { // webpackBootstrap this.popupDiv = {}; } } - }, { - key: '_showPopupIfNeeded', /** * Show the popup if it is needed. * @private */ + }, { + key: '_showPopupIfNeeded', value: function _showPopupIfNeeded() { var _this4 = this; if (this.popupDiv.html !== undefined) { var correspondingElement = this.domElements[this.popupDiv.index]; var rect = correspondingElement.getBoundingClientRect(); - this.popupDiv.html.style.left = rect.left + 'px'; - this.popupDiv.html.style.top = rect.top - 30 + 'px'; // 30 is the height; + this.popupDiv.html.style.left = rect.left + "px"; + this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; document.body.appendChild(this.popupDiv.html); this.popupDiv.hideTimeout = setTimeout(function () { _this4.popupDiv.html.style.opacity = 0; @@ -21949,8 +22713,6 @@ return /******/ (function(modules) { // webpackBootstrap }, 1800); } } - }, { - key: '_makeCheckbox', /** * make a checkbox for boolean options. @@ -21959,6 +22721,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_makeCheckbox', value: function _makeCheckbox(defaultValue, value, path) { var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; @@ -21985,8 +22749,6 @@ return /******/ (function(modules) { // webpackBootstrap var label = this._makeLabel(path[path.length - 1], path); this._makeItem(path, label, checkbox); } - }, { - key: '_makeTextInput', /** * make a text input field for string options. @@ -21995,6 +22757,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_makeTextInput', value: function _makeTextInput(defaultValue, value, path) { var checkbox = document.createElement('input'); checkbox.type = 'text'; @@ -22012,8 +22776,6 @@ return /******/ (function(modules) { // webpackBootstrap var label = this._makeLabel(path[path.length - 1], path); this._makeItem(path, label, checkbox); } - }, { - key: '_makeColorField', /** * make a color field with a color picker for color fields @@ -22022,6 +22784,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_makeColorField', value: function _makeColorField(arr, value, path) { var _this5 = this; @@ -22044,8 +22808,6 @@ return /******/ (function(modules) { // webpackBootstrap var label = this._makeLabel(path[path.length - 1], path); this._makeItem(path, label, div); } - }, { - key: '_showColorPicker', /** * used by the color buttons to call the color picker. @@ -22055,23 +22817,31 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_showColorPicker', value: function _showColorPicker(value, div, path) { var _this6 = this; - var rect = div.getBoundingClientRect(); - var bodyRect = document.body.getBoundingClientRect(); - var pickerX = rect.left + rect.width + 5; - var pickerY = rect.top - bodyRect.top + rect.height + 2; - this.colorPicker.show(pickerX, pickerY); + // clear the callback from this div + div.onclick = function () {}; + + this.colorPicker.insertTo(div); + this.colorPicker.show(); + this.colorPicker.setColor(value); - this.colorPicker.setCallback(function (color) { + this.colorPicker.setUpdateCallback(function (color) { var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; div.style.backgroundColor = colorString; _this6._update(colorString, path); }); + + // on close of the colorpicker, restore the callback. + this.colorPicker.setCloseCallback(function () { + div.onclick = function () { + _this6._showColorPicker(value, div, path); + }; + }); } - }, { - key: '_handleObject', /** * parse an object and draw the correct items @@ -22079,6 +22849,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_handleObject', value: function _handleObject(obj) { var path = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; var checkOnly = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; @@ -22149,8 +22921,6 @@ return /******/ (function(modules) { // webpackBootstrap } return visibleInSet; } - }, { - key: '_handleArray', /** * handle the array type of option @@ -22160,6 +22930,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_handleArray', value: function _handleArray(arr, value, path) { if (typeof arr[0] === 'string' && arr[0] === 'color') { this._makeColorField(arr, value, path); @@ -22178,8 +22950,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_update', /** * called to update the network with the new settings. @@ -22187,11 +22957,13 @@ return /******/ (function(modules) { // webpackBootstrap * @param path * @private */ + }, { + key: '_update', value: function _update(value, path) { var options = this._constructOptions(value, path); if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { - this.parent.body.emitter.emit('configChange', options); + this.parent.body.emitter.emit("configChange", options); } this.initialized = true; this.parent.setOptions(options); @@ -22245,7 +23017,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 46 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -22259,7 +23031,7 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(25); + var hammerUtil = __webpack_require__(24); var util = __webpack_require__(1); var ColorPicker = (function () { @@ -22280,18 +23052,19 @@ return /******/ (function(modules) { // webpackBootstrap // bound by this.updateCallback = function () {}; + this.closeCallback = function () {}; // create all DOM elements this._create(); } + /** + * this inserts the colorPicker into a div from the DOM + * @param container + */ + _createClass(ColorPicker, [{ key: 'insertTo', - - /** - * this inserts the colorPicker into a div from the DOM - * @param container - */ value: function insertTo(container) { if (this.hammer !== undefined) { this.hammer.destroy(); @@ -22303,18 +23076,32 @@ return /******/ (function(modules) { // webpackBootstrap this._setSize(); } - }, { - key: 'setCallback', /** * the callback is executed on apply and save. Bind it to the application * @param callback */ - value: function setCallback(callback) { + }, { + key: 'setUpdateCallback', + value: function setUpdateCallback(callback) { if (typeof callback === 'function') { this.updateCallback = callback; } else { - throw new Error('Function attempted to set as colorPicker callback is not a function.'); + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } + } + + /** + * the callback is executed on apply and save. Bind it to the application + * @param callback + */ + }, { + key: 'setCloseCallback', + value: function setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); } } }, { @@ -22325,8 +23112,6 @@ return /******/ (function(modules) { // webpackBootstrap return htmlColors[color]; } } - }, { - key: 'setColor', /** * Set the color of the colorPicker @@ -22340,6 +23125,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param color * @param setInitial */ + }, { + key: 'setColor', value: function setColor(color) { var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -22378,28 +23165,28 @@ return /******/ (function(modules) { // webpackBootstrap // set color if (rgba === undefined) { - throw new Error('Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: ' + JSON.stringify(color)); + throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + JSON.stringify(color)); } else { this._setColor(rgba, setInitial); } } - }, { - key: 'show', /** - * this shows the color picker at a location. The hue circle is constructed once and stored. - * @param x - * @param y + * this shows the color picker. + * The hue circle is constructed once and stored. */ - value: function show(x, y) { + }, { + key: 'show', + value: function show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + this.applied = false; this.frame.style.display = 'block'; - this.frame.style.top = y + 'px'; - this.frame.style.left = x + 'px'; this._generateHueCircle(); } - }, { - key: '_hide', // ------------------------------------------ PRIVATE ----------------------------- // @@ -22409,7 +23196,11 @@ return /******/ (function(modules) { // webpackBootstrap * @param storePrevious * @private */ + }, { + key: '_hide', value: function _hide() { + var _this = this; + var storePrevious = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; // store the previous color for next time; @@ -22422,47 +23213,54 @@ return /******/ (function(modules) { // webpackBootstrap } this.frame.style.display = 'none'; + + // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + setTimeout(function () { + if (_this.closeCallback !== undefined) { + _this.closeCallback(); + _this.closeCallback = undefined; + } + }, 0); } - }, { - key: '_save', /** * bound to the save button. Saves and hides. * @private */ + }, { + key: '_save', value: function _save() { this.updateCallback(this.color); this.applied = false; this._hide(); } - }, { - key: '_apply', /** * Bound to apply button. Saves but does not close. Is undone by the cancel button. * @private */ + }, { + key: '_apply', value: function _apply() { this.applied = true; this.updateCallback(this.color); this._updatePicker(this.color); } - }, { - key: '_loadLast', /** * load the color from the previous session. * @private */ + }, { + key: '_loadLast', value: function _loadLast() { if (this.previousColor !== undefined) { this.setColor(this.previousColor, false); } else { - alert('There is no last color to load...'); + alert("There is no last color to load..."); } } - }, { - key: '_setColor', /** * set the color, place the picker @@ -22470,6 +23268,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param setInitial * @private */ + }, { + key: '_setColor', value: function _setColor(rgba) { var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -22491,26 +23291,26 @@ return /******/ (function(modules) { // webpackBootstrap this._updatePicker(rgba); } - }, { - key: '_setOpacity', /** * bound to opacity control * @param value * @private */ + }, { + key: '_setOpacity', value: function _setOpacity(value) { this.color.a = value / 100; this._updatePicker(this.color); } - }, { - key: '_setBrightness', /** * bound to brightness control * @param value * @private */ + }, { + key: '_setBrightness', value: function _setBrightness(value) { var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); hsv.v = value / 100; @@ -22519,14 +23319,14 @@ return /******/ (function(modules) { // webpackBootstrap this.color = rgba; this._updatePicker(); } - }, { - key: '_updatePicker', /** - * update the colorpicker. A black circle overlays the hue circle to mimic the brightness decreasing. + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. * @param rgba * @private */ + }, { + key: '_updatePicker', value: function _updatePicker() { var rgba = arguments.length <= 0 || arguments[0] === undefined ? this.color : arguments[0]; @@ -22553,13 +23353,13 @@ return /******/ (function(modules) { // webpackBootstrap this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; } - }, { - key: '_setSize', /** * used by create to set the size of the canvas. * @private */ + }, { + key: '_setSize', value: function _setSize() { this.colorPickerCanvas.style.width = '100%'; this.colorPickerCanvas.style.height = '100%'; @@ -22567,14 +23367,14 @@ return /******/ (function(modules) { // webpackBootstrap this.colorPickerCanvas.width = 289 * this.pixelRatio; this.colorPickerCanvas.height = 289 * this.pixelRatio; } - }, { - key: '_create', /** * create all dom elements * TODO: cleanup, lots of similar dom elements * @private */ + }, { + key: '_create', value: function _create() { this.frame = document.createElement('div'); this.frame.className = 'vis-color-picker'; @@ -22595,10 +23395,10 @@ return /******/ (function(modules) { // webpackBootstrap noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; this.colorPickerCanvas.appendChild(noCanvas); } else { - var ctx = this.colorPickerCanvas.getContext('2d'); + var ctx = this.colorPickerCanvas.getContext("2d"); this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); - this.colorPickerCanvas.getContext('2d').setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); } this.colorPickerDiv.className = 'vis-color'; @@ -22647,39 +23447,39 @@ return /******/ (function(modules) { // webpackBootstrap me._setBrightness(this.value); }; - this.brightnessLabel = document.createElement('div'); - this.brightnessLabel.className = 'vis-label vis-brightness'; + this.brightnessLabel = document.createElement("div"); + this.brightnessLabel.className = "vis-label vis-brightness"; this.brightnessLabel.innerHTML = 'brightness:'; - this.opacityLabel = document.createElement('div'); - this.opacityLabel.className = 'vis-label vis-opacity'; + this.opacityLabel = document.createElement("div"); + this.opacityLabel.className = "vis-label vis-opacity"; this.opacityLabel.innerHTML = 'opacity:'; - this.newColorDiv = document.createElement('div'); - this.newColorDiv.className = 'vis-new-color'; + this.newColorDiv = document.createElement("div"); + this.newColorDiv.className = "vis-new-color"; this.newColorDiv.innerHTML = 'new'; - this.initialColorDiv = document.createElement('div'); - this.initialColorDiv.className = 'vis-initial-color'; + this.initialColorDiv = document.createElement("div"); + this.initialColorDiv.className = "vis-initial-color"; this.initialColorDiv.innerHTML = 'initial'; - this.cancelButton = document.createElement('div'); - this.cancelButton.className = 'vis-button vis-cancel'; + this.cancelButton = document.createElement("div"); + this.cancelButton.className = "vis-button vis-cancel"; this.cancelButton.innerHTML = 'cancel'; this.cancelButton.onclick = this._hide.bind(this, false); - this.applyButton = document.createElement('div'); - this.applyButton.className = 'vis-button vis-apply'; + this.applyButton = document.createElement("div"); + this.applyButton.className = "vis-button vis-apply"; this.applyButton.innerHTML = 'apply'; this.applyButton.onclick = this._apply.bind(this); - this.saveButton = document.createElement('div'); - this.saveButton.className = 'vis-button vis-save'; + this.saveButton = document.createElement("div"); + this.saveButton.className = "vis-button vis-save"; this.saveButton.innerHTML = 'save'; this.saveButton.onclick = this._save.bind(this); - this.loadButton = document.createElement('div'); - this.loadButton.className = 'vis-button vis-load'; + this.loadButton = document.createElement("div"); + this.loadButton.className = "vis-button vis-load"; this.loadButton.innerHTML = 'load last'; this.loadButton.onclick = this._loadLast.bind(this); @@ -22697,15 +23497,15 @@ return /******/ (function(modules) { // webpackBootstrap this.frame.appendChild(this.saveButton); this.frame.appendChild(this.loadButton); } - }, { - key: '_bindHammer', /** * bind hammer to the color picker * @private */ + }, { + key: '_bindHammer', value: function _bindHammer() { - var _this = this; + var _this2 = this; this.drag = {}; this.pinch = {}; @@ -22713,28 +23513,28 @@ return /******/ (function(modules) { // webpackBootstrap this.hammer.get('pinch').set({ enable: true }); hammerUtil.onTouch(this.hammer, function (event) { - _this._moveSelector(event); + _this2._moveSelector(event); }); this.hammer.on('tap', function (event) { - _this._moveSelector(event); + _this2._moveSelector(event); }); this.hammer.on('panstart', function (event) { - _this._moveSelector(event); + _this2._moveSelector(event); }); this.hammer.on('panmove', function (event) { - _this._moveSelector(event); + _this2._moveSelector(event); }); this.hammer.on('panend', function (event) { - _this._moveSelector(event); + _this2._moveSelector(event); }); } - }, { - key: '_generateHueCircle', /** * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. * @private */ + }, { + key: '_generateHueCircle', value: function _generateHueCircle() { if (this.generated === false) { var ctx = this.colorPickerCanvas.getContext('2d'); @@ -22776,8 +23576,6 @@ return /******/ (function(modules) { // webpackBootstrap } this.generated = true; } - }, { - key: '_moveSelector', /** * move the selector. This is called by hammer functions. @@ -22785,6 +23583,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { + key: '_moveSelector', value: function _moveSelector(event) { var rect = this.colorPickerDiv.getBoundingClientRect(); var left = event.center.x - rect.left; @@ -22829,7 +23629,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 47 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -22856,15 +23656,15 @@ return /******/ (function(modules) { // webpackBootstrap _classCallCheck(this, Validator); } + /** + * Main function to be called + * @param options + * @param subObject + * @returns {boolean} + */ + _createClass(Validator, null, [{ key: 'validate', - - /** - * Main function to be called - * @param options - * @param subObject - * @returns {boolean} - */ value: function validate(options, referenceOptions, subObject) { errorFound = false; allOptions = referenceOptions; @@ -22875,8 +23675,6 @@ return /******/ (function(modules) { // webpackBootstrap Validator.parse(options, usedOptions, []); return errorFound; } - }, { - key: 'parse', /** * Will traverse an object recursively and check every value @@ -22884,6 +23682,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param referenceOptions * @param path */ + }, { + key: 'parse', value: function parse(options, referenceOptions, path) { for (var option in options) { if (options.hasOwnProperty(option)) { @@ -22891,8 +23691,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'check', /** * Check every value. If the value is an object, call the parse function on that object. @@ -22901,6 +23699,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param referenceOptions * @param path */ + }, { + key: 'check', value: function check(option, options, referenceOptions, path) { if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { Validator.getSuggestion(option, referenceOptions, path); @@ -22922,8 +23722,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'checkFields', /** * @@ -22934,6 +23732,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {String} refOptionType | This is the type object from the reference options * @param {Array} path | where in the object is the option */ + }, { + key: 'checkFields', value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { var optionType = Validator.getType(options[option]); var refOptionType = refOptionObj[optionType]; @@ -22943,11 +23743,11 @@ return /******/ (function(modules) { // webpackBootstrap if (refOptionType.indexOf(options[option]) === -1) { console.log('%cInvalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". ' + Validator.printLocation(path, option), printStyle); errorFound = true; - } else if (optionType === 'object' && referenceOption !== '__any__') { + } else if (optionType === 'object' && referenceOption !== "__any__") { path = util.copyAndExtendArray(path, option); Validator.parse(options[option], referenceOptions[referenceOption], path); } - } else if (optionType === 'object' && referenceOption !== '__any__') { + } else if (optionType === 'object' && referenceOption !== "__any__") { path = util.copyAndExtendArray(path, option); Validator.parse(options[option], referenceOptions[referenceOption], path); } @@ -23020,8 +23820,6 @@ return /******/ (function(modules) { // webpackBootstrap errorFound = true; } - }, { - key: 'findInOptions', /** * traverse the options in search for a match. @@ -23031,6 +23829,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param recursive * @returns {{closestMatch: string, path: Array, distance: number}} */ + }, { + key: 'findInOptions', value: function findInOptions(option, options, path) { var recursive = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; @@ -23090,10 +23890,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'print', value: function print(options) { - return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, '').replace(/(\,)/g, ', '); + return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); } - }, { - key: 'levenshteinDistance', // Compute the edit distance between the two given strings // http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript @@ -23103,6 +23901,8 @@ return /******/ (function(modules) { // webpackBootstrap The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. */ + }, { + key: 'levenshteinDistance', value: function levenshteinDistance(a, b) { if (a.length === 0) return b.length; if (b.length === 0) return a.length; @@ -23145,7 +23945,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.printStyle = printStyle; /***/ }, -/* 48 */ +/* 47 */ /***/ function(module, exports) { /** @@ -23227,7 +24027,13 @@ return /******/ (function(modules) { // webpackBootstrap }, groupOrderSwap: { 'function': 'function' }, height: { string: string, number: number }, - hiddenDates: { object: object, array: array }, + hiddenDates: { + start: { date: date, number: number, string: string, moment: moment }, + end: { date: date, number: number, string: string, moment: moment }, + repeat: { string: string }, + __type__: { object: object, array: array } + }, + itemsAlwaysDraggable: { boolean: boolean }, locale: { string: string }, locales: { __any__: { any: any }, @@ -23244,10 +24050,12 @@ return /******/ (function(modules) { // webpackBootstrap }, max: { date: date, number: number, string: string, moment: moment }, maxHeight: { number: number, string: string }, + maxMinorChars: { number: number }, min: { date: date, number: number, string: string, moment: moment }, minHeight: { number: number, string: string }, moveable: { boolean: boolean }, multiselect: { boolean: boolean }, + multiselectPerGroup: { boolean: boolean }, onAdd: { 'function': 'function' }, onUpdate: { 'function': 'function' }, onMove: { 'function': 'function' }, @@ -23290,7 +24098,7 @@ return /******/ (function(modules) { // webpackBootstrap global: { align: ['center', 'left', 'right'], autoResize: true, - throttleRedraw: 0, + throttleRedraw: [10, 0, 1000, 10], clickToUse: false, // dataAttributes: ['all'], // FIXME: can be 'all' or string[] editable: { @@ -23337,10 +24145,12 @@ return /******/ (function(modules) { // webpackBootstrap }, max: '', maxHeight: '', + maxMinorChars: [7, 0, 20, 1], min: '', minHeight: '', moveable: false, multiselect: false, + multiselectPerGroup: false, //onAdd: {'function': 'function'}, //onUpdate: {'function': 'function'}, //onMove: {'function': 'function'}, @@ -23376,7 +24186,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 49 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -23387,18 +24197,18 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Range = __webpack_require__(24); - var Core = __webpack_require__(28); - var TimeAxis = __webpack_require__(39); - var CurrentTime = __webpack_require__(44); - var CustomTime = __webpack_require__(42); - var LineGraph = __webpack_require__(50); + var Range = __webpack_require__(23); + var Core = __webpack_require__(27); + var TimeAxis = __webpack_require__(38); + var CurrentTime = __webpack_require__(43); + var CustomTime = __webpack_require__(41); + var LineGraph = __webpack_require__(49); - var Configurator = __webpack_require__(45); - var Validator = __webpack_require__(47)['default']; - var printStyle = __webpack_require__(47).printStyle; - var allOptions = __webpack_require__(58).allOptions; - var configureOptions = __webpack_require__(58).configureOptions; + var Configurator = __webpack_require__(44); + var Validator = __webpack_require__(46)['default']; + var printStyle = __webpack_require__(46).printStyle; + var allOptions = __webpack_require__(57).allOptions; + var configureOptions = __webpack_require__(57).configureOptions; /** * Create a timeline visualization @@ -23410,7 +24220,7 @@ return /******/ (function(modules) { // webpackBootstrap */ function Graph2d(container, items, groups, options) { // if the third element is options, the forth is groups (optionally); - if (!(Array.isArray(groups) || groups instanceof DataSet) && groups instanceof Object) { + if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) { var forthArgument = options; options = groups; groups = forthArgument; @@ -23476,6 +24286,7 @@ return /******/ (function(modules) { // webpackBootstrap // item set this.linegraph = new LineGraph(this.body); + this.components.push(this.linegraph); this.itemsData = null; // DataSet @@ -23504,9 +24315,10 @@ return /******/ (function(modules) { // webpackBootstrap // create itemset if (items) { this.setItems(items); - } else { - this._redraw(); } + + // draw for the first time + this._redraw(); } // Extend the functionality from Core @@ -23553,7 +24365,6 @@ return /******/ (function(modules) { // webpackBootstrap if (this.options.start != undefined || this.options.end != undefined) { var start = this.options.start != undefined ? this.options.start : null; var end = this.options.end != undefined ? this.options.end : null; - this.setWindow(start, end, { animation: false }); } else { this.fit({ animation: false }); @@ -23597,7 +24408,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this.linegraph.groups[groupId] !== undefined) { return this.linegraph.groups[groupId].getLegend(width, height); } else { - return 'cannot find group:' + groupId; + return "cannot find group:'" + groupId + "'"; } }; @@ -23715,7 +24526,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Graph2d; /***/ }, -/* 50 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -23724,12 +24535,13 @@ return /******/ (function(modules) { // webpackBootstrap var DOMutil = __webpack_require__(7); var DataSet = __webpack_require__(8); var DataView = __webpack_require__(10); - var Component = __webpack_require__(26); - var DataAxis = __webpack_require__(51); - var GraphGroup = __webpack_require__(53); - var Legend = __webpack_require__(57); - var BarFunctions = __webpack_require__(56); - var LineFunctions = __webpack_require__(54); + var Component = __webpack_require__(25); + var DataAxis = __webpack_require__(50); + var GraphGroup = __webpack_require__(52); + var Legend = __webpack_require__(56); + var Bars = __webpack_require__(53); + var Lines = __webpack_require__(55); + var Points = __webpack_require__(54); var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items @@ -23753,7 +24565,7 @@ return /******/ (function(modules) { // webpackBootstrap graphHeight: '400px', shaded: { enabled: false, - orientation: 'bottom' // top, bottom + orientation: 'bottom' // top, bottom, zero }, style: 'line', // line, bar barChart: { @@ -23771,46 +24583,14 @@ return /******/ (function(modules) { // webpackBootstrap size: 6, style: 'square' // square, circle }, - dataAxis: { - showMinorLabels: true, - showMajorLabels: true, - icons: false, - width: '40px', - visible: true, - alignZeros: true, - left: { - range: { min: undefined, max: undefined }, - format: function format(value) { - return value; - }, - title: { text: undefined, style: undefined } - }, - right: { - range: { min: undefined, max: undefined }, - format: function format(value) { - return value; - }, - title: { text: undefined, style: undefined } - } - }, - legend: { - enabled: false, - icons: true, - left: { - visible: true, - position: 'top-left' // top/bottom - left,right - }, - right: { - visible: true, - position: 'top-right' // top/bottom - left,right - } - }, + dataAxis: {}, //Defaults are done on DataAxis level + legend: {}, //Defaults are done on Legend level groups: { visibility: {} } }; - // options is shared by this ItemSet and all its items + // options is shared by this lineGraph and all its items this.options = util.extend({}, this.defaultOptions); this.dom = {}; this.props = {}; @@ -23819,6 +24599,7 @@ return /******/ (function(modules) { // webpackBootstrap this.abortedGraphUpdate = false; this.updateSVGheight = false; this.updateSVGheightOnResize = false; + this.forceGraphUpdate = true; var me = this; this.itemsData = null; // DataSet @@ -23858,17 +24639,18 @@ return /******/ (function(modules) { // webpackBootstrap this.svgElements = {}; this.setOptions(options); this.groupsUsingDefaultStyles = [0]; - this.COUNTER = 0; this.body.emitter.on('rangechanged', function () { me.lastStart = me.body.range.start; me.svg.style.left = util.option.asSize(-me.props.width); - me.redraw.call(me, true); + + me.forceGraphUpdate = true; + //Is this local redraw necessary? (Core also does a change event!) + me.redraw.call(me); }); // create the HTML DOM this._create(); this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; - this.body.emitter.emit('change'); } LineGraph.prototype = new Component(); @@ -23910,11 +24692,11 @@ return /******/ (function(modules) { // webpackBootstrap LineGraph.prototype.setOptions = function (options) { if (options) { var fields = ['sampling', 'defaultGroup', 'stack', 'height', 'graphHeight', 'yAxisOrientation', 'style', 'barChart', 'dataAxis', 'sort', 'groups']; - if (options.graphHeight === undefined && options.height !== undefined && this.body.domProps.centerContainer.height !== undefined) { + if (options.graphHeight === undefined && options.height !== undefined) { this.updateSVGheight = true; this.updateSVGheightOnResize = true; } else if (this.body.domProps.centerContainer.height !== undefined && options.graphHeight !== undefined) { - if (parseInt((options.graphHeight + '').replace('px', '')) < this.body.domProps.centerContainer.height) { + if (parseInt((options.graphHeight + '').replace("px", '')) < this.body.domProps.centerContainer.height) { this.updateSVGheight = true; } } @@ -23960,7 +24742,9 @@ return /******/ (function(modules) { // webpackBootstrap // this is used to redraw the graph if the visibility of the groups is changed. if (this.dom.frame) { - this.redraw(true); + //not on initial run? + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); } }; @@ -24025,9 +24809,6 @@ return /******/ (function(modules) { // webpackBootstrap ids = this.itemsData.getIds(); this._onAdd(ids); } - this._updateUngrouped(); - //this._updateGraph(); - this.redraw(true); }; /** @@ -24047,7 +24828,9 @@ return /******/ (function(modules) { // webpackBootstrap // remove all drawn groups ids = this.groupsData.getIds(); this.groupsData = null; - this._onRemoveGroups(ids); // note: this will cause a redraw + for (var i = 0; i < ids.length; i++) { + this._removeGroup(ids[i]); + } } // replace the dataset @@ -24070,19 +24853,10 @@ return /******/ (function(modules) { // webpackBootstrap ids = this.groupsData.getIds(); this._onAddGroups(ids); } - this._onUpdate(); }; - /** - * Update the data - * @param [ids] - * @private - */ LineGraph.prototype._onUpdate = function (ids) { - this._updateUngrouped(); this._updateAllGroupData(); - //this._updateGraph(); - this.redraw(true); }; LineGraph.prototype._onAdd = function (ids) { this._onUpdate(ids); @@ -24091,13 +24865,7 @@ return /******/ (function(modules) { // webpackBootstrap this._onUpdate(ids); }; LineGraph.prototype._onUpdateGroups = function (groupIds) { - for (var i = 0; i < groupIds.length; i++) { - var group = this.groupsData.get(groupIds[i]); - this._updateGroup(group, groupIds[i]); - } - - //this._updateGraph(); - this.redraw(true); + this._updateAllGroupData(); }; LineGraph.prototype._onAddGroups = function (groupIds) { this._onUpdateGroups(groupIds); @@ -24110,22 +24878,30 @@ return /******/ (function(modules) { // webpackBootstrap */ LineGraph.prototype._onRemoveGroups = function (groupIds) { for (var i = 0; i < groupIds.length; i++) { - if (this.groups.hasOwnProperty(groupIds[i])) { - if (this.groups[groupIds[i]].options.yAxisOrientation == 'right') { - this.yAxisRight.removeGroup(groupIds[i]); - this.legendRight.removeGroup(groupIds[i]); - this.legendRight.redraw(); - } else { - this.yAxisLeft.removeGroup(groupIds[i]); - this.legendLeft.removeGroup(groupIds[i]); - this.legendLeft.redraw(); - } - delete this.groups[groupIds[i]]; + this._removeGroup(groupIds[i]); + } + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); + }; + + /** + * this cleans the group out off the legends and the dataaxis + * @param groupId + * @private + */ + LineGraph.prototype._removeGroup = function (groupId) { + if (this.groups.hasOwnProperty(groupId)) { + if (this.groups[groupId].options.yAxisOrientation == 'right') { + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); + this.legendRight.redraw(); + } else { + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); + this.legendLeft.redraw(); } + delete this.groups[groupId]; } - this._updateUngrouped(); - //this._updateGraph(); - this.redraw(true); }; /** @@ -24150,9 +24926,15 @@ return /******/ (function(modules) { // webpackBootstrap if (this.groups[groupId].options.yAxisOrientation == 'right') { this.yAxisRight.updateGroup(groupId, this.groups[groupId]); this.legendRight.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); } else { this.yAxisLeft.updateGroup(groupId, this.groups[groupId]); this.legendLeft.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); } } this.legendLeft.redraw(); @@ -24167,92 +24949,82 @@ return /******/ (function(modules) { // webpackBootstrap LineGraph.prototype._updateAllGroupData = function () { if (this.itemsData != null) { var groupsContent = {}; - var groupId; - for (groupId in this.groups) { + var items = this.itemsData.get(); + //pre-Determine array sizes, for more efficient memory claim + var groupCounts = {}; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; + } + groupCounts.hasOwnProperty(groupId) ? groupCounts[groupId]++ : groupCounts[groupId] = 1; + } + //Now insert data into the arrays. + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; + } + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(groupCounts[groupId]); + } + //Copy data (because of unmodifiable DataView input. + var extended = util.bridgeObject(item); + extended.x = util.convert(item.x, 'Date'); + extended.orginalY = item.y; //real Y + extended.y = Number(item.y); + + var index = groupsContent[groupId].length - groupCounts[groupId]--; + groupsContent[groupId][index] = extended; + } + + //Make sure all groups are present, to allow removal of old groups + for (var groupId in this.groups) { if (this.groups.hasOwnProperty(groupId)) { - groupsContent[groupId] = []; - } - } - for (var itemId in this.itemsData._data) { - if (this.itemsData._data.hasOwnProperty(itemId)) { - var item = this.itemsData._data[itemId]; - if (groupsContent[item.group] === undefined) { - throw new Error('Cannot find referenced group ' + item.group + '. Possible reason: items added before groups? Groups need to be added before items, as items refer to groups.'); + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(0); } - item.x = util.convert(item.x, 'Date'); - groupsContent[item.group].push(item); } } - for (groupId in this.groups) { - if (this.groups.hasOwnProperty(groupId)) { - this.groups[groupId].setItems(groupsContent[groupId]); - } - } - } - }; - /** - * Create or delete the group holding all ungrouped items. This group is used when - * there are no groups specified. This anonymous group is called 'graph'. - * @protected - */ - LineGraph.prototype._updateUngrouped = function () { - if (this.itemsData && this.itemsData != null) { - var ungroupedCounter = 0; - for (var itemId in this.itemsData._data) { - if (this.itemsData._data.hasOwnProperty(itemId)) { - var item = this.itemsData._data[itemId]; - if (item != undefined) { - if (item.hasOwnProperty('group')) { - if (item.group === undefined) { - item.group = UNGROUPED; - } - } else { - item.group = UNGROUPED; + //Update legendas, style and axis + for (var groupId in groupsContent) { + if (groupsContent.hasOwnProperty(groupId)) { + if (groupsContent[groupId].length == 0) { + if (this.groups.hasOwnProperty(groupId)) { + this._removeGroup(groupId); } - ungroupedCounter = item.group == UNGROUPED ? ungroupedCounter + 1 : ungroupedCounter; + } else { + var group = undefined; + if (this.groupsData != undefined) { + group = this.groupsData.get(groupId); + } + if (group == undefined) { + group = { id: groupId, content: this.options.defaultGroup + groupId }; + } + this._updateGroup(group, groupId); + this.groups[groupId].setItems(groupsContent[groupId]); } } } - - if (ungroupedCounter == 0) { - delete this.groups[UNGROUPED]; - this.legendLeft.removeGroup(UNGROUPED); - this.legendRight.removeGroup(UNGROUPED); - this.yAxisLeft.removeGroup(UNGROUPED); - this.yAxisRight.removeGroup(UNGROUPED); - } else { - var group = { id: UNGROUPED, content: this.options.defaultGroup }; - this._updateGroup(group, UNGROUPED); - } - } else { - delete this.groups[UNGROUPED]; - this.legendLeft.removeGroup(UNGROUPED); - this.legendRight.removeGroup(UNGROUPED); - this.yAxisLeft.removeGroup(UNGROUPED); - this.yAxisRight.removeGroup(UNGROUPED); + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); } - - this.legendLeft.redraw(); - this.legendRight.redraw(); }; /** * Redraw the component, mandatory function * @return {boolean} Returns true if the component is resized */ - LineGraph.prototype.redraw = function (forceGraphUpdate) { + LineGraph.prototype.redraw = function () { var resized = false; // calculate actual size and position this.props.width = this.dom.frame.offsetWidth; this.props.height = this.body.domProps.centerContainer.height - this.body.domProps.border.top - this.body.domProps.border.bottom; - // update the graph if there is no lastWidth or with, used for the initial draw - if (this.lastWidth === undefined && this.props.width) { - forceGraphUpdate = true; - } - // check if this component is resized resized = this._isResized() || resized; @@ -24268,7 +25040,7 @@ return /******/ (function(modules) { // webpackBootstrap this.svg.style.left = util.option.asSize(-this.props.width); // if the height of the graph is set as proportional, change the height of the svg - if ((this.options.height + '').indexOf('%') != -1 || this.updateSVGheightOnResize == true) { + if ((this.options.height + '').indexOf("%") != -1 || this.updateSVGheightOnResize == true) { this.updateSVGheight = true; } } @@ -24285,8 +25057,9 @@ return /******/ (function(modules) { // webpackBootstrap } // zoomed is here to ensure that animations are shown correctly. - if (resized == true || zoomed == true || this.abortedGraphUpdate == true || forceGraphUpdate == true) { + if (resized == true || zoomed == true || this.abortedGraphUpdate == true || this.forceGraphUpdate == true) { resized = this._updateGraph() || resized; + this.forceGraphUpdate = false; } else { // move the whole svg while dragging if (this.lastStart != 0) { @@ -24299,12 +25072,36 @@ return /******/ (function(modules) { // webpackBootstrap } } } - this.legendLeft.redraw(); this.legendRight.redraw(); return resized; }; + LineGraph.prototype._getSortedGroupIds = function () { + // getting group Ids + var grouplist = []; + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + var group = this.groups[groupId]; + if (group.visible == true && (this.options.groups.visibility[groupId] === undefined || this.options.groups.visibility[groupId] == true)) { + grouplist.push({ id: groupId, zIndex: group.options.zIndex }); + } + } + } + util.insertSort(grouplist, function (a, b) { + var az = a.zIndex; + var bz = b.zIndex; + if (az === undefined) az = 0; + if (bz === undefined) bz = 0; + return az == bz ? 0 : az < bz ? -1 : 1; + }); + var groupIds = new Array(grouplist.length); + for (var i = 0; i < grouplist.length; i++) { + groupIds[i] = grouplist[i].id; + } + return groupIds; + }; + /** * Update and redraw the graph. * @@ -24314,26 +25111,17 @@ return /******/ (function(modules) { // webpackBootstrap DOMutil.prepareElements(this.svgElements); if (this.props.width != 0 && this.itemsData != null) { var group, i; - var preprocessedGroupData = {}; - var processedGroupData = {}; var groupRanges = {}; var changeCalled = false; + // this is the range of the SVG canvas + var minDate = this.body.util.toGlobalTime(-this.body.domProps.root.width); + var maxDate = this.body.util.toGlobalTime(2 * this.body.domProps.root.width); // getting group Ids - var groupIds = []; - for (var groupId in this.groups) { - if (this.groups.hasOwnProperty(groupId)) { - group = this.groups[groupId]; - if (group.visible == true && (this.options.groups.visibility[groupId] === undefined || this.options.groups.visibility[groupId] == true)) { - groupIds.push(groupId); - } - } - } + var groupIds = this._getSortedGroupIds(); if (groupIds.length > 0) { - // this is the range of the SVG canvas - var minDate = this.body.util.toGlobalTime(-this.body.domProps.root.width); - var maxDate = this.body.util.toGlobalTime(2 * this.body.domProps.root.width); var groupsData = {}; + // fill groups data, this only loads the data we require based on the timewindow this._getRelevantData(groupIds, groupsData, minDate, maxDate); @@ -24342,44 +25130,102 @@ return /******/ (function(modules) { // webpackBootstrap // we transform the X coordinates to detect collisions for (i = 0; i < groupIds.length; i++) { - preprocessedGroupData[groupIds[i]] = this._convertXcoordinates(groupsData[groupIds[i]]); + this._convertXcoordinates(groupsData[groupIds[i]]); } // now all needed data has been collected we start the processing. - this._getYRanges(groupIds, preprocessedGroupData, groupRanges); + this._getYRanges(groupIds, groupsData, groupRanges); // update the Y axis first, we use this data to draw at the correct Y points - // changeCalled is required to clean the SVG on a change emit. changeCalled = this._updateYAxis(groupIds, groupRanges); - var MAX_CYCLES = 5; - if (changeCalled == true && this.COUNTER < MAX_CYCLES) { + + // at changeCalled, abort this update cycle as the graph needs another update with new Width input from the Redraw container. + // Cleanup SVG elements on abort. + if (changeCalled == true) { DOMutil.cleanupElements(this.svgElements); this.abortedGraphUpdate = true; - this.COUNTER++; - this.body.emitter.emit('change'); return true; - } else { - if (this.COUNTER > MAX_CYCLES) { - console.log('WARNING: there may be an infinite loop in the _updateGraph emitter cycle.'); + } + this.abortedGraphUpdate = false; + + // With the yAxis scaled correctly, use this to get the Y values of the points. + var below = undefined; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (this.options.stack === true && this.options.style === 'line') { + if (group.options.excludeFromStacking == undefined || !group.options.excludeFromStacking) { + if (below != undefined) { + this._stack(groupsData[group.id], groupsData[below.id]); + if (group.options.shaded.enabled == true && group.options.shaded.orientation !== "group") { + if (group.options.shaded.orientation == "top" && below.options.shaded.orientation !== "group") { + below.options.shaded.orientation = "group"; + below.options.shaded.groupId = group.id; + } else { + group.options.shaded.orientation = "group"; + group.options.shaded.groupId = below.id; + } + } + } + below = group; + } } - this.COUNTER = 0; - this.abortedGraphUpdate = false; + this._convertYcoordinates(groupsData[groupIds[i]], group); + } - // With the yAxis scaled correctly, use this to get the Y values of the points. - for (i = 0; i < groupIds.length; i++) { - group = this.groups[groupIds[i]]; - processedGroupData[groupIds[i]] = this._convertYcoordinates(groupsData[groupIds[i]], group); + //Precalculate paths and draw shading if appropriate. This will make sure the shading is always behind any lines. + var paths = {}; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (group.options.style === 'line' && group.options.shaded.enabled == true) { + var dataset = groupsData[groupIds[i]]; + if (dataset == null || dataset.length == 0) { + continue; + } + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(dataset, group); + } + if (group.options.shaded.orientation === "group") { + var subGroupId = group.options.shaded.groupId; + if (groupIds.indexOf(subGroupId) === -1) { + console.log(group.id + ": Unknown shading group target given:" + subGroupId); + continue; + } + if (!paths.hasOwnProperty(subGroupId)) { + paths[subGroupId] = Lines.calcPath(groupsData[subGroupId], this.groups[subGroupId]); + } + Lines.drawShading(paths[groupIds[i]], group, paths[subGroupId], this.framework); + } else { + Lines.drawShading(paths[groupIds[i]], group, undefined, this.framework); + } } + } - // draw the groups - for (i = 0; i < groupIds.length; i++) { - group = this.groups[groupIds[i]]; - if (group.options.style != 'bar') { + // draw the groups, calculating paths if still necessary. + Bars.draw(groupIds, groupsData, this.framework); + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (groupsData[groupIds[i]].length > 0) { + switch (group.options.style) { + case "line": + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(groupsData[groupIds[i]], group); + } + Lines.draw(paths[groupIds[i]], group, this.framework); + //explicit no break; + case "point": + //explicit no break; + case "points": + if (group.options.style == "point" || group.options.style == "points" || group.options.drawPoints.enabled == true) { + Points.draw(groupsData[groupIds[i]], group, this.framework); + } + break; + case "bar": // bar needs to be drawn enmasse - group.draw(processedGroupData[groupIds[i]], group, this.framework); + //explicit no break + default: + //do nothing... } } - BarFunctions.draw(groupIds, processedGroupData, this.framework); } } } @@ -24389,6 +25235,49 @@ return /******/ (function(modules) { // webpackBootstrap return false; }; + LineGraph.prototype._stack = function (data, subData) { + var index, dx, dy, subPrevPoint, subNextPoint; + index = 0; + // for each data point we look for a matching on in the set below + for (var j = 0; j < data.length; j++) { + subPrevPoint = undefined; + subNextPoint = undefined; + // we look for time matches or a before-after point + for (var k = index; k < subData.length; k++) { + // if times match exactly + if (subData[k].x === data[j].x) { + subPrevPoint = subData[k]; + subNextPoint = subData[k]; + index = k; + break; + } else if (subData[k].x > data[j].x) { + // overshoot + subNextPoint = subData[k]; + if (k == 0) { + subPrevPoint = subNextPoint; + } else { + subPrevPoint = subData[k - 1]; + } + index = k; + break; + } + } + // in case the last data point has been used, we assume it stays like this. + if (subNextPoint === undefined) { + subPrevPoint = subData[subData.length - 1]; + subNextPoint = subData[subData.length - 1]; + } + // linear interpolation + dx = subNextPoint.x - subPrevPoint.x; + dy = subNextPoint.y - subPrevPoint.y; + if (dx == 0) { + data[j].y = data[j].orginalY + subNextPoint.y; + } else { + data[j].y = data[j].orginalY + dy / dx * (data[j].x - subPrevPoint.x) + subPrevPoint.y; // ax + b where b is data[j].y + } + } + }; + /** * first select and preprocess the data from the datasets. * the groups have their preselection of data, we now loop over this data to see @@ -24407,31 +25296,26 @@ return /******/ (function(modules) { // webpackBootstrap if (groupIds.length > 0) { for (i = 0; i < groupIds.length; i++) { group = this.groups[groupIds[i]]; - groupsData[groupIds[i]] = []; - var dataContainer = groupsData[groupIds[i]]; + var itemsData = group.getItems(); // optimization for sorted data if (group.options.sort == true) { - var guess = Math.max(0, util.binarySearchValue(group.itemsData, minDate, 'x', 'before')); - for (j = guess; j < group.itemsData.length; j++) { - item = group.itemsData[j]; - if (item !== undefined) { - if (item.x > maxDate) { - dataContainer.push(item); - break; - } else { - dataContainer.push(item); - } - } + var dateComparator = function dateComparator(a, b) { + return a.getTime() == b.getTime() ? 0 : a < b ? -1 : 1; + }; + var first = Math.max(0, util.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator)); + var last = Math.min(itemsData.length, util.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1); + if (last <= 0) { + last = itemsData.length; } - } else { - for (j = 0; j < group.itemsData.length; j++) { + var dataContainer = new Array(last - first); + for (j = first; j < last; j++) { item = group.itemsData[j]; - if (item !== undefined) { - if (item.x > minDate && item.x < maxDate) { - dataContainer.push(item); - } - } + dataContainer[j - first] = item; } + groupsData[groupIds[i]] = dataContainer; + } else { + // If unsorted data, all data is relevant, just returning entire structure + groupsData[groupIds[i]] = group.itemsData; } } } @@ -24460,11 +25344,12 @@ return /******/ (function(modules) { // webpackBootstrap var pointsPerPixel = amountOfPoints / xDistance; increment = Math.min(Math.ceil(0.2 * amountOfPoints), Math.max(1, Math.round(pointsPerPixel))); - var sampledData = []; + var sampledData = new Array(amountOfPoints); for (var j = 0; j < amountOfPoints; j += increment) { - sampledData.push(dataContainer[j]); + var idx = Math.round(j / increment); + sampledData[idx] = dataContainer[j]; } - groupsData[groupIds[i]] = sampledData; + groupsData[groupIds[i]] = sampledData.splice(0, Math.round(amountOfPoints / increment)); } } } @@ -24493,9 +25378,9 @@ return /******/ (function(modules) { // webpackBootstrap // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. if (options.stack === true && options.style === 'bar') { if (options.yAxisOrientation === 'left') { - combinedDataLeft = combinedDataLeft.concat(group.getData(groupData)); + combinedDataLeft = combinedDataLeft.concat(group.getItems()); } else { - combinedDataRight = combinedDataRight.concat(group.getData(groupData)); + combinedDataRight = combinedDataRight.concat(group.getItems()); } } else { groupRanges[groupIds[i]] = group.getYRange(groupData, groupIds[i]); @@ -24504,11 +25389,8 @@ return /******/ (function(modules) { // webpackBootstrap } // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. - BarFunctions.getStackedYRange(combinedDataLeft, groupRanges, groupIds, '__barStackLeft', 'left'); - BarFunctions.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right'); - // if line graphs are stacked, their range need to be handled differently and accumulated over all groups. - //LineFunctions.getStackedYRange(combinedDataLeft , groupRanges, groupIds, '__lineStackLeft' , 'left' ); - //LineFunctions.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__lineStackRight', 'right'); + Bars.getStackedYRange(combinedDataLeft, groupRanges, groupIds, '__barStackLeft', 'left'); + Bars.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right'); } }; @@ -24582,6 +25464,8 @@ return /******/ (function(modules) { // webpackBootstrap this.yAxisRight.drawIcons = false; } this.yAxisRight.master = !yAxisLeftUsed; + this.yAxisRight.masterAxis = this.yAxisLeft; + if (this.yAxisRight.master == false) { if (yAxisRightUsed == true) { this.yAxisLeft.lineOffset = this.yAxisRight.width; @@ -24590,9 +25474,6 @@ return /******/ (function(modules) { // webpackBootstrap } resized = this.yAxisLeft.redraw() || resized; - this.yAxisRight.stepPixels = this.yAxisLeft.stepPixels; - this.yAxisRight.zeroCrossing = this.yAxisLeft.zeroCrossing; - this.yAxisRight.amountOfSteps = this.yAxisLeft.amountOfSteps; resized = this.yAxisRight.redraw() || resized; } else { resized = this.yAxisRight.redraw() || resized; @@ -24643,17 +25524,11 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ LineGraph.prototype._convertXcoordinates = function (datapoints) { - var extractedData = []; - var xValue, yValue; var toScreen = this.body.util.toScreen; - for (var i = 0; i < datapoints.length; i++) { - xValue = toScreen(datapoints[i].x) + this.props.width; - yValue = datapoints[i].y; - extractedData.push({ x: xValue, y: yValue }); + datapoints[i].screen_x = toScreen(datapoints[i].x) + this.props.width; + datapoints[i].screen_y = datapoints[i].y; //starting point for range calculations } - - return extractedData; }; /** @@ -24667,40 +25542,29 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ LineGraph.prototype._convertYcoordinates = function (datapoints, group) { - var extractedData = []; - var xValue, yValue; - var toScreen = this.body.util.toScreen; var axis = this.yAxisLeft; var svgHeight = Number(this.svg.style.height.replace('px', '')); if (group.options.yAxisOrientation == 'right') { axis = this.yAxisRight; } - for (var i = 0; i < datapoints.length; i++) { - var labelValue = datapoints[i].label ? datapoints[i].label : null; - xValue = toScreen(datapoints[i].x) + this.props.width; - yValue = Math.round(axis.convertValue(datapoints[i].y)); - extractedData.push({ x: xValue, y: yValue, label: labelValue }); + datapoints[i].screen_y = Math.round(axis.convertValue(datapoints[i].y)); } - group.setZeroPosition(Math.min(svgHeight, axis.convertValue(0))); - - return extractedData; }; module.exports = LineGraph; /***/ }, -/* 51 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); - var Component = __webpack_require__(26); - var DataStep = __webpack_require__(52); - + var Component = __webpack_require__(25); + var DataScale = __webpack_require__(51); /** * A horizontal time axis * @param {Object} [options] See DataAxis.setOptions for the available @@ -24717,7 +25581,7 @@ return /******/ (function(modules) { // webpackBootstrap orientation: 'left', // supported: 'left', 'right' showMinorLabels: true, showMajorLabels: true, - icons: true, + icons: false, majorLinesOffset: 7, minorLinesOffset: 4, labelOffsetX: 10, @@ -24729,14 +25593,14 @@ return /******/ (function(modules) { // webpackBootstrap left: { range: { min: undefined, max: undefined }, format: function format(value) { - return value; + return '' + parseFloat(value.toPrecision(3)); }, title: { text: undefined, style: undefined } }, right: { range: { min: undefined, max: undefined }, format: function format(value) { - return value; + return '' + parseFloat(value.toPrecision(3)); }, title: { text: undefined, style: undefined } } @@ -24752,16 +25616,16 @@ return /******/ (function(modules) { // webpackBootstrap }; this.dom = {}; - + this.scale = undefined; this.range = { start: 0, end: 0 }; this.options = util.extend({}, this.defaultOptions); this.conversionFactor = 1; this.setOptions(options); - this.width = Number(('' + this.options.width).replace('px', '')); + this.width = Number(('' + this.options.width).replace("px", "")); this.minWidth = this.width; - this.height = this.linegraphSVG.offsetHeight; + this.height = this.linegraphSVG.getBoundingClientRect().height; this.hidden = false; this.stepPixels = 25; @@ -24770,6 +25634,7 @@ return /******/ (function(modules) { // webpackBootstrap this.lineOffset = 0; this.master = true; + this.masterAxis = null; this.svgElements = {}; this.iconsRemoved = false; @@ -24778,9 +25643,10 @@ return /******/ (function(modules) { // webpackBootstrap // create the HTML DOM this._create(); + this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; var me = this; - this.body.emitter.on('verticalDrag', function () { + this.body.emitter.on("verticalDrag", function () { me.dom.lineContainer.style.top = me.body.domProps.scrollTop + 'px'; }); } @@ -24795,6 +25661,9 @@ return /******/ (function(modules) { // webpackBootstrap }; DataAxis.prototype.updateGroup = function (label, graphOptions) { + if (!this.groups.hasOwnProperty(label)) { + this.amountOfGroups += 1; + } this.groups[label] = graphOptions; }; @@ -24812,10 +25681,9 @@ return /******/ (function(modules) { // webpackBootstrap redraw = true; } var fields = ['orientation', 'showMinorLabels', 'showMajorLabels', 'icons', 'majorLinesOffset', 'minorLinesOffset', 'labelOffsetX', 'labelOffsetY', 'iconWidth', 'width', 'visible', 'left', 'right', 'alignZeros']; - util.selectiveExtend(fields, this.options, options); - - this.minWidth = Number(('' + this.options.width).replace('px', '')); + util.selectiveDeepExtend(fields, this.options, options); + this.minWidth = Number(('' + this.options.width).replace("px", "")); if (redraw === true && this.dom.frame) { this.hide(); this.show(); @@ -24837,12 +25705,12 @@ return /******/ (function(modules) { // webpackBootstrap this.dom.lineContainer.style.position = 'relative'; // create svg element for graph drawing. - this.svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - this.svg.style.position = 'absolute'; + this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + this.svg.style.position = "absolute"; this.svg.style.top = '0px'; this.svg.style.height = '100%'; this.svg.style.width = '100%'; - this.svg.style.display = 'block'; + this.svg.style.display = "block"; this.dom.frame.appendChild(this.svg); }; @@ -24869,7 +25737,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0; i < groupArray.length; i++) { var groupId = groupArray[i]; if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) { - this.groups[groupId].drawIcon(x, y, this.svgElements, this.svg, iconWidth, iconHeight); + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); y += iconHeight + iconOffset; } } @@ -24925,11 +25793,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param end */ DataAxis.prototype.setRange = function (start, end) { - if (this.master === false && this.options.alignZeros === true && this.zeroCrossing != -1) { - if (start > 0) { - start = 0; - } - } this.range.start = start; this.range.end = end; }; @@ -24956,11 +25819,11 @@ return /******/ (function(modules) { // webpackBootstrap this.hide(); } else { this.show(); - this.height = Number(this.linegraphSVG.style.height.replace('px', '')); + this.height = Number(this.linegraphSVG.style.height.replace("px", "")); // svg offsetheight did not work in firefox and explorer... this.dom.lineContainer.style.height = this.height + 'px'; - this.width = this.options.visible === true ? Number(('' + this.options.width).replace('px', '')) : 0; + this.width = this.options.visible === true ? Number(('' + this.options.width).replace("px", "")) : 0; var props = this.props; var frame = this.dom.frame; @@ -24990,7 +25853,7 @@ return /******/ (function(modules) { // webpackBootstrap frame.style.left = '0'; frame.style.bottom = ''; frame.style.width = this.width + 'px'; - frame.style.height = this.height + 'px'; + frame.style.height = this.height + "px"; this.props.width = this.body.domProps.left.width; this.props.height = this.body.domProps.left.height; } else { @@ -24999,7 +25862,7 @@ return /******/ (function(modules) { // webpackBootstrap frame.style.bottom = '0'; frame.style.left = '0'; frame.style.width = this.width + 'px'; - frame.style.height = this.height + 'px'; + frame.style.height = this.height + "px"; this.props.width = this.body.domProps.right.width; this.props.height = this.body.domProps.right.height; } @@ -25023,95 +25886,55 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ DataAxis.prototype._redrawLabels = function () { + var _this = this; + var resized = false; DOMutil.prepareElements(this.DOMelements.lines); DOMutil.prepareElements(this.DOMelements.labels); var orientation = this.options['orientation']; + var customRange = this.options[orientation].range != undefined ? this.options[orientation].range : {}; - // get the range for the slaved axis - var step; - if (this.master === false) { - var stepSize, rangeStart, rangeEnd, minimumStep; - if (this.zeroCrossing !== -1 && this.options.alignZeros === true) { - if (this.range.end > 0) { - stepSize = this.range.end / this.zeroCrossing; // size of one step - rangeStart = this.range.end - this.amountOfSteps * stepSize; - rangeEnd = this.range.end; - } else { - // all of the range (including start) has to be done before the zero crossing. - stepSize = -1 * this.range.start / (this.amountOfSteps - this.zeroCrossing); // absolute size of a step - rangeStart = this.range.start; - rangeEnd = this.range.start + stepSize * this.amountOfSteps; - } - } else { - rangeStart = this.range.start; - rangeEnd = this.range.end; - } - minimumStep = this.stepPixels; - } else { - // calculate range and step (step such that we have space for 7 characters per label) - minimumStep = this.props.majorCharHeight; - rangeStart = this.range.start; - rangeEnd = this.range.end; + //Override range with manual options: + var autoScaleEnd = true; + if (customRange.max != undefined) { + this.range.end = customRange.max; + autoScaleEnd = false; + } + var autoScaleStart = true; + if (customRange.min != undefined) { + this.range.start = customRange.min; + autoScaleStart = false; } - this.step = step = new DataStep(rangeStart, rangeEnd, minimumStep, this.dom.frame.offsetHeight, this.options[this.options.orientation].range, this.options[this.options.orientation].format, this.master === false && this.options.alignZeros // does the step have to align zeros? only if not master and the options is on - ); + this.scale = new DataScale(this.range.start, this.range.end, autoScaleStart, autoScaleEnd, this.dom.frame.offsetHeight, this.props.majorCharHeight, this.options.alignZeros, this.options[orientation].format); - // the slave axis needs to use the same horizontal lines as the master axis. - if (this.master === true) { - this.stepPixels = this.dom.frame.offsetHeight / step.marginRange * step.step; - this.amountOfSteps = Math.ceil(this.dom.frame.offsetHeight / this.stepPixels); - } else { - // align with zero - if (this.options.alignZeros === true && this.zeroCrossing !== -1) { - // distance is the amount of steps away from the zero crossing we are. - var distance = (step.current - this.zeroCrossing * step.step) / step.step; - this.step.shift(distance); - } + if (this.master === false && this.masterAxis != undefined) { + this.scale.followScale(this.masterAxis.scale); } - // value at the bottom of the SVG - this.valueAtBottom = step.marginEnd; - + //Is updated in side-effect of _redrawLabel(): this.maxLabelSize = 0; - var y = 0; // init value - var stepIndex = 0; // init value - var isMajor = false; // init value - while (stepIndex < this.amountOfSteps) { - y = Math.round(stepIndex * this.stepPixels); - isMajor = step.isMajor(); - if (stepIndex > 0 && stepIndex !== this.amountOfSteps) { - if (this.options['showMinorLabels'] && isMajor === false || this.master === false && this.options['showMinorLabels'] === true) { - this._redrawLabel(y - 2, step.getCurrent(), orientation, 'vis-y-axis vis-minor', this.props.minorCharHeight); + var lines = this.scale.getLines(); + lines.forEach(function (line) { + var y = line.y; + var isMajor = line.major; + if (_this.options['showMinorLabels'] && isMajor === false) { + _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-minor', _this.props.minorCharHeight); + } + if (isMajor) { + if (y >= 0) { + _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-major', _this.props.majorCharHeight); } - - 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(), orientation, 'vis-y-axis vis-major', this.props.majorCharHeight); - } - this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', this.options.majorLinesOffset, this.props.majorLineWidth); + } + if (_this.master === true) { + if (isMajor) { + _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', _this.options.majorLinesOffset, _this.props.majorLineWidth); } else { - this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', this.options.minorLinesOffset, this.props.minorLineWidth); + _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', _this.options.minorLinesOffset, _this.props.minorLineWidth); } } - - // get zero crossing - if (this.master === true && step.current === 0) { - this.zeroCrossing = stepIndex; - } - - step.next(); - stepIndex += 1; - } - - // get zero crossing if it's the last step - if (this.master === true && step.current === 0) { - this.zeroCrossing = stepIndex; - } - - this.conversionFactor = this.stepPixels / step.step; + }); // Note that title is rotated, so we're using the height, not width! var titleWidth = 0; @@ -25123,7 +25946,7 @@ return /******/ (function(modules) { // webpackBootstrap // this will resize the yAxis to accommodate the labels. if (this.maxLabelSize > this.width - offset && this.options.visible === true) { this.width = this.maxLabelSize + offset; - this.options.width = this.width + 'px'; + this.options.width = this.width + "px"; DOMutil.cleanupElements(this.DOMelements.lines); DOMutil.cleanupElements(this.DOMelements.labels); this.redraw(); @@ -25131,29 +25954,27 @@ return /******/ (function(modules) { // webpackBootstrap } // this will resize the yAxis if it is too big for the labels. else if (this.maxLabelSize < this.width - offset && this.options.visible === true && this.width > this.minWidth) { - this.width = Math.max(this.minWidth, this.maxLabelSize + offset); - this.options.width = this.width + 'px'; - DOMutil.cleanupElements(this.DOMelements.lines); - DOMutil.cleanupElements(this.DOMelements.labels); - this.redraw(); - resized = true; - } else { - DOMutil.cleanupElements(this.DOMelements.lines); - DOMutil.cleanupElements(this.DOMelements.labels); - resized = false; - } + this.width = Math.max(this.minWidth, this.maxLabelSize + offset); + this.options.width = this.width + "px"; + DOMutil.cleanupElements(this.DOMelements.lines); + DOMutil.cleanupElements(this.DOMelements.labels); + this.redraw(); + resized = true; + } else { + DOMutil.cleanupElements(this.DOMelements.lines); + DOMutil.cleanupElements(this.DOMelements.labels); + resized = false; + } return resized; }; DataAxis.prototype.convertValue = function (value) { - var invertedValue = this.valueAtBottom - value; - var convertedValue = invertedValue * this.conversionFactor; - return convertedValue; + return this.scale.convertValue(value); }; DataAxis.prototype.screenToValue = function (x) { - return this.valueAtBottom - x / this.conversionFactor; + return this.scale.screenToValue(x); }; /** @@ -25172,10 +25993,10 @@ return /******/ (function(modules) { // webpackBootstrap label.innerHTML = text; if (orientation === 'left') { label.style.left = '-' + this.options.labelOffsetX + 'px'; - label.style.textAlign = 'right'; + label.style.textAlign = "right"; } else { label.style.right = '-' + this.options.labelOffsetX + 'px'; - label.style.textAlign = 'left'; + label.style.textAlign = "left"; } label.style.top = y - 0.5 * characterHeight + this.options.labelOffsetY + 'px'; @@ -25295,97 +26116,78 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = DataAxis; /***/ }, -/* 52 */ +/* 51 */ /***/ function(module, exports) { /** - * @constructor DataStep - * The class DataStep is an iterator for data for the lineGraph. You provide a start data point and an - * end data point. The class itself determines the best scale (step size) based on the - * provided start Date, end Date, and minimumStep. - * - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * - * Alternatively, you can set a scale by hand. - * After creation, you can initialize the class by executing first(). Then you - * can iterate from the start date to the end date via next(). You can check if - * the end date is reached with the function hasNext(). After each step, you can - * retrieve the current date via getCurrent(). - * The DataStep has scales ranging from milliseconds, seconds, minutes, hours, - * days, to years. - * - * Version: 1.2 - * - * @param {Date} [start] The start date, for example new Date(2010, 9, 21) - * or new Date(2010, 9, 21, 23, 45, 00) - * @param {Date} [end] The end date - * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds + * Created by ludo on 25-1-16. */ - 'use strict'; - - function DataStep(start, end, minimumStep, containerHeight, customRange, formattingFunction, alignZeros) { - // variables - this.current = 0; - this.autoScale = true; - this.stepIndex = 0; - this.step = 1; - this.scale = 1; - this.formattingFunction = formattingFunction; + 'use strict'; - this.marginStart; - this.marginEnd; - this.deadSpace = 0; + function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight) { + var zeroAlign = arguments.length <= 6 || arguments[6] === undefined ? false : arguments[6]; + var formattingFunction = arguments.length <= 7 || arguments[7] === undefined ? false : arguments[7]; this.majorSteps = [1, 2, 5, 10]; this.minorSteps = [0.25, 0.5, 1, 2]; + this.customLines = null; - this.alignZeros = alignZeros; + this.containerHeight = containerHeight; + this.majorCharHeight = majorCharHeight; + this._start = start; + this._end = end; - this.setRange(start, end, minimumStep, containerHeight, customRange); - } + this.scale = 1; + this.minorStepIdx = -1; + this.magnitudefactor = 1; + this.determineScale(); - /** - * Set a new range - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * @param {Number} [start] The start date and time. - * @param {Number} [end] The end date and time. - * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds - */ - DataStep.prototype.setRange = function (start, end, minimumStep, containerHeight, customRange) { - this._start = customRange.min === undefined ? start : customRange.min; - this._end = customRange.max === undefined ? end : customRange.max; - if (this._start === this._end) { - this._start = customRange.min === undefined ? this._start - 0.75 : this._start; - this._end = customRange.max === undefined ? this._end + 1 : this._end;; - } + this.zeroAlign = zeroAlign; + this.autoScaleStart = autoScaleStart; + this.autoScaleEnd = autoScaleEnd; + + this.formattingFunction = formattingFunction; + + if (autoScaleStart || autoScaleEnd) { + var me = this; + var roundToMinor = function roundToMinor(value) { + var rounded = value - value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]); + if (value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]) > 0.5 * (me.magnitudefactor * me.minorSteps[me.minorStepIdx])) { + return rounded + me.magnitudefactor * me.minorSteps[me.minorStepIdx]; + } else { + return rounded; + } + }; + if (autoScaleStart) { + this._start -= this.magnitudefactor * 2 * this.minorSteps[this.minorStepIdx]; + this._start = roundToMinor(this._start); + } - if (this.autoScale === true) { - this.setMinimumStep(minimumStep, containerHeight); + if (autoScaleEnd) { + this._end += this.magnitudefactor * this.minorSteps[this.minorStepIdx]; + this._end = roundToMinor(this._end); + } + this.determineScale(); } + } - this.setFirst(customRange); + DataScale.prototype.setCharHeight = function (majorCharHeight) { + this.majorCharHeight = majorCharHeight; }; - /** - * Automatically determine the scale that bests fits the provided minimum step - * @param {Number} [minimumStep] The minimum step size in pixels - */ - DataStep.prototype.setMinimumStep = function (minimumStep, containerHeight) { - // round to floor + DataScale.prototype.setHeight = function (containerHeight) { + this.containerHeight = containerHeight; + }; + + DataScale.prototype.determineScale = function () { var range = this._end - this._start; - var safeRange = range * 1.2; - var minimumStepValue = minimumStep * (safeRange / containerHeight); - var orderOfMagnitude = Math.round(Math.log(safeRange) / Math.LN10); + this.scale = this.containerHeight / range; + var minimumStepValue = this.majorCharHeight / this.scale; + var orderOfMagnitude = Math.round(Math.log(range) / Math.LN10); - var minorStepIdx = -1; - var magnitudefactor = Math.pow(10, orderOfMagnitude); + this.minorStepIdx = -1; + this.magnitudefactor = Math.pow(10, orderOfMagnitude); var start = 0; if (orderOfMagnitude < 0) { @@ -25393,13 +26195,13 @@ return /******/ (function(modules) { // webpackBootstrap } var solutionFound = false; - for (var i = start; Math.abs(i) <= Math.abs(orderOfMagnitude); i++) { - magnitudefactor = Math.pow(10, i); + for (var l = start; Math.abs(l) <= Math.abs(orderOfMagnitude); l++) { + this.magnitudefactor = Math.pow(10, l); for (var j = 0; j < this.minorSteps.length; j++) { - var stepSize = magnitudefactor * this.minorSteps[j]; + var stepSize = this.magnitudefactor * this.minorSteps[j]; if (stepSize >= minimumStepValue) { solutionFound = true; - minorStepIdx = j; + this.minorStepIdx = j; break; } } @@ -25407,83 +26209,22 @@ return /******/ (function(modules) { // webpackBootstrap break; } } - this.stepIndex = minorStepIdx; - this.scale = magnitudefactor; - this.step = magnitudefactor * this.minorSteps[minorStepIdx]; }; - /** - * Round the current date to the first minor date value - * This must be executed once when the current date is set to start Date - */ - DataStep.prototype.setFirst = function (customRange) { - if (customRange === undefined) { - customRange = {}; - } - - var niceStart = customRange.min === undefined ? this._start - this.scale * 2 * this.minorSteps[this.stepIndex] : customRange.min; - var niceEnd = customRange.max === undefined ? this._end + this.scale * this.minorSteps[this.stepIndex] : customRange.max; - - this.marginEnd = customRange.max === undefined ? this.roundToMinor(niceEnd) : customRange.max; - this.marginStart = customRange.min === undefined ? this.roundToMinor(niceStart) : customRange.min; - - // if we need to align the zero's we need to make sure that there is a zero to use. - if (this.alignZeros === true && (this.marginEnd - this.marginStart) % this.step != 0) { - this.marginEnd += this.marginEnd % this.step; - } - - this.deadSpace = this.roundToMinor(niceEnd) - niceEnd + this.roundToMinor(niceStart) - niceStart; - this.marginRange = this.marginEnd - this.marginStart; - - this.current = this.marginEnd; - }; - - DataStep.prototype.roundToMinor = function (value) { - var rounded = value - value % (this.scale * this.minorSteps[this.stepIndex]); - if (value % (this.scale * this.minorSteps[this.stepIndex]) > 0.5 * (this.scale * this.minorSteps[this.stepIndex])) { - return rounded + this.scale * this.minorSteps[this.stepIndex]; - } else { - return rounded; - } - }; - - /** - * Check if the there is a next step - * @return {boolean} true if the current date has not passed the end date - */ - DataStep.prototype.hasNext = function () { - return this.current >= this.marginStart; + DataScale.prototype.is_major = function (value) { + return value % (this.magnitudefactor * this.majorSteps[this.minorStepIdx]) === 0; }; - /** - * Do the next step - */ - DataStep.prototype.next = function () { - var prev = this.current; - this.current -= this.step; - - // safety mechanism: if current time is still unchanged, move to the end - if (this.current === prev) { - this.current = this._end; - } + DataScale.prototype.getStep = function () { + return this.magnitudefactor * this.minorSteps[this.minorStepIdx]; }; - /** - * Do the next step - */ - DataStep.prototype.previous = function () { - this.current += this.step; - this.marginEnd += this.step; - this.marginRange = this.marginEnd - this.marginStart; + DataScale.prototype.getFirstMajor = function () { + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + return this.convertValue(this._start + (majorStep - this._start % majorStep) % majorStep); }; - /** - * Get the current datetime - * @return {String} current The current date - */ - DataStep.prototype.getCurrent = function () { - // prevent round-off errors when close to zero - var current = Math.abs(this.current) < this.step / 2 ? 0 : this.current; + DataScale.prototype.formatValue = function (current) { var returnValue = current.toPrecision(5); if (typeof this.formattingFunction === 'function') { returnValue = this.formattingFunction(current); @@ -25498,40 +26239,135 @@ return /******/ (function(modules) { // webpackBootstrap } }; - /** - * Check if the current value is a major value (for example when the step - * is DAY, a major value is each first day of the MONTH) - * @return {boolean} true if current date is major, else false. - */ - DataStep.prototype.isMajor = function () { - return this.current % (this.scale * this.majorSteps[this.stepIndex]) === 0; + DataScale.prototype.getLines = function () { + var lines = []; + var step = this.getStep(); + var bottomOffset = (step - this._start % step) % step; + for (var i = this._start + bottomOffset; this._end - i > 0.00001; i += step) { + if (i != this._start) { + //Skip the bottom line + lines.push({ major: this.is_major(i), y: this.convertValue(i), val: this.formatValue(i) }); + } + } + return lines; }; - DataStep.prototype.shift = function (steps) { - if (steps < 0) { - for (var i = 0; i < -steps; i++) { - this.previous(); + DataScale.prototype.followScale = function (other) { + var oldStepIdx = this.minorStepIdx; + var oldStart = this._start; + var oldEnd = this._end; + + var me = this; + var increaseMagnitude = function increaseMagnitude() { + me.magnitudefactor *= 2; + }; + var decreaseMagnitude = function decreaseMagnitude() { + me.magnitudefactor /= 2; + }; + + if (other.minorStepIdx <= 1 && this.minorStepIdx <= 1 || other.minorStepIdx > 1 && this.minorStepIdx > 1) { + //easy, no need to change stepIdx nor multiplication factor + } else if (other.minorStepIdx < this.minorStepIdx) { + //I'm 5, they are 4 per major. + this.minorStepIdx = 1; + if (oldStepIdx == 2) { + increaseMagnitude(); + } else { + increaseMagnitude(); + increaseMagnitude(); + } + } else { + //I'm 4, they are 5 per major + this.minorStepIdx = 2; + if (oldStepIdx == 1) { + decreaseMagnitude(); + } else { + decreaseMagnitude(); + decreaseMagnitude(); + } } - } else if (steps > 0) { - for (var i = 0; i < steps; i++) { - this.next(); + + //Get masters stats: + var lines = other.getLines(); + var otherZero = other.convertValue(0); + var otherStep = other.getStep() * other.scale; + + var done = false; + var count = 0; + //Loop until magnitude is correct for given constrains. + while (!done && count++ < 5) { + + //Get my stats: + this.scale = otherStep / (this.minorSteps[this.minorStepIdx] * this.magnitudefactor); + var newRange = this.containerHeight / this.scale; + + //For the case the magnitudefactor has changed: + this._start = oldStart; + this._end = this._start + newRange; + + var myOriginalZero = this._end * this.scale; + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + var majorOffset = this.getFirstMajor() - other.getFirstMajor(); + + if (this.zeroAlign) { + var zeroOffset = otherZero - myOriginalZero; + this._end += zeroOffset / this.scale; + this._start = this._end - newRange; + } else { + if (!this.autoScaleStart) { + this._start += majorStep - majorOffset / this.scale; + this._end = this._start + newRange; + } else { + this._start -= majorOffset / this.scale; + this._end = this._start + newRange; + } + } + if (!this.autoScaleEnd && this._end > oldEnd + 0.00001) { + //Need to decrease magnitude to prevent scale overshoot! (end) + decreaseMagnitude(); + done = false; + continue; } + if (!this.autoScaleStart && this._start < oldStart - 0.00001) { + if (this.zeroAlign && oldStart >= 0) { + console.warn("Can't adhere to given 'min' range, due to zeroalign"); + } else { + //Need to decrease magnitude to prevent scale overshoot! (start) + decreaseMagnitude(); + done = false; + continue; + } + } + if (this.autoScaleStart && this.autoScaleEnd && newRange < oldEnd - oldStart) { + increaseMagnitude(); + done = false; + continue; + } + done = true; } }; - module.exports = DataStep; + DataScale.prototype.convertValue = function (value) { + return this.containerHeight - (value - this._start) * this.scale; + }; + + DataScale.prototype.screenToValue = function (pixels) { + return (this.containerHeight - pixels) / this.scale + this._start; + }; + + module.exports = DataScale; /***/ }, -/* 53 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); - var Line = __webpack_require__(54); - var Bar = __webpack_require__(56); - var Points = __webpack_require__(55); + var Bars = __webpack_require__(53); + var Lines = __webpack_require__(55); + var Points = __webpack_require__(54); /** * /** @@ -25545,7 +26381,7 @@ return /******/ (function(modules) { // webpackBootstrap */ function GraphGroup(group, groupId, options, groupsUsingDefaultStyles) { this.id = groupId; - var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation']; + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation', 'zIndex', 'excludeFromStacking', 'excludeFromLegend']; this.options = util.selectiveBridgeObject(fields, options); this.usingDefaultStyle = group.className === undefined; this.groupsUsingDefaultStyles = groupsUsingDefaultStyles; @@ -25566,21 +26402,21 @@ return /******/ (function(modules) { // webpackBootstrap if (items != null) { this.itemsData = items; if (this.options.sort == true) { - this.itemsData.sort(function (a, b) { - return a.x - b.x; + util.insertSort(this.itemsData, function (a, b) { + return a.x > b.x ? 1 : -1; }); } - // typecast all items to numbers. Takes around 10ms for 500.000 items - for (var i = 0; i < this.itemsData.length; i++) { - this.itemsData[i].y = Number(this.itemsData[i].y); - } } else { this.itemsData = []; } }; + GraphGroup.prototype.getItems = function () { + return this.itemsData; + }; + /** - * this is used for plotting barcharts, this way, we only have to calculate it once. + * this is used for barcharts and shading, this way, we only have to calculate it once. * @param pos */ GraphGroup.prototype.setZeroPosition = function (pos) { @@ -25593,7 +26429,7 @@ return /******/ (function(modules) { // webpackBootstrap */ GraphGroup.prototype.setOptions = function (options) { if (options !== undefined) { - var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'excludeFromLegend']; + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'zIndex', 'excludeFromStacking', 'excludeFromLegend']; util.selectiveDeepExtend(fields, this.options, options); // if the group's drawPoints is a function delegate the callback to the onRender property @@ -25622,14 +26458,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - - if (this.options.style == 'line') { - this.type = new Line(this.id, this.options); - } else if (this.options.style == 'bar') { - this.type = new Bar(this.id, this.options); - } else if (this.options.style == 'points') { - this.type = new Points(this.id, this.options); - } }; /** @@ -25645,65 +26473,6 @@ return /******/ (function(modules) { // webpackBootstrap this.setOptions(group.options); }; - /** - * draw the icon for the legend. - * - * @param x - * @param y - * @param JSONcontainer - * @param SVGcontainer - * @param iconWidth - * @param iconHeight - */ - GraphGroup.prototype.drawIcon = function (x, y, JSONcontainer, SVGcontainer, iconWidth, iconHeight) { - var fillHeight = iconHeight * 0.5; - var path, fillPath; - - var outline = DOMutil.getSVGElement('rect', JSONcontainer, SVGcontainer); - outline.setAttributeNS(null, 'x', x); - outline.setAttributeNS(null, 'y', y - fillHeight); - outline.setAttributeNS(null, 'width', iconWidth); - outline.setAttributeNS(null, 'height', 2 * fillHeight); - outline.setAttributeNS(null, 'class', 'vis-outline'); - - if (this.options.style == 'line') { - path = DOMutil.getSVGElement('path', JSONcontainer, SVGcontainer); - path.setAttributeNS(null, 'class', this.className); - if (this.style !== undefined) { - path.setAttributeNS(null, 'style', this.style); - } - - path.setAttributeNS(null, 'd', 'M' + x + ',' + y + ' L' + (x + iconWidth) + ',' + y + ''); - if (this.options.shaded.enabled == true) { - fillPath = DOMutil.getSVGElement('path', JSONcontainer, SVGcontainer); - if (this.options.shaded.orientation == 'top') { - fillPath.setAttributeNS(null, 'd', 'M' + x + ', ' + (y - fillHeight) + 'L' + x + ',' + y + ' L' + (x + iconWidth) + ',' + y + ' L' + (x + iconWidth) + ',' + (y - fillHeight)); - } else { - fillPath.setAttributeNS(null, 'd', 'M' + x + ',' + y + ' ' + 'L' + x + ',' + (y + fillHeight) + ' ' + 'L' + (x + iconWidth) + ',' + (y + fillHeight) + 'L' + (x + iconWidth) + ',' + y); - } - fillPath.setAttributeNS(null, 'class', this.className + ' vis-icon-fill'); - } - - if (this.options.drawPoints.enabled == true) { - var groupTemplate = { - style: this.options.drawPoints.style, - size: this.options.drawPoints.size, - className: this.className - }; - DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, JSONcontainer, SVGcontainer); - } - } else { - var barWidth = Math.round(0.3 * iconWidth); - var bar1Height = Math.round(0.4 * iconHeight); - var bar2Height = Math.round(0.75 * iconHeight); - - var offset = Math.round((iconWidth - 2 * barWidth) / 3); - - DOMutil.drawBar(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, barWidth, bar1Height, this.className + ' vis-bar', JSONcontainer, SVGcontainer, this.style); - DOMutil.drawBar(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, this.className + ' vis-bar', JSONcontainer, SVGcontainer, this.style); - } - }; - /** * return the legend entree for this group. * @@ -25711,335 +26480,33 @@ return /******/ (function(modules) { // webpackBootstrap * @param iconHeight * @returns {{icon: HTMLElement, label: (group.content|*|string), orientation: (.options.yAxisOrientation|*)}} */ - GraphGroup.prototype.getLegend = function (iconWidth, iconHeight) { - var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - this.drawIcon(0, 0.5 * iconHeight, [], svg, iconWidth, iconHeight); - return { icon: svg, label: this.content, orientation: this.options.yAxisOrientation }; - }; - - GraphGroup.prototype.getYRange = function (groupData) { - return this.type.getYRange(groupData); - }; - - GraphGroup.prototype.getData = function (groupData) { - return this.type.getData(groupData); - }; - - GraphGroup.prototype.draw = function (dataset, group, framework) { - this.type.draw(dataset, group, framework); - }; - - module.exports = GraphGroup; - -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var DOMutil = __webpack_require__(7); - var Points = __webpack_require__(55); - - function Line(groupId, options) { - this.groupId = groupId; - this.options = options; - } - - Line.prototype.getData = function (groupData) { - var combinedData = []; - for (var j = 0; j < groupData.length; j++) { - combinedData.push({ - x: groupData[j].x, - y: groupData[j].y, - groupId: this.groupId - }); - } - return combinedData; - }; - - Line.prototype.getYRange = function (groupData) { - var yMin = groupData[0].y; - var yMax = groupData[0].y; - for (var j = 0; j < groupData.length; j++) { - yMin = yMin > groupData[j].y ? groupData[j].y : yMin; - yMax = yMax < groupData[j].y ? groupData[j].y : yMax; - } - return { min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation }; - }; - - Line.getStackedYRange = function (combinedData, groupRanges, groupIds, groupLabel, orientation) { - if (combinedData.length > 0) { - // sort by time and by group - combinedData.sort(function (a, b) { - if (a.x === b.x) { - return a.groupId < b.groupId ? -1 : 1; - } else { - return a.x - b.x; - } - }); - var intersections = {}; - - Line._getDataIntersections(intersections, combinedData); - groupRanges[groupLabel] = Line._getStackedYRange(intersections, combinedData); - groupRanges[groupLabel].yAxisOrientation = orientation; - groupIds.push(groupLabel); - } - }; - - Line._getStackedYRange = function (intersections, combinedData) { - var key; - var yMin = combinedData[0].y; - var yMax = combinedData[0].y; - for (var i = 0; i < combinedData.length; i++) { - key = combinedData[i].x; - if (intersections[key] === undefined) { - yMin = yMin > combinedData[i].y ? combinedData[i].y : yMin; - yMax = yMax < combinedData[i].y ? combinedData[i].y : yMax; - } else { - if (combinedData[i].y < 0) { - intersections[key].accumulatedNegative += combinedData[i].y; - } else { - intersections[key].accumulatedPositive += combinedData[i].y; - } - } - } - for (var xpos in intersections) { - if (intersections.hasOwnProperty(xpos)) { - yMin = yMin > intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMin; - yMin = yMin > intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMin; - yMax = yMax < intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMax; - yMax = yMax < intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMax; - } - } - - return { min: yMin, max: yMax }; - }; - - /** - * Fill the intersections object with counters of how many datapoints share the same x coordinates - * @param intersections - * @param combinedData - * @private - */ - Line._getDataIntersections = function (intersections, combinedData) { - // get intersections - var coreDistance; - for (var i = 0; i < combinedData.length; i++) { - if (i + 1 < combinedData.length) { - coreDistance = Math.abs(combinedData[i + 1].x - combinedData[i].x); - } - if (i > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].x - combinedData[i].x)); - } - if (coreDistance === 0) { - if (intersections[combinedData[i].x] === undefined) { - intersections[combinedData[i].x] = { amount: 0, resolved: 0, accumulatedPositive: 0, accumulatedNegative: 0 }; - } - intersections[combinedData[i].x].amount += 1; - } - } - }; - - /** - * draw a line graph - * - * @param dataset - * @param group - */ - Line.prototype.draw = function (dataset, group, framework) { - if (dataset != null) { - if (dataset.length > 0) { - var path, d; - var svgHeight = Number(framework.svg.style.height.replace('px', '')); - path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); - path.setAttributeNS(null, 'class', group.className); - if (group.style !== undefined) { - path.setAttributeNS(null, 'style', group.style); - } - - // construct path from dataset - if (group.options.interpolation.enabled == true) { - d = Line._catmullRom(dataset, group); - } else { - d = Line._linear(dataset); - } - - // append with points for fill and finalize the path - if (group.options.shaded.enabled == true) { - var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); - var dFill; - if (group.options.shaded.orientation == 'top') { - dFill = 'M' + dataset[0].x + ',' + 0 + ' ' + d + 'L' + dataset[dataset.length - 1].x + ',' + 0; - } else { - dFill = 'M' + dataset[0].x + ',' + svgHeight + ' ' + d + 'L' + dataset[dataset.length - 1].x + ',' + svgHeight; - } - fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill'); - if (group.options.shaded.style !== undefined) { - fillPath.setAttributeNS(null, 'style', group.options.shaded.style); - } - fillPath.setAttributeNS(null, 'd', dFill); - } - // copy properties to path for drawing. - path.setAttributeNS(null, 'd', 'M' + d); - - // draw points - if (group.options.drawPoints.enabled == true) { - Points.draw(dataset, group, framework); - } - } + GraphGroup.prototype.getLegend = function (iconWidth, iconHeight, framework, x, y) { + if (framework == undefined || framework == null) { + var svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + framework = { svg: svg, svgElements: {}, options: this.options, groups: [this] }; } - }; - - /** - * This uses an uniform parametrization of the interpolation algorithm: - * 'On the Parameterization of Catmull-Rom Curves' by Cem Yuksel et al. - * @param data - * @returns {string} - * @private - */ - Line._catmullRomUniform = function (data) { - // catmull rom - var p0, p1, p2, p3, bp1, bp2; - var d = Math.round(data[0].x) + ',' + Math.round(data[0].y) + ' '; - var normalization = 1 / 6; - var length = data.length; - for (var i = 0; i < length - 1; i++) { - - p0 = i == 0 ? data[0] : data[i - 1]; - p1 = data[i]; - p2 = data[i + 1]; - p3 = i + 2 < length ? data[i + 2] : p2; - - // Catmull-Rom to Cubic Bezier conversion matrix - // 0 1 0 0 - // -1/6 1 1/6 0 - // 0 1/6 1 -1/6 - // 0 0 1 0 - - // bp0 = { x: p1.x, y: p1.y }; - bp1 = { x: (-p0.x + 6 * p1.x + p2.x) * normalization, y: (-p0.y + 6 * p1.y + p2.y) * normalization }; - bp2 = { x: (p1.x + 6 * p2.x - p3.x) * normalization, y: (p1.y + 6 * p2.y - p3.y) * normalization }; - // bp0 = { x: p2.x, y: p2.y }; - - d += 'C' + bp1.x + ',' + bp1.y + ' ' + bp2.x + ',' + bp2.y + ' ' + p2.x + ',' + p2.y + ' '; + if (x == undefined || x == null) { + x = 0; } - - return d; - }; - - /** - * This uses either the chordal or centripetal parameterization of the catmull-rom algorithm. - * By default, the centripetal parameterization is used because this gives the nicest results. - * These parameterizations are relatively heavy because the distance between 4 points have to be calculated. - * - * One optimization can be used to reuse distances since this is a sliding window approach. - * @param data - * @param group - * @returns {string} - * @private - */ - Line._catmullRom = function (data, group) { - var alpha = group.options.interpolation.alpha; - if (alpha == 0 || alpha === undefined) { - return this._catmullRomUniform(data); - } else { - var p0, p1, p2, p3, bp1, bp2, d1, d2, d3, A, B, N, M; - var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA; - var d = Math.round(data[0].x) + ',' + Math.round(data[0].y) + ' '; - var length = data.length; - for (var i = 0; i < length - 1; i++) { - - p0 = i == 0 ? data[0] : data[i - 1]; - p1 = data[i]; - p2 = data[i + 1]; - p3 = i + 2 < length ? data[i + 2] : p2; - - d1 = Math.sqrt(Math.pow(p0.x - p1.x, 2) + Math.pow(p0.y - p1.y, 2)); - d2 = Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); - d3 = Math.sqrt(Math.pow(p2.x - p3.x, 2) + Math.pow(p2.y - p3.y, 2)); - - // Catmull-Rom to Cubic Bezier conversion matrix - - // A = 2d1^2a + 3d1^a * d2^a + d3^2a - // B = 2d3^2a + 3d3^a * d2^a + d2^2a - - // [ 0 1 0 0 ] - // [ -d2^2a /N A/N d1^2a /N 0 ] - // [ 0 d3^2a /M B/M -d2^2a /M ] - // [ 0 0 1 0 ] - - d3powA = Math.pow(d3, alpha); - d3pow2A = Math.pow(d3, 2 * alpha); - d2powA = Math.pow(d2, alpha); - d2pow2A = Math.pow(d2, 2 * alpha); - d1powA = Math.pow(d1, alpha); - d1pow2A = Math.pow(d1, 2 * alpha); - - A = 2 * d1pow2A + 3 * d1powA * d2powA + d2pow2A; - B = 2 * d3pow2A + 3 * d3powA * d2powA + d2pow2A; - N = 3 * d1powA * (d1powA + d2powA); - if (N > 0) { - N = 1 / N; - } - M = 3 * d3powA * (d3powA + d2powA); - if (M > 0) { - M = 1 / M; - } - - bp1 = { x: (-d2pow2A * p0.x + A * p1.x + d1pow2A * p2.x) * N, - y: (-d2pow2A * p0.y + A * p1.y + d1pow2A * p2.y) * N }; - - bp2 = { x: (d3pow2A * p1.x + B * p2.x - d2pow2A * p3.x) * M, - y: (d3pow2A * p1.y + B * p2.y - d2pow2A * p3.y) * M }; - - if (bp1.x == 0 && bp1.y == 0) { - bp1 = p1; - } - if (bp2.x == 0 && bp2.y == 0) { - bp2 = p2; - } - d += 'C' + bp1.x + ',' + bp1.y + ' ' + bp2.x + ',' + bp2.y + ' ' + p2.x + ',' + p2.y + ' '; - } - - return d; + if (y == undefined || y == null) { + y = 0.5 * iconHeight; } - }; - - /** - * this generates the SVG path for a linear drawing between datapoints. - * @param data - * @returns {string} - * @private - */ - Line._linear = function (data) { - // linear - var d = ''; - for (var i = 0; i < data.length; i++) { - if (i == 0) { - d += data[i].x + ',' + data[i].y; - } else { - d += ' ' + data[i].x + ',' + data[i].y; - } + switch (this.options.style) { + case "line": + Lines.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "points": //explicit no break + case "point": + Points.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "bar": + Bars.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; } - return d; + return { icon: framework.svg, label: this.content, orientation: this.options.yAxisOrientation }; }; - module.exports = Line; - -/***/ }, -/* 55 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var DOMutil = __webpack_require__(7); - - function Points(groupId, options) { - this.groupId = groupId; - this.options = options; - } - - Points.prototype.getYRange = function (groupData) { + GraphGroup.prototype.getYRange = function (groupData) { var yMin = groupData[0].y; var yMax = groupData[0].y; for (var j = 0; j < groupData.length; j++) { @@ -26049,96 +26516,51 @@ return /******/ (function(modules) { // webpackBootstrap return { min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation }; }; - Points.prototype.draw = function (dataset, group, framework, offset) { - Points.draw(dataset, group, framework, offset); - }; - - /** - * draw the data points - * - * @param {Array} dataset - * @param {Object} JSONcontainer - * @param {Object} svg | SVG DOM element - * @param {GraphGroup} group - * @param {Number} [offset] - */ - Points.draw = function (dataset, group, framework, offset) { - offset = offset || 0; - var callback = getCallback(); - - for (var i = 0; i < dataset.length; i++) { - if (!callback) { - // draw the point the simple way. - DOMutil.drawPoint(dataset[i].x + offset, dataset[i].y, getGroupTemplate(), framework.svgElements, framework.svg, dataset[i].label); - } else { - var callbackResult = callback(dataset[i], group, framework); // result might be true, false or an object - if (callbackResult === true || typeof callbackResult === 'object') { - DOMutil.drawPoint(dataset[i].x + offset, dataset[i].y, getGroupTemplate(callbackResult), framework.svgElements, framework.svg, dataset[i].label); - } - } - } - - function getGroupTemplate(callbackResult) { - callbackResult = typeof callbackResult === 'undefined' ? {} : callbackResult; - return { - style: callbackResult.style || group.options.drawPoints.style, - size: callbackResult.size || group.options.drawPoints.size, - className: callbackResult.className || group.className - }; - } - - function getCallback() { - var callback = undefined; - // check for the graph2d onRender - if (framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') { - callback = framework.options.drawPoints.onRender; - } - - // override it with the group onRender if defined - if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') { - callback = group.group.options.drawPoints.onRender; - } - - return callback; - } - }; - - module.exports = Points; + module.exports = GraphGroup; /***/ }, -/* 56 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var DOMutil = __webpack_require__(7); - var Points = __webpack_require__(55); + var Points = __webpack_require__(54); - function Bargraph(groupId, options) { - this.groupId = groupId; - this.options = options; - } + function Bargraph(groupId, options) {} - Bargraph.prototype.getYRange = function (groupData) { - var yMin = groupData[0].y; - var yMax = groupData[0].y; - for (var j = 0; j < groupData.length; j++) { - yMin = yMin > groupData[j].y ? groupData[j].y : yMin; - yMax = yMax < groupData[j].y ? groupData[j].y : yMax; - } - return { min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation }; - }; + Bargraph.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; - Bargraph.prototype.getData = function (groupData) { - var combinedData = []; - for (var j = 0; j < groupData.length; j++) { - combinedData.push({ - x: groupData[j].x, - y: groupData[j].y, - groupId: this.groupId - }); + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + var barWidth = Math.round(0.3 * iconWidth); + var originalWidth = group.options.barChart.width; + var scale = originalWidth / barWidth; + var bar1Height = Math.round(0.4 * iconHeight); + var bar2Height = Math.round(0.75 * iconHeight); + + var offset = Math.round((iconWidth - 2 * barWidth) / 3); + + DOMutil.drawBar(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, barWidth, bar1Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + DOMutil.drawBar(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: group.options.drawPoints.size / scale, + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, groupTemplate, framework.svgElements, framework.svg); + DOMutil.drawPoint(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, groupTemplate, framework.svgElements, framework.svg); } - return combinedData; }; /** @@ -26163,6 +26585,8 @@ return /******/ (function(modules) { // webpackBootstrap if (group.visible === true && (framework.options.groups.visibility[groupIds[i]] === undefined || framework.options.groups.visibility[groupIds[i]] === true)) { for (j = 0; j < processedGroupData[groupIds[i]].length; j++) { combinedData.push({ + screen_x: processedGroupData[groupIds[i]][j].screen_x, + screen_y: processedGroupData[groupIds[i]][j].screen_y, x: processedGroupData[groupIds[i]][j].x, y: processedGroupData[groupIds[i]][j].y, groupId: groupIds[i], @@ -26180,10 +26604,10 @@ return /******/ (function(modules) { // webpackBootstrap // sort by time and by group combinedData.sort(function (a, b) { - if (a.x === b.x) { + if (a.screen_x === b.screen_x) { return a.groupId < b.groupId ? -1 : 1; } else { - return a.x - b.x; + return a.screen_x - b.screen_x; } }); @@ -26193,54 +26617,45 @@ return /******/ (function(modules) { // webpackBootstrap // plot barchart for (i = 0; i < combinedData.length; i++) { group = framework.groups[combinedData[i].groupId]; - var minWidth = 0.1 * group.options.barChart.width; + var minWidth = group.options.barChart.minWidth != undefined ? group.options.barChart.minWidth : 0.1 * group.options.barChart.width; - key = combinedData[i].x; + key = combinedData[i].screen_x; var heightOffset = 0; if (intersections[key] === undefined) { if (i + 1 < combinedData.length) { - coreDistance = Math.abs(combinedData[i + 1].x - key); - } - if (i > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].x - key)); + coreDistance = Math.abs(combinedData[i + 1].screen_x - key); } drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); } else { var nextKey = i + (intersections[key].amount - intersections[key].resolved); var prevKey = i - (intersections[key].resolved + 1); if (nextKey < combinedData.length) { - coreDistance = Math.abs(combinedData[nextKey].x - key); - } - if (prevKey > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[prevKey].x - key)); + coreDistance = Math.abs(combinedData[nextKey].screen_x - key); } drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); intersections[key].resolved += 1; - if (group.options.stack === true) { - if (combinedData[i].y < group.zeroPosition) { + if (group.options.stack === true && group.options.excludeFromStacking !== true) { + if (combinedData[i].screen_y < group.zeroPosition) { heightOffset = intersections[key].accumulatedNegative; - intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].y; + intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].screen_y; } else { heightOffset = intersections[key].accumulatedPositive; - intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].y; + intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].screen_y; } } else if (group.options.barChart.sideBySide === true) { drawData.width = drawData.width / intersections[key].amount; drawData.offset += intersections[key].resolved * drawData.width - 0.5 * drawData.width * (intersections[key].amount + 1); - if (group.options.barChart.align === 'left') { - drawData.offset -= 0.5 * drawData.width; - } else if (group.options.barChart.align === 'right') { - drawData.offset += 0.5 * drawData.width; - } } } - DOMutil.drawBar(combinedData[i].x + drawData.offset, combinedData[i].y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + DOMutil.drawBar(combinedData[i].screen_x + drawData.offset, combinedData[i].screen_y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].screen_y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); // draw points if (group.options.drawPoints.enabled === true) { var pointData = { - x: combinedData[i].x + drawData.offset, - y: combinedData[i].y - heightOffset, + screen_x: combinedData[i].screen_x, + screen_y: combinedData[i].screen_y - heightOffset, + x: combinedData[i].x, + y: combinedData[i].y, groupId: combinedData[i].groupId, label: combinedData[i].label }; @@ -26261,16 +26676,21 @@ return /******/ (function(modules) { // webpackBootstrap var coreDistance; for (var i = 0; i < combinedData.length; i++) { if (i + 1 < combinedData.length) { - coreDistance = Math.abs(combinedData[i + 1].x - combinedData[i].x); + coreDistance = Math.abs(combinedData[i + 1].screen_x - combinedData[i].screen_x); } if (i > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].x - combinedData[i].x)); + coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].screen_x - combinedData[i].screen_x)); } if (coreDistance === 0) { - if (intersections[combinedData[i].x] === undefined) { - intersections[combinedData[i].x] = { amount: 0, resolved: 0, accumulatedPositive: 0, accumulatedNegative: 0 }; + if (intersections[combinedData[i].screen_x] === undefined) { + intersections[combinedData[i].screen_x] = { + amount: 0, + resolved: 0, + accumulatedPositive: 0, + accumulatedNegative: 0 + }; } - intersections[combinedData[i].x].amount += 1; + intersections[combinedData[i].screen_x].amount += 1; } } }; @@ -26313,10 +26733,10 @@ return /******/ (function(modules) { // webpackBootstrap if (combinedData.length > 0) { // sort by time and by group combinedData.sort(function (a, b) { - if (a.x === b.x) { + if (a.screen_x === b.screen_x) { return a.groupId < b.groupId ? -1 : 1; } else { - return a.x - b.x; + return a.screen_x - b.screen_x; } }); var intersections = {}; @@ -26330,18 +26750,18 @@ return /******/ (function(modules) { // webpackBootstrap Bargraph._getStackedYRange = function (intersections, combinedData) { var key; - var yMin = combinedData[0].y; - var yMax = combinedData[0].y; + var yMin = combinedData[0].screen_y; + var yMax = combinedData[0].screen_y; for (var i = 0; i < combinedData.length; i++) { - key = combinedData[i].x; + key = combinedData[i].screen_x; if (intersections[key] === undefined) { - yMin = yMin > combinedData[i].y ? combinedData[i].y : yMin; - yMax = yMax < combinedData[i].y ? combinedData[i].y : yMax; + yMin = yMin > combinedData[i].screen_y ? combinedData[i].screen_y : yMin; + yMax = yMax < combinedData[i].screen_y ? combinedData[i].screen_y : yMax; } else { - if (combinedData[i].y < 0) { - intersections[key].accumulatedNegative += combinedData[i].y; + if (combinedData[i].screen_y < 0) { + intersections[key].accumulatedNegative += combinedData[i].screen_y; } else { - intersections[key].accumulatedPositive += combinedData[i].y; + intersections[key].accumulatedPositive += combinedData[i].screen_y; } } } @@ -26360,14 +26780,380 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Bargraph; /***/ }, -/* 57 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var DOMutil = __webpack_require__(7); + + function Points(groupId, options) {} + + /** + * draw the data points + * + * @param {Array} dataset + * @param {Object} JSONcontainer + * @param {Object} svg | SVG DOM element + * @param {GraphGroup} group + * @param {Number} [offset] + */ + Points.draw = function (dataset, group, framework, offset) { + offset = offset || 0; + var callback = getCallback(framework, group); + + for (var i = 0; i < dataset.length; i++) { + if (!callback) { + // draw the point the simple way. + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group), framework.svgElements, framework.svg, dataset[i].label); + } else { + var callbackResult = callback(dataset[i], group); // result might be true, false or an object + if (callbackResult === true || typeof callbackResult === 'object') { + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label); + } + } + } + }; + + Points.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; + + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + //Don't call callback on icon + DOMutil.drawPoint(x + 0.5 * iconWidth, y, getGroupTemplate(group), framework.svgElements, framework.svg); + }; + + function getGroupTemplate(group, callbackResult) { + callbackResult = typeof callbackResult === 'undefined' ? {} : callbackResult; + return { + style: callbackResult.style || group.options.drawPoints.style, + styles: callbackResult.styles || group.options.drawPoints.styles, + size: callbackResult.size || group.options.drawPoints.size, + className: callbackResult.className || group.className + }; + } + + function getCallback(framework, group) { + var callback = undefined; + // check for the graph2d onRender + if (framework.options && framework.options.drawPoints && framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') { + callback = framework.options.drawPoints.onRender; + } + + // override it with the group onRender if defined + if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') { + callback = group.group.options.drawPoints.onRender; + } + return callback; + } + + module.exports = Points; + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var DOMutil = __webpack_require__(7); + + function Line(groupId, options) {} + + Line.calcPath = function (dataset, group) { + if (dataset != null) { + if (dataset.length > 0) { + var d = []; + + // construct path from dataset + if (group.options.interpolation.enabled == true) { + d = Line._catmullRom(dataset, group); + } else { + d = Line._linear(dataset); + } + return d; + } + } + }; + + Line.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; + + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + path = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); + } + + path.setAttributeNS(null, "d", "M" + x + "," + y + " L" + (x + iconWidth) + "," + y + ""); + if (group.options.shaded.enabled == true) { + fillPath = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + if (group.options.shaded.orientation == 'top') { + fillPath.setAttributeNS(null, "d", "M" + x + ", " + (y - fillHeight) + "L" + x + "," + y + " L" + (x + iconWidth) + "," + y + " L" + (x + iconWidth) + "," + (y - fillHeight)); + } else { + fillPath.setAttributeNS(null, "d", "M" + x + "," + y + " " + "L" + x + "," + (y + fillHeight) + " " + "L" + (x + iconWidth) + "," + (y + fillHeight) + "L" + (x + iconWidth) + "," + y); + } + fillPath.setAttributeNS(null, "class", group.className + " vis-icon-fill"); + if (group.options.shaded.style !== undefined && group.options.shaded.style !== "") { + fillPath.setAttributeNS(null, "style", group.options.shaded.style); + } + } + + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: group.options.drawPoints.size, + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, framework.svgElements, framework.svg); + } + }; + + Line.drawShading = function (pathArray, group, subPathArray, framework) { + // append shading to the path + if (group.options.shaded.enabled == true) { + var svgHeight = Number(framework.svg.style.height.replace('px', '')); + var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + var type = "L"; + if (group.options.interpolation.enabled == true) { + type = "C"; + } + var dFill; + var zero = 0; + if (group.options.shaded.orientation == 'top') { + zero = 0; + } else if (group.options.shaded.orientation == 'bottom') { + zero = svgHeight; + } else { + zero = Math.min(Math.max(0, group.zeroPosition), svgHeight); + } + if (group.options.shaded.orientation == 'group' && subPathArray != null && subPathArray != undefined) { + dFill = 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false) + ' L' + subPathArray[subPathArray.length - 1][0] + "," + subPathArray[subPathArray.length - 1][1] + " " + this.serializePath(subPathArray, type, true) + subPathArray[0][0] + "," + subPathArray[0][1] + " Z"; + } else { + dFill = 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false) + ' V' + zero + ' H' + pathArray[0][0] + " Z"; + } + + fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill'); + if (group.options.shaded.style !== undefined) { + fillPath.setAttributeNS(null, 'style', group.options.shaded.style); + } + fillPath.setAttributeNS(null, 'd', dFill); + } + }; + + /** + * draw a line graph + * + * @param dataset + * @param group + */ + Line.draw = function (pathArray, group, framework) { + if (pathArray != null && pathArray != undefined) { + var path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); + } + + var type = "L"; + if (group.options.interpolation.enabled == true) { + type = "C"; + } + // copy properties to path for drawing. + path.setAttributeNS(null, 'd', 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false)); + } + }; + + Line.serializePath = function (pathArray, type, inverse) { + if (pathArray.length < 2) { + //Too little data to create a path. + return ""; + } + var d = type; + if (inverse) { + for (var i = pathArray.length - 2; i > 0; i--) { + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } else { + for (var i = 1; i < pathArray.length; i++) { + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } + return d; + }; + + /** + * This uses an uniform parametrization of the interpolation algorithm: + * 'On the Parameterization of Catmull-Rom Curves' by Cem Yuksel et al. + * @param data + * @returns {string} + * @private + */ + Line._catmullRomUniform = function (data) { + // catmull rom + var p0, p1, p2, p3, bp1, bp2; + var d = []; + d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]); + var normalization = 1 / 6; + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = i == 0 ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = i + 2 < length ? data[i + 2] : p2; + + // Catmull-Rom to Cubic Bezier conversion matrix + // 0 1 0 0 + // -1/6 1 1/6 0 + // 0 1/6 1 -1/6 + // 0 0 1 0 + + // bp0 = { x: p1.x, y: p1.y }; + bp1 = { + screen_x: (-p0.screen_x + 6 * p1.screen_x + p2.screen_x) * normalization, + screen_y: (-p0.screen_y + 6 * p1.screen_y + p2.screen_y) * normalization + }; + bp2 = { + screen_x: (p1.screen_x + 6 * p2.screen_x - p3.screen_x) * normalization, + screen_y: (p1.screen_y + 6 * p2.screen_y - p3.screen_y) * normalization + }; + // bp0 = { x: p2.x, y: p2.y }; + + d.push([bp1.screen_x, bp1.screen_y]); + d.push([bp2.screen_x, bp2.screen_y]); + d.push([p2.screen_x, p2.screen_y]); + } + + return d; + }; + + /** + * This uses either the chordal or centripetal parameterization of the catmull-rom algorithm. + * By default, the centripetal parameterization is used because this gives the nicest results. + * These parameterizations are relatively heavy because the distance between 4 points have to be calculated. + * + * One optimization can be used to reuse distances since this is a sliding window approach. + * @param data + * @param group + * @returns {string} + * @private + */ + Line._catmullRom = function (data, group) { + var alpha = group.options.interpolation.alpha; + if (alpha == 0 || alpha === undefined) { + return this._catmullRomUniform(data); + } else { + var p0, p1, p2, p3, bp1, bp2, d1, d2, d3, A, B, N, M; + var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA; + var d = []; + d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]); + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = i == 0 ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = i + 2 < length ? data[i + 2] : p2; + + d1 = Math.sqrt(Math.pow(p0.screen_x - p1.screen_x, 2) + Math.pow(p0.screen_y - p1.screen_y, 2)); + d2 = Math.sqrt(Math.pow(p1.screen_x - p2.screen_x, 2) + Math.pow(p1.screen_y - p2.screen_y, 2)); + d3 = Math.sqrt(Math.pow(p2.screen_x - p3.screen_x, 2) + Math.pow(p2.screen_y - p3.screen_y, 2)); + + // Catmull-Rom to Cubic Bezier conversion matrix + + // A = 2d1^2a + 3d1^a * d2^a + d3^2a + // B = 2d3^2a + 3d3^a * d2^a + d2^2a + + // [ 0 1 0 0 ] + // [ -d2^2a /N A/N d1^2a /N 0 ] + // [ 0 d3^2a /M B/M -d2^2a /M ] + // [ 0 0 1 0 ] + + d3powA = Math.pow(d3, alpha); + d3pow2A = Math.pow(d3, 2 * alpha); + d2powA = Math.pow(d2, alpha); + d2pow2A = Math.pow(d2, 2 * alpha); + d1powA = Math.pow(d1, alpha); + d1pow2A = Math.pow(d1, 2 * alpha); + + A = 2 * d1pow2A + 3 * d1powA * d2powA + d2pow2A; + B = 2 * d3pow2A + 3 * d3powA * d2powA + d2pow2A; + N = 3 * d1powA * (d1powA + d2powA); + if (N > 0) { + N = 1 / N; + } + M = 3 * d3powA * (d3powA + d2powA); + if (M > 0) { + M = 1 / M; + } + + bp1 = { + screen_x: (-d2pow2A * p0.screen_x + A * p1.screen_x + d1pow2A * p2.screen_x) * N, + screen_y: (-d2pow2A * p0.screen_y + A * p1.screen_y + d1pow2A * p2.screen_y) * N + }; + + bp2 = { + screen_x: (d3pow2A * p1.screen_x + B * p2.screen_x - d2pow2A * p3.screen_x) * M, + screen_y: (d3pow2A * p1.screen_y + B * p2.screen_y - d2pow2A * p3.screen_y) * M + }; + + if (bp1.screen_x == 0 && bp1.screen_y == 0) { + bp1 = p1; + } + if (bp2.screen_x == 0 && bp2.screen_y == 0) { + bp2 = p2; + } + d.push([bp1.screen_x, bp1.screen_y]); + d.push([bp2.screen_x, bp2.screen_y]); + d.push([p2.screen_x, p2.screen_y]); + } + + return d; + } + }; + + /** + * this generates the SVG path for a linear drawing between datapoints. + * @param data + * @returns {string} + * @private + */ + Line._linear = function (data) { + // linear + var d = []; + for (var i = 0; i < data.length; i++) { + d.push([data[i].screen_x, data[i].screen_y]); + } + return d; + }; + + module.exports = Line; + +/***/ }, +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); var DOMutil = __webpack_require__(7); - var Component = __webpack_require__(26); + var Component = __webpack_require__(25); /** * Legend for Graph2d @@ -26375,7 +27161,7 @@ return /******/ (function(modules) { // webpackBootstrap function Legend(body, options, side, linegraphOptions) { this.body = body; this.defaultOptions = { - enabled: true, + enabled: false, icons: true, iconSize: 20, iconSpacing: 6, @@ -26385,9 +27171,10 @@ return /******/ (function(modules) { // webpackBootstrap }, right: { visible: true, - position: 'top-left' // top/bottom - left,center,right + position: 'top-right' // top/bottom - left,center,right } }; + this.side = side; this.options = util.extend({}, this.defaultOptions); this.linegraphOptions = linegraphOptions; @@ -26397,6 +27184,7 @@ return /******/ (function(modules) { // webpackBootstrap this.groups = {}; this.amountOfGroups = 0; this._create(); + this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; this.setOptions(options); } @@ -26433,16 +27221,16 @@ return /******/ (function(modules) { // webpackBootstrap Legend.prototype._create = function () { this.dom.frame = document.createElement('div'); this.dom.frame.className = 'vis-legend'; - this.dom.frame.style.position = 'absolute'; - this.dom.frame.style.top = '10px'; - this.dom.frame.style.display = 'block'; + this.dom.frame.style.position = "absolute"; + this.dom.frame.style.top = "10px"; + this.dom.frame.style.display = "block"; this.dom.textArea = document.createElement('div'); this.dom.textArea.className = 'vis-legend-text'; - this.dom.textArea.style.position = 'relative'; - this.dom.textArea.style.top = '0px'; + this.dom.textArea.style.position = "relative"; + this.dom.textArea.style.top = "0px"; - this.svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); this.svg.style.position = 'absolute'; this.svg.style.top = 0 + 'px'; this.svg.style.width = this.options.iconSize + 5 + 'px'; @@ -26498,16 +27286,16 @@ return /******/ (function(modules) { // webpackBootstrap this.show(); if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'bottom-left') { this.dom.frame.style.left = '4px'; - this.dom.frame.style.textAlign = 'left'; - this.dom.textArea.style.textAlign = 'left'; + this.dom.frame.style.textAlign = "left"; + this.dom.textArea.style.textAlign = "left"; this.dom.textArea.style.left = this.options.iconSize + 15 + 'px'; this.dom.textArea.style.right = ''; this.svg.style.left = 0 + 'px'; this.svg.style.right = ''; } else { this.dom.frame.style.right = '4px'; - this.dom.frame.style.textAlign = 'right'; - this.dom.textArea.style.textAlign = 'right'; + this.dom.frame.style.textAlign = "right"; + this.dom.textArea.style.textAlign = "right"; this.dom.textArea.style.right = this.options.iconSize + 15 + 'px'; this.dom.textArea.style.left = ''; this.svg.style.right = 0 + 'px'; @@ -26515,11 +27303,11 @@ return /******/ (function(modules) { // webpackBootstrap } if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'top-right') { - this.dom.frame.style.top = 4 - Number(this.body.dom.center.style.top.replace('px', '')) + 'px'; + this.dom.frame.style.top = 4 - Number(this.body.dom.center.style.top.replace("px", "")) + 'px'; this.dom.frame.style.bottom = ''; } else { var scrollableHeight = this.body.domProps.center.height - this.body.domProps.centerContainer.height; - this.dom.frame.style.bottom = 4 + scrollableHeight + Number(this.body.dom.center.style.top.replace('px', '')) + 'px'; + this.dom.frame.style.bottom = 4 + scrollableHeight + Number(this.body.dom.center.style.top.replace("px", "")) + 'px'; this.dom.frame.style.top = ''; } @@ -26552,7 +27340,9 @@ return /******/ (function(modules) { // webpackBootstrap return a < b ? -1 : 1; }); - DOMutil.prepareElements(this.svgElements); + // this resets the elements so the order is maintained + DOMutil.resetElements(this.svgElements); + var padding = window.getComputedStyle(this.dom.frame).paddingTop; var iconOffset = Number(padding.replace('px', '')); var x = iconOffset; @@ -26565,19 +27355,17 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0; i < groupArray.length; i++) { var groupId = groupArray[i]; if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) { - this.groups[groupId].drawIcon(x, y, this.svgElements, this.svg, iconWidth, iconHeight); + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); y += iconHeight + this.options.iconSpacing; } } - - DOMutil.cleanupElements(this.svgElements); } }; module.exports = Legend; /***/ }, -/* 58 */ +/* 57 */ /***/ function(module, exports) { /** @@ -26619,12 +27407,14 @@ return /******/ (function(modules) { // webpackBootstrap graphHeight: { string: string, number: number }, shaded: { enabled: { boolean: boolean }, - orientation: { string: ['bottom', 'top'] }, // top, bottom + orientation: { string: ['bottom', 'top', 'zero', 'group'] }, // top, bottom, zero, group + groupId: { object: object }, __type__: { boolean: boolean, object: object } }, style: { string: ['line', 'bar', 'points'] }, // line, bar barChart: { width: { number: number }, + minWidth: { number: number }, sideBySide: { boolean: boolean }, align: { string: ['left', 'center', 'right'] }, __type__: { object: object } @@ -26714,7 +27504,12 @@ return /******/ (function(modules) { // webpackBootstrap }, moment: { 'function': 'function' }, height: { string: string, number: number }, - hiddenDates: { object: object, array: array }, + hiddenDates: { + start: { date: date, number: number, string: string, moment: moment }, + end: { date: date, number: number, string: string, moment: moment }, + repeat: { string: string }, + __type__: { object: object, array: array } + }, locale: { string: string }, locales: { __any__: { any: any }, @@ -26722,6 +27517,7 @@ return /******/ (function(modules) { // webpackBootstrap }, max: { date: date, number: number, string: string, moment: moment }, maxHeight: { number: number, string: string }, + maxMinorChars: { number: number }, min: { date: date, number: number, string: string, moment: moment }, minHeight: { number: number, string: string }, moveable: { boolean: boolean }, @@ -26741,6 +27537,7 @@ return /******/ (function(modules) { // webpackBootstrap zoomKey: { string: ['ctrlKey', 'altKey', 'metaKey', ''] }, zoomMax: { number: number }, zoomMin: { number: number }, + zIndex: { number: number }, __type__: { object: object } }; @@ -26752,11 +27549,12 @@ return /******/ (function(modules) { // webpackBootstrap stack: false, shaded: { enabled: false, - orientation: ['top', 'bottom'] // top, bottom + orientation: ['zero', 'top', 'bottom', 'group'] // zero, top, bottom }, style: ['line', 'bar', 'points'], // line, bar barChart: { width: [50, 5, 100, 5], + minWidth: [50, 5, 100, 5], sideBySide: false, align: ['left', 'center', 'right'] // left, center, right }, @@ -26801,7 +27599,7 @@ return /******/ (function(modules) { // webpackBootstrap }, autoResize: true, - throttleRedraw: 0, + throttleRedraw: [10, 0, 1000, 10], clickToUse: false, end: '', format: { @@ -26831,6 +27629,7 @@ return /******/ (function(modules) { // webpackBootstrap locale: '', max: '', maxHeight: '', + maxMinorChars: [7, 0, 20, 1], min: '', minHeight: '', moveable: true, @@ -26843,7 +27642,8 @@ return /******/ (function(modules) { // webpackBootstrap zoomable: true, zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''], zoomMax: [315360000000000, 10, 315360000000000, 1], - zoomMin: [10, 10, 315360000000000, 1] + zoomMin: [10, 10, 315360000000000, 1], + zIndex: 0 } }; @@ -26851,7 +27651,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 59 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { // Load custom shapes into CanvasRenderingContext2D @@ -26859,23 +27659,23 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _modulesGroups = __webpack_require__(60); + var _modulesGroups = __webpack_require__(59); var _modulesGroups2 = _interopRequireDefault(_modulesGroups); - var _modulesNodesHandler = __webpack_require__(61); + var _modulesNodesHandler = __webpack_require__(60); var _modulesNodesHandler2 = _interopRequireDefault(_modulesNodesHandler); - var _modulesEdgesHandler = __webpack_require__(81); + var _modulesEdgesHandler = __webpack_require__(80); var _modulesEdgesHandler2 = _interopRequireDefault(_modulesEdgesHandler); - var _modulesPhysicsEngine = __webpack_require__(90); + var _modulesPhysicsEngine = __webpack_require__(89); var _modulesPhysicsEngine2 = _interopRequireDefault(_modulesPhysicsEngine); - var _modulesClustering = __webpack_require__(99); + var _modulesClustering = __webpack_require__(98); var _modulesClustering2 = _interopRequireDefault(_modulesClustering); @@ -26907,11 +27707,11 @@ return /******/ (function(modules) { // webpackBootstrap var _modulesManipulationSystem2 = _interopRequireDefault(_modulesManipulationSystem); - var _sharedConfigurator = __webpack_require__(45); + var _sharedConfigurator = __webpack_require__(44); var _sharedConfigurator2 = _interopRequireDefault(_sharedConfigurator); - var _sharedValidator = __webpack_require__(47); + var _sharedValidator = __webpack_require__(46); var _sharedValidator2 = _interopRequireDefault(_sharedValidator); @@ -26921,6 +27721,17 @@ return /******/ (function(modules) { // webpackBootstrap var _modulesKamadaKawaiJs2 = _interopRequireDefault(_modulesKamadaKawaiJs); + /** + * @constructor Network + * Create a network visualization, displaying nodes and edges. + * + * @param {Element} container The DOM element in which the Network will + * be created. Normally a div element. + * @param {Object} data An object containing parameters + * {Array} nodes + * {Array} edges + * @param {Object} options Options + */ __webpack_require__(113); var Emitter = __webpack_require__(12); @@ -26931,20 +27742,9 @@ return /******/ (function(modules) { // webpackBootstrap var dotparser = __webpack_require__(114); var gephiParser = __webpack_require__(115); var Images = __webpack_require__(116); - var Activator = __webpack_require__(40); + var Activator = __webpack_require__(39); var locales = __webpack_require__(117); - /** - * @constructor Network - * Create a network visualization, displaying nodes and edges. - * - * @param {Element} container The DOM element in which the Network will - * be created. Normally a div element. - * @param {Object} data An object containing parameters - * {Array} nodes - * {Array} edges - * @param {Object} options Options - */ function Network(container, data, options) { var _this = this; @@ -27009,7 +27809,7 @@ return /******/ (function(modules) { // webpackBootstrap // setting up all modules this.images = new Images(function () { - return _this.body.emitter.emit('_requestRedraw'); + return _this.body.emitter.emit("_requestRedraw"); }); // object with images this.groups = new _modulesGroups2['default'](); // object with groups this.canvas = new _modulesCanvas2['default'](this.body); // DOM handler @@ -27025,8 +27825,8 @@ return /******/ (function(modules) { // webpackBootstrap 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 - this.body.modules['kamadaKawai'] = new _modulesKamadaKawaiJs2['default'](this.body, 150, 0.05); // Layouting algorithm. - this.body.modules['clustering'] = this.clustering; + this.body.modules["kamadaKawai"] = new _modulesKamadaKawaiJs2['default'](this.body, 150, 0.05); // Layouting algorithm. + this.body.modules["clustering"] = this.clustering; // create the DOM elements this.canvas._create(); @@ -27049,7 +27849,6 @@ return /******/ (function(modules) { // webpackBootstrap var _this2 = this; if (options !== undefined) { - var errorFound = _sharedValidator2['default'].validate(options, _optionsJs.allOptions); if (errorFound === true) { console.log('%cErrors have been found in the supplied options object.', _sharedValidator.printStyle); @@ -27077,7 +27876,7 @@ return /******/ (function(modules) { // webpackBootstrap // reload the settings of the nodes to apply changes in groups that are not referenced by pointer. if (options.groups !== undefined) { - this.body.emitter.emit('refreshNodes'); + this.body.emitter.emit("refreshNodes"); } // these two do not have options at the moment, here for completeness //this.view.setOptions(options.view); @@ -27118,7 +27917,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this.activator === undefined) { this.activator = new Activator(this.canvas.frame); this.activator.on('change', function () { - _this2.body.emitter.emit('activate'); + _this2.body.emitter.emit("activate"); }); } } else { @@ -27126,15 +27925,15 @@ return /******/ (function(modules) { // webpackBootstrap this.activator.destroy(); delete this.activator; } - this.body.emitter.emit('activate'); + this.body.emitter.emit("activate"); } } else { - this.body.emitter.emit('activate'); + this.body.emitter.emit("activate"); } this.canvas.setSize(); // start the physics simulation. Can be safely called multiple times. - this.body.emitter.emit('startSimulation'); + this.body.emitter.emit("startSimulation"); } }; @@ -27151,7 +27950,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { if (nodes[nodeId].options.hidden === false) { - this.body.nodeIndices.push(nodeId); + this.body.nodeIndices.push(nodes[nodeId].id); } } } @@ -27159,7 +27958,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { if (edges[edgeId].options.hidden === false) { - this.body.edgeIndices.push(edgeId); + this.body.edgeIndices.push(edges[edgeId].id); } } } @@ -27172,23 +27971,22 @@ return /******/ (function(modules) { // webpackBootstrap var _this3 = this; // this event will trigger a rebuilding of the cache everything. Used when nodes or edges have been added or removed. - this.body.emitter.on('_dataChanged', function () { + this.body.emitter.on("_dataChanged", function () { // update shortcut lists _this3._updateVisibleIndices(); - _this3.physics.updatePhysicsData(); - _this3.body.emitter.emit('_requestRedraw'); + _this3.body.emitter.emit("_requestRedraw"); // call the dataUpdated event because the only difference between the two is the updating of the indices - _this3.body.emitter.emit('_dataUpdated'); + _this3.body.emitter.emit("_dataUpdated"); }); // this is called when options of EXISTING nodes or edges have changed. - this.body.emitter.on('_dataUpdated', function () { + this.body.emitter.on("_dataUpdated", function () { // update values _this3._updateValueRange(_this3.body.nodes); _this3._updateValueRange(_this3.body.edges); // start simulation (can be called safely, even if already running) - _this3.body.emitter.emit('startSimulation'); - _this3.body.emitter.emit('_requestRedraw'); + _this3.body.emitter.emit("startSimulation"); + _this3.body.emitter.emit("_requestRedraw"); }); }; @@ -27204,8 +28002,8 @@ return /******/ (function(modules) { // webpackBootstrap */ Network.prototype.setData = function (data) { // reset the physics engine. - this.body.emitter.emit('resetPhysics'); - this.body.emitter.emit('_resetData'); + this.body.emitter.emit("resetPhysics"); + this.body.emitter.emit("_resetData"); // unselect all to ensure no selections from old data are carried over. this.selectionHandler.unselectAll(); @@ -27235,13 +28033,13 @@ return /******/ (function(modules) { // webpackBootstrap } // emit change in data - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); // emit data loaded - this.body.emitter.emit('_dataLoaded'); + this.body.emitter.emit("_dataLoaded"); // find a stable position or start animating to a stable position - this.body.emitter.emit('initPhysics'); + this.body.emitter.emit("initPhysics"); }; /** @@ -27251,7 +28049,7 @@ return /******/ (function(modules) { // webpackBootstrap * network = null; */ Network.prototype.destroy = function () { - this.body.emitter.emit('destroy'); + this.body.emitter.emit("destroy"); // clear events this.body.emitter.off(); this.off(); @@ -27376,7 +28174,7 @@ return /******/ (function(modules) { // webpackBootstrap return this.manipulation.editNode.apply(this.manipulation, arguments); }; Network.prototype.editNodeMode = function () { - console.log('Deprecated: Please use editNode instead of editNodeMode.');return this.manipulation.editNode.apply(this.manipulation, arguments); + console.log("Deprecated: Please use editNode instead of editNodeMode.");return this.manipulation.editNode.apply(this.manipulation, arguments); }; Network.prototype.addEdgeMode = function () { return this.manipulation.addEdgeMode.apply(this.manipulation, arguments); @@ -27421,6 +28219,9 @@ return /******/ (function(modules) { // webpackBootstrap Network.prototype.getSelection = function () { return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments); }; + Network.prototype.setSelection = function () { + return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments); + }; Network.prototype.getSelectedNodes = function () { return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments); }; @@ -27448,7 +28249,8 @@ return /******/ (function(modules) { // webpackBootstrap return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments); }; Network.prototype.unselectAll = function () { - return this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments); + this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments); + this.redraw(); }; Network.prototype.redraw = function () { return this.renderer.redraw.apply(this.renderer, arguments); @@ -27482,7 +28284,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Network; /***/ }, -/* 60 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -27546,7 +28348,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(Groups, [{ key: "setOptions", value: function setOptions(options) { - var optionFields = ["useDefaultGroups"]; + var optionFields = ['useDefaultGroups']; if (options !== undefined) { for (var groupName in options) { @@ -27559,18 +28361,16 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "clear", /** * Clear all groups */ + }, { + key: "clear", value: function clear() { this.groups = {}; this.groupsArray = []; } - }, { - key: "get", /** * get group options of a groupname. If groupname is not found, a new group @@ -27578,6 +28378,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {*} groupname Can be a number, string, Date, etc. * @return {Object} group The created group, containing all group options */ + }, { + key: "get", value: function get(groupname) { var group = this.groups[groupname]; if (group === undefined) { @@ -27600,8 +28402,6 @@ return /******/ (function(modules) { // webpackBootstrap return group; } - }, { - key: "add", /** * Add a custom group style @@ -27610,6 +28410,8 @@ return /******/ (function(modules) { // webpackBootstrap * backgroundColor, etc. * @return {Object} group The created group object */ + }, { + key: "add", value: function add(groupName, style) { this.groups[groupName] = style; this.groupsArray.push(groupName); @@ -27624,7 +28426,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 61 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -27639,11 +28441,11 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _componentsNode = __webpack_require__(62); + var _componentsNode = __webpack_require__(61); var _componentsNode2 = _interopRequireDefault(_componentsNode); - var _componentsSharedLabel = __webpack_require__(63); + var _componentsSharedLabel = __webpack_require__(62); var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); @@ -27742,6 +28544,7 @@ return /******/ (function(modules) { // webpackBootstrap }, shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: 10, x: 5, y: 5 @@ -27750,7 +28553,9 @@ return /******/ (function(modules) { // webpackBootstrap shapeProperties: { borderDashes: false, // only for borders borderRadius: 6, // only for box shape - useImageSize: false // only for image and circularImage shapes + interpolation: true, // only for image and circularImage shapes + useImageSize: false, // only for image and circularImage shapes + useBorderWithImage: false // only for image shape }, size: 25, title: undefined, @@ -27772,6 +28577,9 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.on('refreshNodes', this.refresh.bind(this)); this.body.emitter.on('refresh', this.refresh.bind(this)); this.body.emitter.on('destroy', function () { + util.forEach(_this2.nodesListeners, function (callback, event) { + if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback); + }); delete _this2.body.functions.createNode; delete _this2.nodesListeners.add; delete _this2.nodesListeners.update; @@ -27820,14 +28628,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'setData', /** * Set a data set with nodes for the network * @param {Array | DataSet | DataView} nodes The data containing the nodes. * @private */ + }, { + key: 'setData', value: function setData(nodes) { var _this3 = this; @@ -27871,17 +28679,17 @@ return /******/ (function(modules) { // webpackBootstrap } if (doNotEmit === false) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } } - }, { - key: 'add', /** * Add nodes * @param {Number[] | String[]} ids * @private */ + }, { + key: 'add', value: function add(ids) { var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; @@ -27898,17 +28706,17 @@ return /******/ (function(modules) { // webpackBootstrap this.layoutEngine.positionInitially(newNodes); if (doNotEmit === false) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } } - }, { - key: 'update', /** * Update existing nodes, or create them when not yet existing * @param {Number[] | String[]} ids * @private */ + }, { + key: 'update', value: function update(ids, changedData) { var nodes = this.body.nodes; var dataChanged = false; @@ -27927,19 +28735,19 @@ return /******/ (function(modules) { // webpackBootstrap } } if (dataChanged === true) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } else { - this.body.emitter.emit('_dataUpdated'); + this.body.emitter.emit("_dataUpdated"); } } - }, { - key: 'remove', /** * Remove existing nodes. If nodes do not exist, the method will just ignore it. * @param {Number[] | String[]} ids * @private */ + }, { + key: 'remove', value: function remove(ids) { var nodes = this.body.nodes; @@ -27948,16 +28756,16 @@ return /******/ (function(modules) { // webpackBootstrap delete nodes[id]; } - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } - }, { - key: 'create', /** * create a node * @param properties * @param constructorClass */ + }, { + key: 'create', value: function create(properties) { var constructorClass = arguments.length <= 1 || arguments[1] === undefined ? _componentsNode2['default'] : arguments[1]; @@ -27984,14 +28792,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'getPositions', /** * Returns the positions of the nodes. * @param ids --> optional, can be array of nodeIds, can be string * @returns {{}} */ + }, { + key: 'getPositions', value: function getPositions(ids) { var dataArray = {}; if (ids !== undefined) { @@ -28016,12 +28824,12 @@ return /******/ (function(modules) { // webpackBootstrap } return dataArray; } - }, { - key: 'storePositions', /** * Load the XY positions of the nodes into the dataset. */ + }, { + key: 'storePositions', value: function storePositions() { // todo: add support for clusters and hierarchical. var dataArray = []; @@ -28031,33 +28839,33 @@ return /******/ (function(modules) { // webpackBootstrap if (dataset._data.hasOwnProperty(nodeId)) { var node = this.body.nodes[nodeId]; if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) { - dataArray.push({ id: nodeId, x: Math.round(node.x), y: Math.round(node.y) }); + dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) }); } } } dataset.update(dataArray); } - }, { - key: 'getBoundingBox', /** * get the bounding box of a node. * @param nodeId * @returns {j|*} */ + }, { + key: 'getBoundingBox', value: function getBoundingBox(nodeId) { if (this.body.nodes[nodeId] !== undefined) { return this.body.nodes[nodeId].shape.boundingBox; } } - }, { - key: 'getConnectedNodes', /** * Get the Ids of nodes connected to this node. * @param nodeId * @returns {Array} */ + }, { + key: 'getConnectedNodes', value: function getConnectedNodes(nodeId) { var nodeList = []; if (this.body.nodes[nodeId] !== undefined) { @@ -28065,13 +28873,13 @@ return /******/ (function(modules) { // webpackBootstrap var nodeObj = {}; // used to quickly check if node already exists for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; - if (edge.toId == nodeId) { + if (edge.toId == node.id) { // these are double equals since ids can be numeric or string if (nodeObj[edge.fromId] === undefined) { nodeList.push(edge.fromId); nodeObj[edge.fromId] = true; } - } else if (edge.fromId == nodeId) { + } else if (edge.fromId == node.id) { // these are double equals since ids can be numeric or string if (nodeObj[edge.toId] === undefined) { nodeList.push(edge.toId); @@ -28082,14 +28890,14 @@ return /******/ (function(modules) { // webpackBootstrap } return nodeList; } - }, { - key: 'getConnectedEdges', /** * Get the ids of the edges connected to this node. * @param nodeId * @returns {*} */ + }, { + key: 'getConnectedEdges', value: function getConnectedEdges(nodeId) { var edgeList = []; if (this.body.nodes[nodeId] !== undefined) { @@ -28098,12 +28906,10 @@ return /******/ (function(modules) { // webpackBootstrap edgeList.push(node.edges[i].id); } } else { - console.log('NodeId provided for getConnectedEdges does not exist. Provided: ', nodeId); + console.log("NodeId provided for getConnectedEdges does not exist. Provided: ", nodeId); } return edgeList; } - }, { - key: 'moveNode', /** * Move a node. @@ -28111,6 +28917,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param Number x * @param Number y */ + }, { + key: 'moveNode', value: function moveNode(nodeId, x, y) { var _this4 = this; @@ -28118,10 +28926,10 @@ return /******/ (function(modules) { // webpackBootstrap this.body.nodes[nodeId].x = Number(x); this.body.nodes[nodeId].y = Number(y); setTimeout(function () { - _this4.body.emitter.emit('startSimulation'); + _this4.body.emitter.emit("startSimulation"); }, 0); } else { - console.log('Node id supplied to moveNode does not exist. Provided: ', nodeId); + console.log("Node id supplied to moveNode does not exist. Provided: ", nodeId); } } }]); @@ -28133,7 +28941,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 62 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -28148,67 +28956,67 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _sharedLabel = __webpack_require__(63); + var _sharedLabel = __webpack_require__(62); var _sharedLabel2 = _interopRequireDefault(_sharedLabel); - var _nodesShapesBox = __webpack_require__(64); + var _nodesShapesBox = __webpack_require__(63); var _nodesShapesBox2 = _interopRequireDefault(_nodesShapesBox); - var _nodesShapesCircle = __webpack_require__(66); + var _nodesShapesCircle = __webpack_require__(65); var _nodesShapesCircle2 = _interopRequireDefault(_nodesShapesCircle); - var _nodesShapesCircularImage = __webpack_require__(68); + var _nodesShapesCircularImage = __webpack_require__(67); var _nodesShapesCircularImage2 = _interopRequireDefault(_nodesShapesCircularImage); - var _nodesShapesDatabase = __webpack_require__(69); + var _nodesShapesDatabase = __webpack_require__(68); var _nodesShapesDatabase2 = _interopRequireDefault(_nodesShapesDatabase); - var _nodesShapesDiamond = __webpack_require__(70); + var _nodesShapesDiamond = __webpack_require__(69); var _nodesShapesDiamond2 = _interopRequireDefault(_nodesShapesDiamond); - var _nodesShapesDot = __webpack_require__(72); + var _nodesShapesDot = __webpack_require__(71); var _nodesShapesDot2 = _interopRequireDefault(_nodesShapesDot); - var _nodesShapesEllipse = __webpack_require__(73); + var _nodesShapesEllipse = __webpack_require__(72); var _nodesShapesEllipse2 = _interopRequireDefault(_nodesShapesEllipse); - var _nodesShapesIcon = __webpack_require__(74); + var _nodesShapesIcon = __webpack_require__(73); var _nodesShapesIcon2 = _interopRequireDefault(_nodesShapesIcon); - var _nodesShapesImage = __webpack_require__(75); + var _nodesShapesImage = __webpack_require__(74); var _nodesShapesImage2 = _interopRequireDefault(_nodesShapesImage); - var _nodesShapesSquare = __webpack_require__(76); + var _nodesShapesSquare = __webpack_require__(75); var _nodesShapesSquare2 = _interopRequireDefault(_nodesShapesSquare); - var _nodesShapesStar = __webpack_require__(77); + var _nodesShapesStar = __webpack_require__(76); var _nodesShapesStar2 = _interopRequireDefault(_nodesShapesStar); - var _nodesShapesText = __webpack_require__(78); + var _nodesShapesText = __webpack_require__(77); var _nodesShapesText2 = _interopRequireDefault(_nodesShapesText); - var _nodesShapesTriangle = __webpack_require__(79); + var _nodesShapesTriangle = __webpack_require__(78); var _nodesShapesTriangle2 = _interopRequireDefault(_nodesShapesTriangle); - var _nodesShapesTriangleDown = __webpack_require__(80); + var _nodesShapesTriangleDown = __webpack_require__(79); var _nodesShapesTriangleDown2 = _interopRequireDefault(_nodesShapesTriangleDown); - var _sharedValidator = __webpack_require__(47); + var _sharedValidator = __webpack_require__(46); var _sharedValidator2 = _interopRequireDefault(_sharedValidator); @@ -28245,6 +29053,7 @@ return /******/ (function(modules) { // webpackBootstrap _classCallCheck(this, Node); this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; this.body = body; this.edges = []; // all edges connected to this node @@ -28267,39 +29076,39 @@ return /******/ (function(modules) { // webpackBootstrap this.setOptions(options); } + /** + * Attach a edge to the node + * @param {Edge} edge + */ + _createClass(Node, [{ key: 'attachEdge', - - /** - * Attach a edge to the node - * @param {Edge} edge - */ value: function attachEdge(edge) { if (this.edges.indexOf(edge) === -1) { this.edges.push(edge); } } - }, { - key: 'detachEdge', /** * Detach a edge from the node * @param {Edge} edge */ + }, { + key: 'detachEdge', value: function detachEdge(edge) { var index = this.edges.indexOf(edge); if (index != -1) { this.edges.splice(index, 1); } } - }, { - key: 'setOptions', /** * Set or overwrite options for the node * @param {Object} options an object with options * @param {Object} constants and object with default, global options */ + }, { + key: 'setOptions', value: function setOptions(options) { var currentShape = this.options.shape; if (!options) { @@ -28311,7 +29120,7 @@ return /******/ (function(modules) { // webpackBootstrap } if (this.id === undefined) { - throw 'Node must have an id'; + throw "Node must have an id"; } // set these options locally @@ -28346,14 +29155,14 @@ return /******/ (function(modules) { // webpackBootstrap } // this transforms all shorthands into fully defined options - Node.parseOptions(this.options, options, true); + Node.parseOptions(this.options, options, true, this.globalOptions); // load the images if (this.options.image !== undefined) { if (this.imagelist) { this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id); } else { - throw 'No imagelist provided'; + throw "No imagelist provided"; } } @@ -28365,6 +29174,15 @@ return /******/ (function(modules) { // webpackBootstrap } return false; } + + /** + * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined. + * Static so it can also be used by the handler. + * @param parentOptions + * @param newOptions + * @param allowDeletion + * @param globalOptions + */ }, { key: 'updateLabelModule', value: function updateLabelModule() { @@ -28433,50 +29251,48 @@ return /******/ (function(modules) { // webpackBootstrap } this._reset(); } - }, { - key: 'select', /** * select this node */ + }, { + key: 'select', value: function select() { this.selected = true; this._reset(); } - }, { - key: 'unselect', /** * unselect this node */ + }, { + key: 'unselect', value: function unselect() { this.selected = false; this._reset(); } - }, { - key: '_reset', /** * Reset the calculated size of the node, forces it to recalculate its size * @private */ + }, { + key: '_reset', value: function _reset() { this.shape.width = undefined; this.shape.height = undefined; } - }, { - key: 'getTitle', /** * get the title of this node. * @return {string} title The title of the node, or undefined when no title * has been set. */ + }, { + key: 'getTitle', value: function getTitle() { return this.options.title; } - }, { - key: 'distanceToBorder', /** * Calculate the distance to the border of the Node @@ -28484,41 +29300,41 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} angle Angle in radians * @returns {number} distance Distance to the border in pixels */ + }, { + key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { return this.shape.distanceToBorder(ctx, angle); } - }, { - key: 'isFixed', /** * Check if this node has a fixed x and y position * @return {boolean} true if fixed, false if not */ + }, { + key: 'isFixed', value: function isFixed() { return this.options.fixed.x && this.options.fixed.y; } - }, { - key: 'isSelected', /** * check if this node is selecte * @return {boolean} selected True if node is selected, else false */ + }, { + key: 'isSelected', value: function isSelected() { return this.selected; } - }, { - key: 'getValue', /** * Retrieve the value of the node. Can be undefined * @return {Number} value */ + }, { + key: 'getValue', value: function getValue() { return this.options.value; } - }, { - key: 'setValueRange', /** * Adjust the value range of the node. The node will adjust it's size @@ -28526,6 +29342,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} min * @param {Number} max */ + }, { + key: 'setValueRange', value: function setValueRange(min, max, total) { if (this.options.value !== undefined) { var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); @@ -28539,85 +29357,80 @@ return /******/ (function(modules) { // webpackBootstrap this.options.size = this.baseSize; this.options.font.size = this.baseFontSize; } + + this.updateLabelModule(); } - }, { - key: 'draw', /** * Draw this node in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { + key: 'draw', value: function draw(ctx) { this.shape.draw(ctx, this.x, this.y, this.selected, this.hover); } - }, { - key: 'updateBoundingBox', /** * Update the bounding box of the shape */ + }, { + key: 'updateBoundingBox', value: function updateBoundingBox(ctx) { this.shape.updateBoundingBox(this.x, this.y, ctx); } - }, { - key: 'resize', /** * Recalculate the size of this node in the given canvas * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { + key: 'resize', value: function resize(ctx) { this.shape.resize(ctx, this.selected); } - }, { - key: 'isOverlappingWith', /** * 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 */ + }, { + key: 'isOverlappingWith', 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 */ + }, { + key: 'isBoundingBoxOverlappingWith', 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', - - /** - * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined. - * Static so it can also be used by the handler. - * @param parentOptions - * @param newOptions - */ value: function parseOptions(parentOptions, newOptions) { var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var globalOptions = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; var fields = ['color', 'font', 'fixed', 'shadow']; util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); // merge the shadow options into the parent. - util.mergeOptions(parentOptions, newOptions, 'shadow'); + util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions); // individual shape newOptions if (newOptions.color !== undefined && newOptions.color !== null) { var parsedColor = util.parseColor(newOptions.color); util.fillIfDefined(parentOptions.color, parsedColor); } else if (allowDeletion === true && newOptions.color === null) { - parentOptions.color = undefined; - delete parentOptions.color; + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options } // handle the fixed options @@ -28636,13 +29449,15 @@ return /******/ (function(modules) { // webpackBootstrap } // handle the font options - if (newOptions.font !== undefined) { + if (newOptions.font !== undefined && newOptions.font !== null) { _sharedLabel2['default'].parseOptions(parentOptions.font, newOptions); + } else if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options } // handle the scaling options, specifically the label part if (newOptions.scaling !== undefined) { - util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label'); + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling); } } }]); @@ -28654,7 +29469,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 63 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -28739,16 +29554,16 @@ return /******/ (function(modules) { // webpackBootstrap // draw text this._drawText(ctx, selected, x, y, baseline); } - }, { - key: '_drawBackground', /** * Draws the label background * @param {CanvasRenderingContext2D} ctx * @private */ + }, { + key: '_drawBackground', value: function _drawBackground(ctx) { - if (this.fontOptions.background !== undefined && this.fontOptions.background !== 'none') { + if (this.fontOptions.background !== undefined && this.fontOptions.background !== "none") { ctx.fillStyle = this.fontOptions.background; var lineMargin = 2; @@ -28769,8 +29584,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_drawText', /** * @@ -28779,6 +29592,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param baseline * @private */ + }, { + key: '_drawText', value: function _drawText(ctx, selected, x, y) { var baseline = arguments.length <= 4 || arguments[4] === undefined ? 'middle' : arguments[4]; @@ -28798,15 +29613,15 @@ return /******/ (function(modules) { // webpackBootstrap var fontColor = _getColor22[0]; var strokeColor = _getColor22[1]; + // configure context for drawing the text + var _setAlignment2 = this._setAlignment(ctx, x, yLine, baseline); var _setAlignment22 = _slicedToArray(_setAlignment2, 2); x = _setAlignment22[0]; yLine = _setAlignment22[1]; - - // configure context for drawing the text - ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + fontSize + 'px ' + this.fontOptions.face; + ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + fontSize + "px " + this.fontOptions.face; ctx.fillStyle = fontColor; ctx.textAlign = 'center'; @@ -28840,19 +29655,17 @@ return /******/ (function(modules) { // webpackBootstrap ctx.textBaseline = 'alphabetic'; yLine -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers } else if (this.fontOptions.align === 'bottom') { - ctx.textBaseline = 'hanging'; - yLine += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers - } else { - ctx.textBaseline = 'middle'; - } + ctx.textBaseline = 'hanging'; + yLine += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers + } else { + ctx.textBaseline = 'middle'; + } } else { ctx.textBaseline = baseline; } return [x, yLine]; } - }, { - key: '_getColor', /** * fade in when relative scale is between threshold and threshold - 1. @@ -28862,6 +29675,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { + key: '_getColor', value: function _getColor(viewFontSize) { var fontColor = this.fontOptions.color || '#000000'; var strokeColor = this.fontOptions.strokeColor || '#ffffff'; @@ -28872,8 +29687,6 @@ return /******/ (function(modules) { // webpackBootstrap } return [fontColor, strokeColor]; } - }, { - key: 'getTextSize', /** * @@ -28881,6 +29694,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param selected * @returns {{width: number, height: number}} */ + }, { + key: 'getTextSize', value: function getTextSize(ctx) { var selected = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; @@ -28891,8 +29706,6 @@ return /******/ (function(modules) { // webpackBootstrap }; return size; } - }, { - key: 'calculateLabelSize', /** * @@ -28902,6 +29715,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param y * @param baseline */ + }, { + key: 'calculateLabelSize', value: function calculateLabelSize(ctx, selected) { var x = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2]; var y = arguments.length <= 3 || arguments[3] === undefined ? 0 : arguments[3]; @@ -28914,7 +29729,7 @@ return /******/ (function(modules) { // webpackBootstrap this.size.left = x - this.size.width * 0.5; this.size.top = y - this.size.height * 0.5; this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size; - if (baseline === 'hanging') { + if (baseline === "hanging") { this.size.top += 0.5 * this.fontOptions.size; this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers this.size.yLine += 4; // distance from node @@ -28922,8 +29737,6 @@ return /******/ (function(modules) { // webpackBootstrap this.labelDirty = false; } - }, { - key: '_processLabel', /** * This calculates the width as well as explodes the label string and calculates the amount of lines. @@ -28932,6 +29745,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_processLabel', value: function _processLabel(ctx, selected) { var width = 0; var lines = ['']; @@ -28939,7 +29754,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this.nodeOptions.label !== undefined) { lines = String(this.nodeOptions.label).split('\n'); lineCount = lines.length; - ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + this.fontOptions.size + 'px ' + this.fontOptions.face; + ctx.font = (selected && this.nodeOptions.labelHighlightBold ? 'bold ' : '') + this.fontOptions.size + "px " + this.fontOptions.face; width = ctx.measureText(lines[0]).width; for (var i = 1; i < lineCount; i++) { var lineWidth = ctx.measureText(lines[i]).width; @@ -28957,8 +29772,8 @@ return /******/ (function(modules) { // webpackBootstrap var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; if (typeof newOptions.font === 'string') { - var newOptionsArray = newOptions.font.split(' '); - parentOptions.size = newOptionsArray[0].replace('px', ''); + var newOptionsArray = newOptions.font.split(" "); + parentOptions.size = newOptionsArray[0].replace("px", ''); parentOptions.face = newOptionsArray[1]; parentOptions.color = newOptionsArray[2]; } else if (typeof newOptions.font === 'object') { @@ -28975,7 +29790,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 64 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -28986,15 +29801,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -29047,36 +29862,39 @@ return /******/ (function(modules) { // webpackBootstrap //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); - this.updateBoundingBox(x, y); + this.updateBoundingBox(x, y, ctx, selected); this.labelModule.draw(ctx, x, y, selected); } }, { key: 'updateBoundingBox', - value: function updateBoundingBox(x, y) { + value: function updateBoundingBox(x, y, ctx, selected) { + this.resize(ctx, selected); this.left = x - this.width * 0.5; this.top = y - this.height * 0.5; - this.boundingBox.left = this.left; - this.boundingBox.top = this.top; - this.boundingBox.bottom = this.top + this.height; - this.boundingBox.right = this.left + this.width; + var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box + this.boundingBox.left = this.left - borderRadius; + this.boundingBox.top = this.top - borderRadius; + this.boundingBox.bottom = this.top + this.height + borderRadius; + this.boundingBox.right = this.left + this.width + borderRadius; } }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = Math.sin(angle) * a; - var h = Math.cos(angle) * b; - return a * b / Math.sqrt(w * w + h * h); + var borderWidth = this.options.borderWidth; + + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; } }]); @@ -29087,18 +29905,18 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 65 */ +/* 64 */ /***/ function(module, exports) { - 'use strict'; + "use strict"; - Object.defineProperty(exports, '__esModule', { + 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 _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'); } } + 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) { @@ -29116,28 +29934,29 @@ return /******/ (function(modules) { // webpackBootstrap } _createClass(NodeBase, [{ - key: 'setOptions', + key: "setOptions", value: function setOptions(options) { this.options = options; } }, { - key: '_distanceToBorder', - value: function _distanceToBorder(angle) { - var borderWidth = 1; + key: "_distanceToBorder", + value: function _distanceToBorder(ctx, angle) { + var borderWidth = this.options.borderWidth; + this.resize(ctx); return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; } }, { - key: 'enableShadow', + key: "enableShadow", value: function enableShadow(ctx) { if (this.options.shadow.enabled === true) { - ctx.shadowColor = 'rgba(0,0,0,0.5)'; + ctx.shadowColor = this.options.shadow.color; ctx.shadowBlur = this.options.shadow.size; ctx.shadowOffsetX = this.options.shadow.x; ctx.shadowOffsetY = this.options.shadow.y; } } }, { - key: 'disableShadow', + key: "disableShadow", value: function disableShadow(ctx) { if (this.options.shadow.enabled === true) { ctx.shadowColor = 'rgba(0,0,0,0)'; @@ -29147,7 +29966,7 @@ return /******/ (function(modules) { // webpackBootstrap } } }, { - key: 'enableBorderDashes', + key: "enableBorderDashes", value: function enableBorderDashes(ctx) { if (this.options.shapeProperties.borderDashes !== false) { if (ctx.setLineDash !== undefined) { @@ -29157,19 +29976,19 @@ return /******/ (function(modules) { // webpackBootstrap } ctx.setLineDash(dashes); } else { - console.warn('setLineDash is not supported in this browser. The dashed borders cannot be used.'); + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); this.options.shapeProperties.borderDashes = false; } } } }, { - key: 'disableBorderDashes', + key: "disableBorderDashes", value: function disableBorderDashes(ctx) { if (this.options.shapeProperties.borderDashes !== false) { if (ctx.setLineDash !== undefined) { ctx.setLineDash([0]); } else { - console.warn('setLineDash is not supported in this browser. The dashed borders cannot be used.'); + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); this.options.shapeProperties.borderDashes = false; } } @@ -29179,11 +29998,11 @@ return /******/ (function(modules) { // webpackBootstrap return NodeBase; })(); - exports['default'] = NodeBase; - module.exports = exports['default']; + exports["default"] = NodeBase; + module.exports = exports["default"]; /***/ }, -/* 66 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29194,15 +30013,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilCircleImageBase = __webpack_require__(67); + var _utilCircleImageBase = __webpack_require__(66); var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); @@ -29258,11 +30077,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = Math.sin(angle) * a; - var h = Math.cos(angle) * b; - return a * b / Math.sqrt(w * w + h * h); + return this.width * 0.5; } }]); @@ -29273,7 +30088,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 67 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29284,15 +30099,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -29315,8 +30130,6 @@ return /******/ (function(modules) { // webpackBootstrap this.imageObj = imageObj; } } - }, { - key: '_resizeImage', /** * This function resizes the image by the options size when the image has not yet loaded. If the image has loaded, we @@ -29324,6 +30137,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: '_resizeImage', value: function _resizeImage() { var force = false; if (!this.imageObj.width || !this.imageObj.height) { @@ -29370,14 +30185,12 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_drawRawCircle', value: function _drawRawCircle(ctx, x, y, selected, hover, size) { - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - - ctx.lineWidth = selected ? selectionLineWidth : borderWidth; - ctx.lineWidth *= this.networkScaleInv; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.circle(x, y, size); @@ -29390,11 +30203,14 @@ return /******/ (function(modules) { // webpackBootstrap //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); } }, { @@ -29407,8 +30223,35 @@ return /******/ (function(modules) { // webpackBootstrap // draw shadow if enabled this.enableShadow(ctx); - // draw image - ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height); + var factor = this.imageObj.width / this.width / this.body.view.scale; + if (factor > 2 && this.options.shapeProperties.interpolation === true) { + var w = this.imageObj.width; + var h = this.imageObj.height; + var can2 = document.createElement('canvas'); + can2.width = w; + can2.height = w; + var ctx2 = can2.getContext('2d'); + + factor *= 0.5; + w *= 0.5; + h *= 0.5; + ctx2.drawImage(this.imageObj, 0, 0, w, h); + + var distance = 0; + var iterations = 1; + while (factor > 2 && iterations < 4) { + ctx2.drawImage(can2, distance, 0, w, h, distance + w, 0, w / 2, h / 2); + distance += w; + factor *= 0.5; + w *= 0.5; + h *= 0.5; + iterations += 1; + } + ctx.drawImage(can2, distance, 0, w, h, this.left, this.top, this.width, this.height); + } else { + // draw image + ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height); + } // disable shadows for other elements. this.disableShadow(ctx); @@ -29444,7 +30287,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 68 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29455,15 +30298,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilCircleImageBase = __webpack_require__(67); + var _utilCircleImageBase = __webpack_require__(66); var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); @@ -29508,10 +30351,10 @@ return /******/ (function(modules) { // webpackBootstrap var size = Math.min(0.5 * this.height, 0.5 * this.width); - // draw the backgroun circle. IMPORTANT: the stroke in this method is used by the clip method below. + // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below. this._drawRawCircle(ctx, x, y, selected, hover, size); - // now we draw in the cicle, we save so we can revert the clip operation after drawing. + // now we draw in the circle, we save so we can revert the clip operation after drawing. ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in. ctx.clip(); @@ -29539,7 +30382,7 @@ return /******/ (function(modules) { // webpackBootstrap key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { this.resize(ctx); - return this._distanceToBorder(angle); + return this.width * 0.5; } }]); @@ -29550,7 +30393,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 69 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29561,15 +30404,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -29601,13 +30444,12 @@ return /******/ (function(modules) { // webpackBootstrap this.left = x - this.width / 2; this.top = y - this.height / 2; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = this.selected ? selectionLineWidth : borderWidth; - ctx.lineWidth *= this.networkScaleInv; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.database(x - this.width / 2, y - this.height * 0.5, this.width, this.height); @@ -29621,11 +30463,14 @@ return /******/ (function(modules) { // webpackBootstrap //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); this.updateBoundingBox(x, y, ctx, selected); @@ -29647,12 +30492,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = Math.sin(angle) * a; - var h = Math.cos(angle) * b; - return a * b / Math.sqrt(w * w + h * h); + return this._distanceToBorder(ctx, angle); } }]); @@ -29663,7 +30503,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 70 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29674,15 +30514,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -29708,7 +30548,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -29719,7 +30559,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 71 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29730,15 +30570,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -29769,13 +30609,12 @@ return /******/ (function(modules) { // webpackBootstrap this.left = x - this.width / 2; this.top = y - this.height / 2; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = selected ? selectionLineWidth : borderWidth; - ctx.lineWidth /= this.body.view.scale; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx[shape](x, y, this.options.size); @@ -29788,11 +30627,14 @@ return /******/ (function(modules) { // webpackBootstrap //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); if (this.options.label !== undefined) { @@ -29825,7 +30667,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 72 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29836,15 +30678,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -29870,7 +30712,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - return this.options.size + this.options.borderWidth; + this.resize(ctx); + return this.options.size; } }]); @@ -29881,7 +30724,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 73 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29892,15 +30735,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -29934,15 +30777,13 @@ return /******/ (function(modules) { // webpackBootstrap this.left = x - this.width * 0.5; this.top = y - this.height * 0.5; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = selected ? selectionLineWidth : borderWidth; - ctx.lineWidth /= this.body.view.scale; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); - ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.ellipse(this.left, this.top, this.width, this.height); @@ -29955,11 +30796,16 @@ return /******/ (function(modules) { // webpackBootstrap //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } + ctx.restore(); this.updateBoundingBox(x, y, ctx, selected); @@ -29997,7 +30843,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 74 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30008,15 +30854,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -30081,12 +30927,12 @@ return /******/ (function(modules) { // webpackBootstrap var iconSize = Number(this.options.icon.size); if (this.options.icon.code !== undefined) { - ctx.font = (selected ? 'bold ' : '') + iconSize + 'px ' + this.options.icon.face; + ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face; // draw icon - ctx.fillStyle = this.options.icon.color || 'black'; - ctx.textAlign = 'center'; - ctx.textBaseline = 'middle'; + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; // draw shadow if enabled this.enableShadow(ctx); @@ -30101,8 +30947,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - this.resize(ctx); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30113,7 +30958,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 75 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30124,15 +30969,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilCircleImageBase = __webpack_require__(67); + var _utilCircleImageBase = __webpack_require__(66); var _utilCircleImageBase2 = _interopRequireDefault(_utilCircleImageBase); @@ -30158,6 +31003,39 @@ return /******/ (function(modules) { // webpackBootstrap this.left = x - this.width / 2; this.top = y - this.height / 2; + if (this.options.shapeProperties.useBorderWithImage === true) { + var neutralborderWidth = this.options.borderWidth; + var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + + ctx.beginPath(); + + // setup the line properties. + ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; + + // set a fillstyle + ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; + + // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image + ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth); + ctx.fill(); + + //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. + ctx.save(); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } + ctx.restore(); + + ctx.closePath(); + } + this._drawImageAtPosition(ctx); this._drawImageLabel(ctx, x, y, selected || hover); @@ -30185,12 +31063,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = Math.sin(angle) * a; - var h = Math.cos(angle) * b; - return a * b / Math.sqrt(w * w + h * h); + return this._distanceToBorder(ctx, angle); } }]); @@ -30201,7 +31074,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 76 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30212,15 +31085,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -30246,8 +31119,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - this.resize(); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30258,7 +31130,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 77 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30269,15 +31141,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -30303,7 +31175,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30314,7 +31186,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 78 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30325,15 +31197,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilNodeBase = __webpack_require__(65); + var _utilNodeBase = __webpack_require__(64); var _utilNodeBase2 = _interopRequireDefault(_utilNodeBase); @@ -30389,8 +31261,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - this.resize(ctx); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30401,7 +31272,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 79 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30412,15 +31283,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -30446,7 +31317,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30457,7 +31328,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 80 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30468,15 +31339,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilShapeBase = __webpack_require__(71); + var _utilShapeBase = __webpack_require__(70); var _utilShapeBase2 = _interopRequireDefault(_utilShapeBase); @@ -30502,7 +31373,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'distanceToBorder', value: function distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx, angle); } }]); @@ -30513,7 +31384,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 81 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30528,11 +31399,11 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _componentsEdge = __webpack_require__(82); + var _componentsEdge = __webpack_require__(81); var _componentsEdge2 = _interopRequireDefault(_componentsEdge); - var _componentsSharedLabel = __webpack_require__(63); + var _componentsSharedLabel = __webpack_require__(62); var _componentsSharedLabel2 = _interopRequireDefault(_componentsSharedLabel); @@ -30572,6 +31443,7 @@ return /******/ (function(modules) { // webpackBootstrap middle: { enabled: false, scaleFactor: 1 }, from: { enabled: false, scaleFactor: 1 } }, + arrowStrikethrough: true, color: { color: '#848484', highlight: '#848484', @@ -30618,13 +31490,14 @@ return /******/ (function(modules) { // webpackBootstrap selfReferenceSize: 20, shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: 10, x: 5, y: 5 }, smooth: { enabled: true, - type: 'dynamic', + type: "dynamic", forceDirection: 'none', roundness: 0.5 }, @@ -30644,7 +31517,7 @@ return /******/ (function(modules) { // webpackBootstrap var _this2 = this; // this allows external modules to force all dynamic curves to turn static. - this.body.emitter.on('_forceDisableDynamicCurves', function (type) { + this.body.emitter.on("_forceDisableDynamicCurves", function (type) { if (type === 'dynamic') { type = 'continuous'; } @@ -30654,7 +31527,7 @@ return /******/ (function(modules) { // webpackBootstrap var edge = _this2.body.edges[edgeId]; var edgeData = _this2.body.data.edges._data[edgeId]; - // only forcilby remove the smooth curve if the data has been set of the edge has the smooth curves defined. + // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined. // this is because a change in the global would not affect these curves. if (edgeData !== undefined) { var edgeOptions = edgeData.smooth; @@ -30672,20 +31545,23 @@ return /******/ (function(modules) { // webpackBootstrap } } if (emitChange === true) { - _this2.body.emitter.emit('_dataChanged'); + _this2.body.emitter.emit("_dataChanged"); } }); // this is called when options of EXISTING nodes or edges have changed. - this.body.emitter.on('_dataUpdated', function () { + this.body.emitter.on("_dataUpdated", function () { _this2.reconnectEdges(); _this2.markAllEdgesAsDirty(); }); // refresh the edges. Used when reverting from hierarchical layout - this.body.emitter.on('refreshEdges', this.refresh.bind(this)); - this.body.emitter.on('refresh', this.refresh.bind(this)); - this.body.emitter.on('destroy', function () { + this.body.emitter.on("refreshEdges", this.refresh.bind(this)); + this.body.emitter.on("refresh", this.refresh.bind(this)); + this.body.emitter.on("destroy", function () { + util.forEach(_this2.edgesListeners, function (callback, event) { + if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback); + }); delete _this2.body.functions.createEdge; delete _this2.edgesListeners.add; delete _this2.edgesListeners.update; @@ -30700,7 +31576,7 @@ return /******/ (function(modules) { // webpackBootstrap // use the parser from the Edge class to fill in all shorthand notations _componentsEdge2['default'].parseOptions(this.options, options); - // hanlde multiple input cases for color + // handle multiple input cases for color if (options.color !== undefined) { this.markAllEdgesAsDirty(); } @@ -30732,8 +31608,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'setData', /** * Load edges by reading the data table @@ -30741,6 +31615,8 @@ return /******/ (function(modules) { // webpackBootstrap * @private * @private */ + }, { + key: 'setData', value: function setData(edges) { var _this3 = this; @@ -30783,17 +31659,17 @@ return /******/ (function(modules) { // webpackBootstrap } if (doNotEmit === false) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } } - }, { - key: 'add', /** * Add edges * @param {Number[] | String[]} ids * @private */ + }, { + key: 'add', value: function add(ids) { var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; @@ -30808,22 +31684,22 @@ 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); } if (doNotEmit === false) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } } - }, { - key: 'update', /** * Update existing edges, or create them when not yet existing * @param {Number[] | String[]} ids * @private */ + }, { + key: 'update', value: function update(ids) { var edges = this.body.edges; var edgesData = this.body.data.edges; @@ -30845,19 +31721,19 @@ return /******/ (function(modules) { // webpackBootstrap } if (dataChanged === true) { - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } else { - this.body.emitter.emit('_dataUpdated'); + this.body.emitter.emit("_dataUpdated"); } } - }, { - key: 'remove', /** * Remove existing edges. Non existing ids will be ignored * @param {Number[] | String[]} ids * @private */ + }, { + key: 'remove', value: function remove(ids) { var edges = this.body.edges; for (var i = 0; i < ids.length; i++) { @@ -30870,7 +31746,7 @@ return /******/ (function(modules) { // webpackBootstrap } } - this.body.emitter.emit('_dataChanged'); + this.body.emitter.emit("_dataChanged"); } }, { key: 'refresh', @@ -30899,13 +31775,13 @@ return /******/ (function(modules) { // webpackBootstrap this.body.edges[edgeId].edgeType.colorDirty = true; } } - }, { - key: 'reconnectEdges', /** * Reconnect all edges * @private */ + }, { + key: 'reconnectEdges', value: function reconnectEdges() { var id; var nodes = this.body.nodes; @@ -30950,7 +31826,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 82 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30965,28 +31841,26 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _sharedLabel = __webpack_require__(63); + var _sharedLabel = __webpack_require__(62); var _sharedLabel2 = _interopRequireDefault(_sharedLabel); - var _edgesCubicBezierEdge = __webpack_require__(83); + var _edgesCubicBezierEdge = __webpack_require__(82); var _edgesCubicBezierEdge2 = _interopRequireDefault(_edgesCubicBezierEdge); - var _edgesBezierEdgeDynamic = __webpack_require__(87); + var _edgesBezierEdgeDynamic = __webpack_require__(86); var _edgesBezierEdgeDynamic2 = _interopRequireDefault(_edgesBezierEdgeDynamic); - var _edgesBezierEdgeStatic = __webpack_require__(88); + var _edgesBezierEdgeStatic = __webpack_require__(87); var _edgesBezierEdgeStatic2 = _interopRequireDefault(_edgesBezierEdgeStatic); - var _edgesStraightEdge = __webpack_require__(89); + var _edgesStraightEdge = __webpack_require__(88); var _edgesStraightEdge2 = _interopRequireDefault(_edgesStraightEdge); - var util = __webpack_require__(1); - /** * @class Edge * @@ -31002,15 +31876,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} constants An object with default values for * example for the color */ + var util = __webpack_require__(1); var Edge = (function () { function Edge(options, body, globalOptions) { _classCallCheck(this, Edge); if (body === undefined) { - throw 'No body provided'; + throw "No body provided"; } this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; this.body = body; // initialize variables @@ -31037,21 +31913,21 @@ return /******/ (function(modules) { // webpackBootstrap this.setOptions(options); } + /** + * Set or overwrite options for the edge + * @param {Object} options an object with options + * @param doNotEmit + */ + _createClass(Edge, [{ key: 'setOptions', - - /** - * Set or overwrite options for the edge - * @param {Object} options an object with options - * @param doNotEmit - */ value: function setOptions(options) { if (!options) { return; } this.colorDirty = true; - Edge.parseOptions(this.options, options, true); + Edge.parseOptions(this.options, options, true, this.globalOptions); if (options.id !== undefined) { this.id = options.id; @@ -31088,6 +31964,7 @@ return /******/ (function(modules) { // webpackBootstrap } }, { key: 'updateLabelModule', + // set the object back to the global options /** * update the options in the label module @@ -31098,13 +31975,13 @@ return /******/ (function(modules) { // webpackBootstrap this.baseFontSize = this.labelModule.baseSize; } } - }, { - key: 'updateEdgeType', /** * update the edge type, set the options * @returns {boolean} */ + }, { + key: 'updateEdgeType', value: function updateEdgeType() { var dataChanged = false; var changeInType = true; @@ -31148,12 +32025,12 @@ return /******/ (function(modules) { // webpackBootstrap return dataChanged; } - }, { - key: 'connect', /** * Connect an edge to its nodes */ + }, { + key: 'connect', value: function connect() { this.disconnect(); @@ -31175,12 +32052,12 @@ return /******/ (function(modules) { // webpackBootstrap this.edgeType.connect(); } - }, { - key: 'disconnect', /** * Disconnect an edge from its nodes */ + }, { + key: 'disconnect', value: function disconnect() { if (this.from) { this.from.detachEdge(this); @@ -31193,39 +32070,37 @@ return /******/ (function(modules) { // webpackBootstrap this.connected = false; } - }, { - key: 'getTitle', /** * get the title of this edge. * @return {string} title The title of the edge, or undefined when no title * has been set. */ + }, { + key: 'getTitle', value: function getTitle() { return this.title; } - }, { - key: 'isSelected', /** * check if this node is selecte * @return {boolean} selected True if node is selected, else false */ + }, { + key: 'isSelected', value: function isSelected() { return this.selected; } - }, { - key: 'getValue', /** * Retrieve the value of the edge. Can be undefined * @return {Number} value */ + }, { + key: 'getValue', value: function getValue() { return this.options.value; } - }, { - key: 'setValueRange', /** * Adjust the value range of the edge. The edge will adjust it's width @@ -31234,6 +32109,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} max * @param total */ + }, { + key: 'setValueRange', value: function setValueRange(min, max, total) { if (this.options.value !== undefined) { var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); @@ -31249,6 +32126,7 @@ return /******/ (function(modules) { // webpackBootstrap } this._setInteractionWidths(); + this.updateLabelModule(); } }, { key: '_setInteractionWidths', @@ -31265,8 +32143,6 @@ return /******/ (function(modules) { // webpackBootstrap this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width; } } - }, { - key: 'draw', /** * Redraw a edge @@ -31274,22 +32150,48 @@ return /******/ (function(modules) { // webpackBootstrap * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); * @param {CanvasRenderingContext2D} ctx */ + }, { + key: 'draw', value: function draw(ctx) { - var via = this.edgeType.drawLine(ctx, this.selected, this.hover); - this.drawArrows(ctx, via); - this.drawLabel(ctx, via); + // get the via node from the edge type + var viaNode = this.edgeType.getViaNode(); + var arrowData = {}; + + // restore edge targets to defaults + this.edgeType.fromPoint = this.edgeType.from; + this.edgeType.toPoint = this.edgeType.to; + + // from and to arrows give a different end point for edges. we set them here + if (this.options.arrows.from.enabled === true) { + arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover); + if (this.options.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core; + } + if (this.options.arrows.to.enabled === true) { + arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover); + if (this.options.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core; + } + + // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly. + if (this.options.arrows.middle.enabled === true) { + arrowData.middle = this.edgeType.getArrowData(ctx, 'middle', viaNode, this.selected, this.hover); + } + + // draw everything + this.edgeType.drawLine(ctx, this.selected, this.hover, viaNode); + this.drawArrows(ctx, arrowData); + this.drawLabel(ctx, viaNode); } }, { key: 'drawArrows', - value: function drawArrows(ctx, viaNode) { + value: function drawArrows(ctx, arrowData) { if (this.options.arrows.from.enabled === true) { - this.edgeType.drawArrowHead(ctx, 'from', viaNode, this.selected, this.hover); + this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.from); } if (this.options.arrows.middle.enabled === true) { - this.edgeType.drawArrowHead(ctx, 'middle', viaNode, this.selected, this.hover); + this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.middle); } if (this.options.arrows.to.enabled === true) { - this.edgeType.drawArrowHead(ctx, 'to', viaNode, this.selected, this.hover); + this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.to); } } }, { @@ -31306,7 +32208,7 @@ return /******/ (function(modules) { // webpackBootstrap ctx.save(); // if the label has to be rotated: - if (this.options.font.align !== 'horizontal') { + if (this.options.font.align !== "horizontal") { this.labelModule.calculateLabelSize(ctx, selected, point.x, point.y); ctx.translate(point.x, this.labelModule.size.yLine); this._rotateForLabelAlignment(ctx); @@ -31332,14 +32234,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'isOverlappingWith', /** * Check if this object is overlapping with the provided object * @param {Object} obj an object with parameters left, top * @return {boolean} True if location is located on the edge */ + }, { + key: 'isOverlappingWith', value: function isOverlappingWith(obj) { if (this.connected) { var distMax = 10; @@ -31357,14 +32259,14 @@ return /******/ (function(modules) { // webpackBootstrap return false; } } - }, { - key: '_rotateForLabelAlignment', /** * Rotates the canvas so the text is most readable * @param {CanvasRenderingContext2D} ctx * @private */ + }, { + key: '_rotateForLabelAlignment', value: function _rotateForLabelAlignment(ctx) { var dy = this.from.y - this.to.y; var dx = this.from.x - this.to.x; @@ -31377,8 +32279,6 @@ return /******/ (function(modules) { // webpackBootstrap ctx.rotate(angleInDegrees); } - }, { - key: '_pointOnCircle', /** * Get a point on a circle @@ -31389,6 +32289,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} point * @private */ + }, { + key: '_pointOnCircle', value: function _pointOnCircle(x, y, radius, percentage) { var angle = percentage * 2 * Math.PI; return { @@ -31406,13 +32308,13 @@ return /******/ (function(modules) { // webpackBootstrap value: function unselect() { this.selected = false; } - }, { - key: 'cleanup', /** * cleans all required things on delete * @returns {*} */ + }, { + key: 'cleanup', value: function cleanup() { return this.edgeType.cleanup(); } @@ -31420,20 +32322,20 @@ return /******/ (function(modules) { // webpackBootstrap key: 'parseOptions', value: function parseOptions(parentOptions, newOptions) { var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var globalOptions = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; - var fields = ['id', 'from', 'hidden', 'hoverWidth', 'label', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width']; + var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'label', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width']; // only deep extend the items in the field array. These do not have shorthand. util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); - util.mergeOptions(parentOptions, newOptions, 'smooth'); - util.mergeOptions(parentOptions, newOptions, 'shadow'); + util.mergeOptions(parentOptions, newOptions, 'smooth', allowDeletion, globalOptions); + util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions); if (newOptions.dashes !== undefined && newOptions.dashes !== null) { parentOptions.dashes = newOptions.dashes; } else if (allowDeletion === true && newOptions.dashes === null) { - parentOptions.dashes = undefined; - delete parentOptions.dashes; + parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option. } // set the scaling newOptions @@ -31444,39 +32346,39 @@ return /******/ (function(modules) { // webpackBootstrap if (newOptions.scaling.max !== undefined) { parentOptions.scaling.max = newOptions.scaling.max; } - util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label'); + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling); } else if (allowDeletion === true && newOptions.scaling === null) { - parentOptions.scaling = undefined; - delete parentOptions.scaling; + parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option. } - // hanlde multiple input cases for arrows + // handle multiple input cases for arrows if (newOptions.arrows !== undefined && newOptions.arrows !== null) { if (typeof newOptions.arrows === 'string') { var arrows = newOptions.arrows.toLowerCase(); - if (arrows.indexOf('to') != -1) { + if (arrows.indexOf("to") != -1) { parentOptions.arrows.to.enabled = true; } - if (arrows.indexOf('middle') != -1) { + if (arrows.indexOf("middle") != -1) { parentOptions.arrows.middle.enabled = true; } - if (arrows.indexOf('from') != -1) { + if (arrows.indexOf("from") != -1) { parentOptions.arrows.from.enabled = true; } } else if (typeof newOptions.arrows === 'object') { - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to'); - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle'); - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from'); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', allowDeletion, globalOptions.arrows); } else { - throw new Error('The arrow newOptions can only be an object or a string. Refer to the documentation. You used:' + JSON.stringify(newOptions.arrows)); + throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:" + JSON.stringify(newOptions.arrows)); } } else if (allowDeletion === true && newOptions.arrows === null) { - parentOptions.arrows = undefined; - delete parentOptions.arrows; + parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option. } - // hanlde multiple input cases for color + // handle multiple input cases for color if (newOptions.color !== undefined && newOptions.color !== null) { + // make a copy of the parent object in case this is referring to the global one (due to object create once, then update) + parentOptions.color = util.deepExtend({}, parentOptions.color, true); if (util.isString(newOptions.color)) { parentOptions.color.color = newOptions.color; parentOptions.color.highlight = newOptions.color; @@ -31505,13 +32407,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } else if (allowDeletion === true && newOptions.color === null) { - parentOptions.color = undefined; - delete parentOptions.color; + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options } // handle the font settings - if (newOptions.font !== undefined) { + if (newOptions.font !== undefined && newOptions.font !== null) { _sharedLabel2['default'].parseOptions(parentOptions.font, newOptions); + } else if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); } } }]); @@ -31523,7 +32426,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 83 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31536,15 +32439,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = 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(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilCubicBezierEdgeBase = __webpack_require__(84); + var _utilCubicBezierEdgeBase = __webpack_require__(83); var _utilCubicBezierEdgeBase2 = _interopRequireDefault(_utilCubicBezierEdgeBase); @@ -31557,42 +32460,33 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(CubicBezierEdge.prototype), 'constructor', this).call(this, options, body, labelModule); } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @private + */ + _createClass(CubicBezierEdge, [{ key: '_line', - - /** - * Draw a line between two nodes - * @param {CanvasRenderingContext2D} ctx - * @private - */ - value: function _line(ctx) { + value: function _line(ctx, viaNodes) { // get the coordinates of the support points. - - var _getViaCoordinates2 = this._getViaCoordinates(); - - var _getViaCoordinates22 = _slicedToArray(_getViaCoordinates2, 2); - - var via1 = _getViaCoordinates22[0]; - var via2 = _getViaCoordinates22[1]; - - var returnValue = [via1, via2]; + var via1 = viaNodes[0]; + var via2 = viaNodes[1]; // start drawing the line. ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges - if (via1.x === undefined) { - ctx.lineTo(this.to.x, this.to.y); - returnValue = undefined; + if (viaNodes === undefined || via1.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); } else { - ctx.bezierCurveTo(via1.x, via1.y, via2.x, via2.y, this.to.x, this.to.y); + ctx.bezierCurveTo(via1.x, via1.y, via2.x, via2.y, this.toPoint.x, this.toPoint.y); } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return returnValue; } }, { key: '_getViaCoordinates', @@ -31604,7 +32498,7 @@ return /******/ (function(modules) { // webpackBootstrap y1 = undefined, x2 = undefined, y2 = undefined; - var roundness = this.options.smooth.roundness;; + var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') { @@ -31621,6 +32515,11 @@ return /******/ (function(modules) { // webpackBootstrap return [{ x: x1, y: y1 }, { x: x2, y: y2 }]; } + }, { + key: 'getViaNode', + value: function getViaNode() { + return this._getViaCoordinates(); + } }, { key: '_findBorderPosition', value: function _findBorderPosition(nearNode, ctx) { @@ -31638,8 +32537,6 @@ return /******/ (function(modules) { // webpackBootstrap // x3,y3 is the point return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2); } - }, { - key: 'getPoint', /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way @@ -31648,6 +32545,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { + key: 'getPoint', value: function getPoint(percentage) { var _ref3 = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; @@ -31662,8 +32561,8 @@ return /******/ (function(modules) { // webpackBootstrap vec[1] = 3 * t * Math.pow(1 - t, 2); vec[2] = 3 * Math.pow(t, 2) * (1 - t); vec[3] = Math.pow(t, 3); - var x = vec[0] * this.from.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.to.x; - var y = vec[0] * this.from.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.to.y; + var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x; + var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y; return { x: x, y: y }; } @@ -31676,7 +32575,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 84 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31687,15 +32586,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _BezierEdgeBase2 = __webpack_require__(85); + var _BezierEdgeBase2 = __webpack_require__(84); var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); @@ -31708,22 +32607,22 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(CubicBezierEdgeBase.prototype), 'constructor', this).call(this, options, body, labelModule); } + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @private + */ + _createClass(CubicBezierEdgeBase, [{ key: '_getDistanceToBezierEdge', - - /** - * Calculate the distance between a point (x3,y3) and a line segment from - * (x1,y1) to (x2,y2). - * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment - * https://en.wikipedia.org/wiki/B%C3%A9zier_curve - * @param {number} x1 from x - * @param {number} y1 from y - * @param {number} x2 to x - * @param {number} y2 to y - * @param {number} x3 point to check x - * @param {number} y3 point to check y - * @private - */ value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point var minDistance = 1e9; @@ -31762,7 +32661,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 85 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31773,15 +32672,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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 _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _EdgeBase2 = __webpack_require__(86); + var _EdgeBase2 = __webpack_require__(85); var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); @@ -31794,22 +32693,22 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(BezierEdgeBase.prototype), 'constructor', this).call(this, options, body, labelModule); } + /** + * This function uses binary search to look for the point where the bezier curve crosses the border of the node. + * + * @param nearNode + * @param ctx + * @param viaNode + * @param nearNode + * @param ctx + * @param viaNode + * @param nearNode + * @param ctx + * @param viaNode + */ + _createClass(BezierEdgeBase, [{ key: '_findBorderPositionBezier', - - /** - * This function uses binary search to look for the point where the bezier curve crosses the border of the node. - * - * @param nearNode - * @param ctx - * @param viaNode - * @param nearNode - * @param ctx - * @param viaNode - * @param nearNode - * @param ctx - * @param viaNode - */ value: function _findBorderPositionBezier(nearNode, ctx) { var viaNode = arguments.length <= 2 || arguments[2] === undefined ? this._getViaCoordinates() : arguments[2]; @@ -31837,19 +32736,19 @@ return /******/ (function(modules) { // webpackBootstrap if (Math.abs(difference) < threshold) { break; // found } else if (difference < 0) { - // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. - if (from === false) { - low = middle; - } else { - high = middle; - } - } else { - if (from === false) { - high = middle; + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (from === false) { + low = middle; + } else { + high = middle; + } } else { - low = middle; + if (from === false) { + high = middle; + } else { + low = middle; + } } - } iteration++; } @@ -31857,8 +32756,6 @@ return /******/ (function(modules) { // webpackBootstrap return pos; } - }, { - key: '_getDistanceToBezierEdge', /** * Calculate the distance between a point (x3,y3) and a line segment from @@ -31872,6 +32769,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} y3 point to check y * @private */ + }, { + key: '_getDistanceToBezierEdge', value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point var minDistance = 1e9; @@ -31905,7 +32804,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 86 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31928,11 +32827,14 @@ return /******/ (function(modules) { // webpackBootstrap this.body = body; this.labelModule = labelModule; + this.options = {}; this.setOptions(options); this.colorDirty = true; this.color = {}; this.selectionWidth = 2; this.hoverWidth = 1.5; + this.fromPoint = this.from; + this.toPoint = this.to; } _createClass(EdgeBase, [{ @@ -31954,8 +32856,6 @@ return /******/ (function(modules) { // webpackBootstrap this.to = this.body.nodes[this.options.to]; this.id = this.options.id; } - }, { - key: 'drawLine', /** * Redraw a edge as a line @@ -31964,25 +32864,25 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ - value: function drawLine(ctx, selected, hover) { + }, { + key: 'drawLine', + value: function drawLine(ctx, selected, hover, viaNode) { // set style ctx.strokeStyle = this.getColor(ctx, selected, hover); ctx.lineWidth = this.getLineWidth(selected, hover); - var via = undefined; + if (this.options.dashes !== false) { - via = this._drawDashedLine(ctx); + this._drawDashedLine(ctx, viaNode); } else { - via = this._drawLine(ctx); + this._drawLine(ctx, viaNode); } - return via; } }, { key: '_drawLine', - value: function _drawLine(ctx) { - var via = undefined; + value: function _drawLine(ctx, viaNode, fromPoint, toPoint) { if (this.from != this.to) { // draw line - via = this._line(ctx); + this._line(ctx, viaNode, fromPoint, toPoint); } else { var _getCircleData2 = this._getCircleData(ctx); @@ -31994,12 +32894,10 @@ return /******/ (function(modules) { // webpackBootstrap this._circle(ctx, x, y, radius); } - return via; } }, { key: '_drawDashedLine', - value: function _drawDashedLine(ctx) { - var via = undefined; + value: function _drawDashedLine(ctx, viaNode, fromPoint, toPoint) { ctx.lineCap = 'round'; var pattern = [5, 5]; if (Array.isArray(this.options.dashes) === true) { @@ -32017,7 +32915,7 @@ return /******/ (function(modules) { // webpackBootstrap // draw the line if (this.from != this.to) { // draw line - via = this._line(ctx); + this._line(ctx, viaNode); } else { var _getCircleData3 = this._getCircleData(ctx); @@ -32058,7 +32956,6 @@ return /******/ (function(modules) { // webpackBootstrap // disable shadows for other elements. this.disableShadow(ctx); } - return via; } }, { key: 'findBorderPosition', @@ -32115,8 +33012,6 @@ return /******/ (function(modules) { // webpackBootstrap } return [x, y, radius]; } - }, { - key: '_pointOnCircle', /** * Get a point on a circle @@ -32127,6 +33022,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} point * @private */ + }, { + key: '_pointOnCircle', value: function _pointOnCircle(x, y, radius, percentage) { var angle = percentage * 2 * Math.PI; return { @@ -32134,8 +33031,6 @@ return /******/ (function(modules) { // webpackBootstrap y: y - radius * Math.sin(angle) }; } - }, { - key: '_findBorderPositionCircle', /** * This function uses binary search to look for the point where the circle crosses the border of the node. @@ -32145,6 +33040,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { + key: '_findBorderPositionCircle', value: function _findBorderPositionCircle(node, ctx, options) { var x = options.x; var y = options.y; @@ -32174,27 +33071,25 @@ return /******/ (function(modules) { // webpackBootstrap if (Math.abs(difference) < threshold) { break; // found } else if (difference > 0) { - // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. - if (direction > 0) { - low = middle; - } else { - high = middle; - } - } else { - if (direction > 0) { - high = middle; + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (direction > 0) { + low = middle; + } else { + high = middle; + } } else { - low = middle; + if (direction > 0) { + high = middle; + } else { + low = middle; + } } - } iteration++; } pos.t = middle; return pos; } - }, { - key: 'getLineWidth', /** * Get the line width of the edge. Depends on width and whether one of the @@ -32202,6 +33097,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} width * @private */ + }, { + key: 'getLineWidth', value: function getLineWidth(selected, hover) { if (selected === true) { return Math.max(this.selectionWidth, 0.3 / this.body.view.scale); @@ -32242,7 +33139,7 @@ return /******/ (function(modules) { // webpackBootstrap } if (this.colorDirty === true) { - if (colorOptions.inherit === 'to') { + if (colorOptions.inherit === "to") { this.color.highlight = this.to.options.color.highlight.border; this.color.hover = this.to.options.color.hover.border; this.color.color = util.overrideOpacity(this.to.options.color.border, colorOptions.opacity); @@ -32270,8 +33167,6 @@ return /******/ (function(modules) { // webpackBootstrap return this.color.color; } } - }, { - key: '_circle', /** * Draw a line from a node to itself, a circle @@ -32281,6 +33176,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} radius * @private */ + }, { + key: '_circle', value: function _circle(ctx, x, y, radius) { // draw shadow if enabled this.enableShadow(ctx); @@ -32293,8 +33190,6 @@ return /******/ (function(modules) { // webpackBootstrap // disable shadows for other elements. this.disableShadow(ctx); } - }, { - key: 'getDistanceToEdge', /** * Calculate the distance between a point (x3,y3) and a line segment from @@ -32308,6 +33203,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {number} y3 * @private */ + }, { + key: 'getDistanceToEdge', value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point var returnValue = 0; @@ -32360,8 +33257,6 @@ return /******/ (function(modules) { // webpackBootstrap return Math.sqrt(dx * dx + dy * dy); } - }, { - key: 'drawArrowHead', /** * @@ -32369,20 +33264,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param position * @param viaNode */ - value: function drawArrowHead(ctx, position, viaNode, selected, hover) { - // set style - ctx.strokeStyle = this.getColor(ctx, selected, hover); - ctx.fillStyle = ctx.strokeStyle; - ctx.lineWidth = this.getLineWidth(selected, hover); - + }, { + key: 'getArrowData', + value: function getArrowData(ctx, position, viaNode, selected, hover) { // set lets var angle = undefined; - var length = undefined; - var arrowPos = undefined; + var arrowPoint = undefined; var node1 = undefined; var node2 = undefined; var guideOffset = undefined; var scaleFactor = undefined; + var lineWidth = this.getLineWidth(selected, hover); if (position === 'from') { node1 = this.from; @@ -32405,70 +33297,76 @@ return /******/ (function(modules) { // webpackBootstrap if (position !== 'middle') { // draw arrow head if (this.options.smooth.enabled === true) { - arrowPos = this.findBorderPosition(node1, ctx, { via: viaNode }); - var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPos.t + guideOffset)), viaNode); - angle = Math.atan2(arrowPos.y - guidePos.y, arrowPos.x - guidePos.x); + arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode }); + var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode); + angle = Math.atan2(arrowPoint.y - guidePos.y, arrowPoint.x - guidePos.x); } else { angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); - arrowPos = this.findBorderPosition(node1, ctx); + arrowPoint = this.findBorderPosition(node1, ctx); } } else { angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); - arrowPos = this.getPoint(0.6, viaNode); // this is 0.6 to account for the size of the arrow. + arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. } - // draw arrow at the end of the line - length = (10 + 5 * this.options.width) * scaleFactor; - ctx.arrow(arrowPos.x, arrowPos.y, angle, length); + } else { + var _getCircleData7 = this._getCircleData(ctx); - // draw shadow if enabled - this.enableShadow(ctx); - ctx.fill(); + var _getCircleData72 = _slicedToArray(_getCircleData7, 3); - // disable shadows for other elements. - this.disableShadow(ctx); - ctx.stroke(); - } else { - // draw circle - var _angle = undefined, - point = undefined; + var x = _getCircleData72[0]; + var y = _getCircleData72[1]; + var radius = _getCircleData72[2]; - var _getCircleData7 = this._getCircleData(ctx); + if (position === 'from') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } else if (position === 'to') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.6, high: 1.0, direction: 1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + } else { + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); + angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } + } - var _getCircleData72 = _slicedToArray(_getCircleData7, 3); + var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. - var x = _getCircleData72[0]; - var y = _getCircleData72[1]; - var radius = _getCircleData72[2]; + var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); + var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); + var arrowCore = { x: xi, y: yi }; - if (position === 'from') { - point = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); - _angle = point.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; - } else if (position === 'to') { - point = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.6, high: 1.0, direction: 1 }); - _angle = point.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; - } else { - point = this._pointOnCircle(x, y, radius, 0.175); - _angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; - } + return { point: arrowPoint, core: arrowCore, angle: angle, length: length }; + } - // draw the arrowhead - var _length = (10 + 5 * this.options.width) * scaleFactor; - ctx.arrow(point.x, point.y, _angle, _length); + /** + * + * @param ctx + * @param selected + * @param hover + * @param arrowData + */ + }, { + key: 'drawArrowHead', + value: function drawArrowHead(ctx, selected, hover, arrowData) { + // set style + ctx.strokeStyle = this.getColor(ctx, selected, hover); + ctx.fillStyle = ctx.strokeStyle; + ctx.lineWidth = this.getLineWidth(selected, hover); - // draw shadow if enabled - this.enableShadow(ctx); - ctx.fill(); + // draw arrow at the end of the line + ctx.arrow(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length); - // disable shadows for other elements. - this.disableShadow(ctx); - ctx.stroke(); - } + // draw shadow if enabled + this.enableShadow(ctx); + ctx.fill(); + // disable shadows for other elements. + this.disableShadow(ctx); } }, { key: 'enableShadow', value: function enableShadow(ctx) { if (this.options.shadow.enabled === true) { - ctx.shadowColor = 'rgba(0,0,0,0.5)'; + ctx.shadowColor = this.options.shadow.color; ctx.shadowBlur = this.options.shadow.size; ctx.shadowOffsetX = this.options.shadow.x; ctx.shadowOffsetY = this.options.shadow.y; @@ -32492,8 +33390,10 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = EdgeBase; module.exports = exports['default']; + // draw circle + /***/ }, -/* 87 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -32504,15 +33404,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilBezierEdgeBase = __webpack_require__(85); + var _utilBezierEdgeBase = __webpack_require__(84); var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); @@ -32535,16 +33435,27 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(BezierEdgeDynamic, [{ key: "setOptions", value: function setOptions(options) { + // check if the physics has changed. + var physicsChange = false; + if (this.options.physics !== options.physics) { + physicsChange = true; + } + + // set the options and the to and from nodes this.options = options; this.id = this.options.id; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + + // setup the support node and connect this.setupSupportNode(); + this.connect(); // when we change the physics state of the edge, we reposition the support node. - if (this.options.physics !== options.physics) { + if (physicsChange === true) { this.via.setOptions({ physics: this.options.physics }); this.positionBezierNode(); } - this.connect(); } }, { key: "connect", @@ -32554,7 +33465,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this.from === undefined || this.to === undefined || this.options.physics === false) { this.via.setOptions({ physics: false }); } else { - // fix weird behaviour where a selfreferencing node has physics enabled + // fix weird behaviour where a self referencing node has physics enabled if (this.from.id === this.to.id) { this.via.setOptions({ physics: false }); } else { @@ -32562,13 +33473,13 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "cleanup", /** * remove the support nodes * @returns {boolean} */ + }, { + key: "cleanup", value: function cleanup() { this.body.emitter.off("_repositionBezierNodes", this._boundFunction); if (this.via !== undefined) { @@ -32578,8 +33489,6 @@ return /******/ (function(modules) { // webpackBootstrap } return false; } - }, { - key: "setupSupportNode", /** * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but @@ -32588,12 +33497,14 @@ return /******/ (function(modules) { // webpackBootstrap * The changed data is not called, if needed, it is returned by the main edge constructor. * @private */ + }, { + key: "setupSupportNode", value: function setupSupportNode() { if (this.via === undefined) { var nodeId = "edgeId:" + this.id; var node = this.body.functions.createNode({ id: nodeId, - shape: "circle", + shape: 'circle', physics: true, hidden: true }); @@ -32614,39 +33525,50 @@ return /******/ (function(modules) { // webpackBootstrap this.via.y = 0; } } - }, { - key: "_line", /** * Draw a line between two nodes * @param {CanvasRenderingContext2D} ctx * @private */ - value: function _line(ctx) { + }, { + key: "_line", + value: function _line(ctx, viaNode) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - ctx.quadraticCurveTo(this.via.x, this.via.y, this.to.x, this.to.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + // fallback to normal straight edges + if (viaNode.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); + } else { + ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y); + } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return this.via; } }, { - key: "getPoint", + key: "getViaNode", + value: function getViaNode() { + return this.via; + } /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way * @param percentage - * @param via + * @param viaNode * @returns {{x: number, y: number}} * @private */ + }, { + key: "getPoint", value: function getPoint(percentage) { + var viaNode = arguments.length <= 1 || arguments[1] === undefined ? this.via : arguments[1]; + var t = percentage; - var x = Math.pow(1 - t, 2) * this.from.x + 2 * t * (1 - t) * this.via.x + Math.pow(t, 2) * this.to.x; - var y = Math.pow(1 - t, 2) * this.from.y + 2 * t * (1 - t) * this.via.y + Math.pow(t, 2) * this.to.y; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; return { x: x, y: y }; } @@ -32670,7 +33592,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 88 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32681,15 +33603,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x4, _x5, _x6) { var _again = true; _function: while (_again) { var object = _x4, property = _x5, receiver = _x6; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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 _get = function get(_x4, _x5, _x6) { var _again = true; _function: while (_again) { var object = _x4, property = _x5, receiver = _x6; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilBezierEdgeBase = __webpack_require__(85); + var _utilBezierEdgeBase = __webpack_require__(84); var _utilBezierEdgeBase2 = _interopRequireDefault(_utilBezierEdgeBase); @@ -32702,34 +33624,41 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(BezierEdgeStatic.prototype), 'constructor', this).call(this, options, body, labelModule); } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @private + */ + _createClass(BezierEdgeStatic, [{ key: '_line', - - /** - * Draw a line between two nodes - * @param {CanvasRenderingContext2D} ctx - * @private - */ - value: function _line(ctx) { + value: function _line(ctx, viaNode) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - var via = this._getViaCoordinates(); - var returnValue = via; + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges - if (via.x === undefined) { - ctx.lineTo(this.to.x, this.to.y); - returnValue = undefined; + if (viaNode.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); } else { - ctx.quadraticCurveTo(via.x, via.y, this.to.x, this.to.y); + ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y); } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return returnValue; } + }, { + key: 'getViaNode', + value: function getViaNode() { + return this._getViaCoordinates(); + } + + /** + * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows. + * @returns {{x: undefined, y: undefined}} + * @private + */ }, { key: '_getViaCoordinates', value: function _getViaCoordinates() { @@ -32758,7 +33687,7 @@ return /******/ (function(modules) { // webpackBootstrap yVia = this.from.y + factor * dy; } } - if (type === 'discrete') { + if (type === "discrete") { xVia = dx < factor * dy ? this.from.x : xVia; } } else if (Math.abs(this.from.x - this.to.x) > Math.abs(this.from.y - this.to.y)) { @@ -32779,11 +33708,11 @@ return /******/ (function(modules) { // webpackBootstrap yVia = this.from.y + factor * dx; } } - if (type === 'discrete') { + if (type === "discrete") { yVia = dy < factor * dx ? this.from.y : yVia; } } - } else if (type === 'straightCross') { + } else if (type === "straightCross") { if (Math.abs(this.from.x - this.to.x) <= Math.abs(this.from.y - this.to.y)) { // up - down xVia = this.from.x; @@ -32897,26 +33826,26 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_getDistanceToEdge', value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { - var via = arguments.length <= 6 || arguments[6] === undefined ? this._getViaCoordinates() : arguments[6]; + var viaNode = arguments.length <= 6 || arguments[6] === undefined ? this._getViaCoordinates() : arguments[6]; // x3,y3 is the point - return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via); + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); } - }, { - key: 'getPoint', /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way * @param percentage - * @param via + * @param viaNode * @returns {{x: number, y: number}} * @private */ + }, { + key: 'getPoint', value: function getPoint(percentage) { - var via = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; + var viaNode = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; var t = percentage; - var x = Math.pow(1 - t, 2) * this.from.x + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * this.to.x; - var y = Math.pow(1 - t, 2) * this.from.y + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * this.to.y; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; return { x: x, y: y }; } @@ -32929,7 +33858,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 89 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32940,15 +33869,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _utilEdgeBase = __webpack_require__(86); + var _utilEdgeBase = __webpack_require__(85); var _utilEdgeBase2 = _interopRequireDefault(_utilEdgeBase); @@ -32961,27 +33890,29 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(StraightEdge.prototype), 'constructor', this).call(this, options, body, labelModule); } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @private + */ + _createClass(StraightEdge, [{ key: '_line', - - /** - * Draw a line between two nodes - * @param {CanvasRenderingContext2D} ctx - * @private - */ value: function _line(ctx) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - ctx.lineTo(this.to.x, this.to.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return undefined; } }, { - key: 'getPoint', + key: 'getViaNode', + value: function getViaNode() { + return undefined; + } /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way @@ -32990,10 +33921,12 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { + key: 'getPoint', value: function getPoint(percentage) { return { - x: (1 - percentage) * this.from.x + percentage * this.to.x, - y: (1 - percentage) * this.from.y + percentage * this.to.y + x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x, + y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y }; } }, { @@ -33034,7 +33967,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 90 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -33049,35 +33982,35 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _componentsPhysicsBarnesHutSolver = __webpack_require__(91); + var _componentsPhysicsBarnesHutSolver = __webpack_require__(90); var _componentsPhysicsBarnesHutSolver2 = _interopRequireDefault(_componentsPhysicsBarnesHutSolver); - var _componentsPhysicsRepulsionSolver = __webpack_require__(92); + var _componentsPhysicsRepulsionSolver = __webpack_require__(91); var _componentsPhysicsRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsRepulsionSolver); - var _componentsPhysicsHierarchicalRepulsionSolver = __webpack_require__(93); + var _componentsPhysicsHierarchicalRepulsionSolver = __webpack_require__(92); var _componentsPhysicsHierarchicalRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalRepulsionSolver); - var _componentsPhysicsSpringSolver = __webpack_require__(94); + var _componentsPhysicsSpringSolver = __webpack_require__(93); var _componentsPhysicsSpringSolver2 = _interopRequireDefault(_componentsPhysicsSpringSolver); - var _componentsPhysicsHierarchicalSpringSolver = __webpack_require__(95); + var _componentsPhysicsHierarchicalSpringSolver = __webpack_require__(94); var _componentsPhysicsHierarchicalSpringSolver2 = _interopRequireDefault(_componentsPhysicsHierarchicalSpringSolver); - var _componentsPhysicsCentralGravitySolver = __webpack_require__(96); + var _componentsPhysicsCentralGravitySolver = __webpack_require__(95); var _componentsPhysicsCentralGravitySolver2 = _interopRequireDefault(_componentsPhysicsCentralGravitySolver); - var _componentsPhysicsFA2BasedRepulsionSolver = __webpack_require__(97); + var _componentsPhysicsFA2BasedRepulsionSolver = __webpack_require__(96); var _componentsPhysicsFA2BasedRepulsionSolver2 = _interopRequireDefault(_componentsPhysicsFA2BasedRepulsionSolver); - var _componentsPhysicsFA2BasedCentralGravitySolver = __webpack_require__(98); + var _componentsPhysicsFA2BasedCentralGravitySolver = __webpack_require__(97); var _componentsPhysicsFA2BasedCentralGravitySolver2 = _interopRequireDefault(_componentsPhysicsFA2BasedCentralGravitySolver); @@ -33161,6 +34094,7 @@ return /******/ (function(modules) { // webpackBootstrap }; util.extend(this.options, this.defaultOptions); this.timestep = 0.5; + this.layoutFailed = false; this.bindEventListeners(); } @@ -33173,6 +34107,9 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.on('initPhysics', function () { _this.initPhysics(); }); + this.body.emitter.on('_layoutFailed', function () { + _this.layoutFailed = true; + }); this.body.emitter.on('resetPhysics', function () { _this.stopSimulation();_this.ready = false; }); @@ -33197,14 +34134,22 @@ return /******/ (function(modules) { // webpackBootstrap _this.stopSimulation(false); _this.body.emitter.off(); }); + // this event will trigger a rebuilding of the cache everything. Used when nodes or edges have been added or removed. + this.body.emitter.on("_dataChanged", function () { + // update shortcut lists + _this.updatePhysicsData(); + }); + + // debug: show forces + // this.body.emitter.on("afterDrawing", (ctx) => {this._drawForces(ctx);}); } - }, { - key: 'setOptions', /** * set the physics options * @param options */ + }, { + key: 'setOptions', value: function setOptions(options) { if (options !== undefined) { if (options === false) { @@ -33231,12 +34176,12 @@ return /******/ (function(modules) { // webpackBootstrap } this.init(); } - }, { - key: 'init', /** * configure the engine. */ + }, { + key: 'init', value: function init() { var options; if (this.options.solver === 'forceAtlas2Based') { @@ -33264,12 +34209,12 @@ return /******/ (function(modules) { // webpackBootstrap this.modelOptions = options; } - }, { - key: 'initPhysics', /** * initialize the engine */ + }, { + key: 'initPhysics', value: function initPhysics() { if (this.physicsEnabled === true && this.options.enabled === true) { if (this.options.stabilization.enabled === true) { @@ -33277,7 +34222,7 @@ return /******/ (function(modules) { // webpackBootstrap } else { this.stabilized = false; this.ready = true; - this.body.emitter.emit('fit', {}, false); + this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom this.startSimulation(); } } else { @@ -33285,12 +34230,12 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('fit'); } } - }, { - key: 'startSimulation', /** * Start the simulation */ + }, { + key: 'startSimulation', value: function startSimulation() { if (this.physicsEnabled === true && this.options.enabled === true) { this.stabilized = false; @@ -33299,7 +34244,7 @@ return /******/ (function(modules) { // webpackBootstrap this.adaptiveTimestep = false; // this sets the width of all nodes initially which could be required for the avoidOverlap - this.body.emitter.emit('_resizeNodes'); + this.body.emitter.emit("_resizeNodes"); if (this.viewFunction === undefined) { this.viewFunction = this.simulationStep.bind(this); this.body.emitter.on('initRedraw', this.viewFunction); @@ -33309,12 +34254,12 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('_redraw'); } } - }, { - key: 'stopSimulation', /** * Stop the simulation, force stabilization. */ + }, { + key: 'stopSimulation', value: function stopSimulation() { var emit = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; @@ -33330,13 +34275,13 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'simulationStep', /** - * The viewFunction inserts this step into each renderloop. It calls the physics tick and handles the cleanup at stabilized. + * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. * */ + }, { + key: 'simulationStep', value: function simulationStep() { // check if the physics have settled var startTime = Date.now(); @@ -33355,32 +34300,41 @@ return /******/ (function(modules) { // webpackBootstrap this.stopSimulation(); } } - }, { - key: '_emitStabilized', /** * trigger the stabilized event. * @private */ + }, { + key: '_emitStabilized', value: function _emitStabilized() { var _this2 = this; - if (this.stabilizationIterations > 1) { + var amountOfIterations = arguments.length <= 0 || arguments[0] === undefined ? this.stabilizationIterations : arguments[0]; + + if (this.stabilizationIterations > 1 || this.startedStabilization === true) { setTimeout(function () { - _this2.body.emitter.emit('stabilized', { iterations: _this2.stabilizationIterations }); + _this2.body.emitter.emit('stabilized', { iterations: amountOfIterations }); + _this2.startedStabilization = false; _this2.stabilizationIterations = 0; }, 0); } } - }, { - key: 'physicsTick', /** * A single simulation step (or 'tick') in the physics simulation * * @private */ + }, { + key: 'physicsTick', value: function physicsTick() { + // this is here to ensure that there is no start event when the network is already stable. + if (this.startedStabilization === false) { + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + } + if (this.stabilized === false) { // adaptivity means the timestep adapts to the situation, only applicable for stabilization if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) { @@ -33439,25 +34393,19 @@ return /******/ (function(modules) { // webpackBootstrap // determine if the network has stabilzied if (this.stabilized === true) { this.revert(); - } else { - // this is here to ensure that there is no start event when the network is already stable. - if (this.startedStabilization === false) { - this.body.emitter.emit('startStabilizing'); - this.startedStabilization = true; - } } this.stabilizationIterations++; } } - }, { - key: 'updatePhysicsData', /** * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time. * * @private */ + }, { + key: 'updatePhysicsData', value: function updatePhysicsData() { this.physicsBody.forces = {}; this.physicsBody.physicsNodeIndices = []; @@ -33469,7 +34417,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { if (nodes[nodeId].options.physics === true) { - this.physicsBody.physicsNodeIndices.push(nodeId); + this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id); } } } @@ -33478,7 +34426,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { if (edges[edgeId].options.physics === true) { - this.physicsBody.physicsEdgeIndices.push(edgeId); + this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id); } } } @@ -33501,12 +34449,12 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'revert', /** * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized. */ + }, { + key: 'revert', value: function revert() { var nodeIds = Object.keys(this.previousStates); var nodes = this.body.nodes; @@ -33530,12 +34478,12 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_evaluateStepQuality', /** * This compares the reference state to the current state */ + }, { + key: '_evaluateStepQuality', value: function _evaluateStepQuality() { var dx = undefined, dy = undefined, @@ -33558,13 +34506,13 @@ return /******/ (function(modules) { // webpackBootstrap } return true; } - }, { - key: 'moveNodes', /** - * move the nodes one timestap and check if they are stabilized + * move the nodes one timestep and check if they are stabilized * @returns {boolean} */ + }, { + key: 'moveNodes', value: function moveNodes() { var nodeIndices = this.physicsBody.physicsNodeIndices; var maxVelocity = this.options.maxVelocity ? this.options.maxVelocity : 1e9; @@ -33586,8 +34534,6 @@ return /******/ (function(modules) { // webpackBootstrap this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold; this.stabilized = maxNodeVelocity < this.options.minVelocity; } - }, { - key: '_performStep', /** * Perform the actual step @@ -33597,6 +34543,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_performStep', value: function _performStep(nodeId, maxVelocity) { var node = this.body.nodes[nodeId]; var timestep = this.timestep; @@ -33613,9 +34561,9 @@ return /******/ (function(modules) { // webpackBootstrap velocities[nodeId].x = Math.abs(velocities[nodeId].x) > maxVelocity ? velocities[nodeId].x > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].x; node.x += velocities[nodeId].x * timestep; // position } else { - forces[nodeId].x = 0; - velocities[nodeId].x = 0; - } + forces[nodeId].x = 0; + velocities[nodeId].x = 0; + } if (node.options.fixed.y === false) { var dy = this.modelOptions.damping * velocities[nodeId].y; // damping force @@ -33624,26 +34572,24 @@ return /******/ (function(modules) { // webpackBootstrap velocities[nodeId].y = Math.abs(velocities[nodeId].y) > maxVelocity ? velocities[nodeId].y > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].y; node.y += velocities[nodeId].y * timestep; // position } else { - forces[nodeId].y = 0; - velocities[nodeId].y = 0; - } + forces[nodeId].y = 0; + velocities[nodeId].y = 0; + } var totalVelocity = Math.sqrt(Math.pow(velocities[nodeId].x, 2) + Math.pow(velocities[nodeId].y, 2)); return totalVelocity; } - }, { - key: 'calculateForces', /** * calculate the forces for one physics iteration. */ + }, { + key: 'calculateForces', value: function calculateForces() { this.gravitySolver.solve(); this.nodesSolver.solve(); this.edgesSolver.solve(); } - }, { - key: '_freezeNodes', /** * When initializing and stabilizing, we can freeze nodes with a predefined position. This greatly speeds up stabilization @@ -33651,6 +34597,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: '_freezeNodes', value: function _freezeNodes() { var nodes = this.body.nodes; for (var id in nodes) { @@ -33663,14 +34611,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_restoreFrozenNodes', /** * Unfreezes the nodes that have been frozen by _freezeDefinedNodes. * * @private */ + }, { + key: '_restoreFrozenNodes', value: function _restoreFrozenNodes() { var nodes = this.body.nodes; for (var id in nodes) { @@ -33683,13 +34631,12 @@ return /******/ (function(modules) { // webpackBootstrap } this.freezeCache = {}; } - }, { - key: 'stabilize', /** * Find a stable position for all nodes - * @private */ + }, { + key: 'stabilize', value: function stabilize() { var _this3 = this; @@ -33709,7 +34656,7 @@ return /******/ (function(modules) { // webpackBootstrap this.adaptiveTimestep = true && this.options.adaptiveTimestep; // this sets the width of all nodes initially which could be required for the avoidOverlap - this.body.emitter.emit('_resizeNodes'); + this.body.emitter.emit("_resizeNodes"); // stop the render loop this.stopSimulation(); @@ -33731,14 +34678,20 @@ return /******/ (function(modules) { // webpackBootstrap return _this3._stabilizationBatch(); }, 0); } - }, { - key: '_stabilizationBatch', /** * One batch of stabilization * @private */ + }, { + key: '_stabilizationBatch', value: function _stabilizationBatch() { + // this is here to ensure that there is at least one start event. + if (this.startedStabilization === false) { + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + } + var count = 0; while (this.stabilized === false && count < this.options.stabilization.updateInterval && this.stabilizationIterations < this.targetIterations) { this.physicsTick(); @@ -33752,13 +34705,13 @@ return /******/ (function(modules) { // webpackBootstrap this._finalizeStabilization(); } } - }, { - key: '_finalizeStabilization', /** * Wrap up the stabilization, fit and emit the events. * @private */ + }, { + key: '_finalizeStabilization', value: function _finalizeStabilization() { this.body.emitter.emit('_allowRedraw'); if (this.options.stabilization.fit === true) { @@ -33780,6 +34733,34 @@ return /******/ (function(modules) { // webpackBootstrap this.ready = true; } + }, { + key: '_drawForces', + value: function _drawForces(ctx) { + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var node = this.body.nodes[this.physicsBody.physicsNodeIndices[i]]; + var force = this.physicsBody.forces[this.physicsBody.physicsNodeIndices[i]]; + var factor = 20; + var colorFactor = 0.03; + var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2)); + + var size = Math.min(Math.max(5, forceSize), 15); + var arrowSize = 3 * size; + + var color = util.HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1); + + ctx.lineWidth = size; + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(node.x, node.y); + ctx.lineTo(node.x + factor * force.x, node.y + factor * force.y); + ctx.stroke(); + + var angle = Math.atan2(force.y, force.x); + ctx.fillStyle = color; + ctx.arrow(node.x + factor * force.x + Math.cos(angle) * arrowSize, node.y + factor * force.y + Math.sin(angle) * arrowSize, angle, arrowSize); + ctx.fill(); + } + } }]); return PhysicsEngine; @@ -33789,7 +34770,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 91 */ +/* 90 */ /***/ function(module, exports) { "use strict"; @@ -33811,6 +34792,9 @@ return /******/ (function(modules) { // webpackBootstrap this.barnesHutTree; this.setOptions(options); this.randomSeed = 5; + + // debug: show grid + //this.body.emitter.on("afterDrawing", (ctx) => {this._debug(ctx,'#ff0000')}) } _createClass(BarnesHutSolver, [{ @@ -33826,15 +34810,15 @@ return /******/ (function(modules) { // webpackBootstrap var x = Math.sin(this.randomSeed++) * 10000; return x - Math.floor(x); } - }, { - key: "solve", /** - * This function calculates the forces the nodes apply on eachother based on a gravitational model. + * This function calculates the forces the nodes apply on each other based on a gravitational model. * The Barnes Hut method is used to speed up this N-body simulation. * * @private */ + }, { + key: "solve", value: function solve() { if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) { var node = undefined; @@ -33861,8 +34845,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_getForceContribution", /** * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass. @@ -33872,6 +34854,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param node * @private */ + }, { + key: "_getForceContribution", value: function _getForceContribution(parentBranch, node) { // we get no force contribution from an empty region if (parentBranch.childrenCount > 0) { @@ -33906,8 +34890,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_calculateForces", /** * Calculate the forces based on the distance. @@ -33919,6 +34901,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentBranch * @private */ + }, { + key: "_calculateForces", value: function _calculateForces(distance, dx, dy, node, parentBranch) { if (distance === 0) { distance = 0.1; @@ -33938,8 +34922,6 @@ return /******/ (function(modules) { // webpackBootstrap this.physicsBody.forces[node.id].x += fx; this.physicsBody.forces[node.id].y += fy; } - }, { - key: "_formBarnesHutTree", /** * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes. @@ -33948,6 +34930,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param nodeIndices * @private */ + }, { + key: "_formBarnesHutTree", value: function _formBarnesHutTree(nodes, nodeIndices) { var node = undefined; var nodeCount = nodeIndices.length; @@ -33983,9 +34967,9 @@ return /******/ (function(modules) { // webpackBootstrap maxY += 0.5 * sizeDiff; } // xSize > ySize else { - minX += 0.5 * sizeDiff; - maxX -= 0.5 * sizeDiff; - } // xSize < ySize + minX += 0.5 * sizeDiff; + maxX -= 0.5 * sizeDiff; + } // xSize < ySize var minimumTreeSize = 1e-5; var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX)); @@ -34023,8 +35007,6 @@ return /******/ (function(modules) { // webpackBootstrap // make global return barnesHutTree; } - }, { - key: "_updateBranchMass", /** * this updates the mass of a branch. this is increased by adding a node. @@ -34033,6 +35015,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param node * @private */ + }, { + key: "_updateBranchMass", value: function _updateBranchMass(parentBranch, node) { var totalMass = parentBranch.mass + node.options.mass; var totalMassInv = 1 / totalMass; @@ -34047,8 +35031,6 @@ return /******/ (function(modules) { // webpackBootstrap var biggestSize = Math.max(Math.max(node.height, node.radius), node.width); parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth; } - }, { - key: "_placeInTree", /** * determine in which branch the node will be placed. @@ -34058,6 +35040,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param skipMassUpdate * @private */ + }, { + key: "_placeInTree", value: function _placeInTree(parentBranch, node, skipMassUpdate) { if (skipMassUpdate != true || skipMassUpdate === undefined) { // update the mass of the branch. @@ -34084,8 +35068,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_placeInRegion", /** * actually place the node in a region (or branch) @@ -34095,6 +35077,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param region * @private */ + }, { + key: "_placeInRegion", value: function _placeInRegion(parentBranch, node, region) { switch (parentBranch.children[region].childrenCount) { case 0: @@ -34106,7 +35090,7 @@ return /******/ (function(modules) { // webpackBootstrap case 1: // convert into children // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) - // we move one node a pixel and we do not put it in the tree. + // we move one node a little bit and we do not put it in the tree. if (parentBranch.children[region].children.data.x === node.x && parentBranch.children[region].children.data.y === node.y) { node.x += this.seededRandom(); node.y += this.seededRandom(); @@ -34121,8 +35105,6 @@ return /******/ (function(modules) { // webpackBootstrap break; } } - }, { - key: "_splitBranch", /** * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch @@ -34131,6 +35113,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentBranch * @private */ + }, { + key: "_splitBranch", value: function _splitBranch(parentBranch) { // if the branch is shaded with a node, replace the node in the new subset. var containedNode = null; @@ -34151,8 +35135,6 @@ return /******/ (function(modules) { // webpackBootstrap this._placeInTree(parentBranch, containedNode); } } - }, { - key: "_insertRegion", /** * This function subdivides the region into four new segments. @@ -34164,6 +35146,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param parentRange * @private */ + }, { + key: "_insertRegion", value: function _insertRegion(parentBranch, region) { var minX = undefined, maxX = undefined, @@ -34209,8 +35193,6 @@ return /******/ (function(modules) { // webpackBootstrap childrenCount: 0 }; } - }, { - key: "_debug", //--------------------------- DEBUGGING BELOW ---------------------------// @@ -34221,6 +35203,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param color * @private */ + }, { + key: "_debug", value: function _debug(ctx, color) { if (this.barnesHutTree !== undefined) { @@ -34229,8 +35213,6 @@ return /******/ (function(modules) { // webpackBootstrap this._drawBranch(this.barnesHutTree.root, ctx, color); } } - }, { - key: "_drawBranch", /** * This function is for debugging purposes. It draws the branches recursively. @@ -34240,6 +35222,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param color * @private */ + }, { + key: "_drawBranch", value: function _drawBranch(branch, ctx, color) { if (color === undefined) { color = "#FF0000"; @@ -34288,7 +35272,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 92 */ +/* 91 */ /***/ function(module, exports) { "use strict"; @@ -34315,8 +35299,6 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { this.options = options; } - }, { - key: "solve", /** * Calculate the forces the nodes apply on each other based on a repulsion field. @@ -34324,6 +35306,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: "solve", value: function solve() { var dx, dy, distance, fx, fy, repulsingForce, node1, node2; @@ -34383,7 +35367,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 93 */ +/* 92 */ /***/ function(module, exports) { "use strict"; @@ -34410,8 +35394,6 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { this.options = options; } - }, { - key: "solve", /** * Calculate the forces the nodes apply on each other based on a repulsion field. @@ -34419,6 +35401,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: "solve", value: function solve() { var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j; @@ -34474,7 +35458,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 94 */ +/* 93 */ /***/ function(module, exports) { "use strict"; @@ -34501,14 +35485,14 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { this.options = options; } - }, { - key: "solve", /** * This function calculates the springforces on the nodes, accounting for the support nodes. * * @private */ + }, { + key: "solve", value: function solve() { var edgeLength = undefined, edge = undefined; @@ -34542,8 +35526,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_calculateSpringForce", /** * This is the code actually performing the calculation for the function above. @@ -34553,6 +35535,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param edgeLength * @private */ + }, { + key: "_calculateSpringForce", value: function _calculateSpringForce(node1, node2, edgeLength) { var dx = node1.x - node2.x; var dy = node1.y - node2.y; @@ -34584,7 +35568,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 95 */ +/* 94 */ /***/ function(module, exports) { "use strict"; @@ -34611,14 +35595,14 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { this.options = options; } - }, { - key: "solve", /** * This function calculates the springforces on the nodes, accounting for the support nodes. * * @private */ + }, { + key: "solve", value: function solve() { var edgeLength, edge; var dx, dy, fx, fy, springForce, distance; @@ -34713,7 +35697,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 96 */ +/* 95 */ /***/ function(module, exports) { "use strict"; @@ -34761,13 +35745,13 @@ return /******/ (function(modules) { // webpackBootstrap this._calculateForces(distance, dx, dy, forces, node); } } - }, { - key: "_calculateForces", /** * Calculate the forces based on the distance. * @private */ + }, { + key: "_calculateForces", value: function _calculateForces(distance, dx, dy, forces, node) { var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance; forces[node.id].x = dx * gravityForce; @@ -34782,7 +35766,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 97 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -34793,15 +35777,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _BarnesHutSolver2 = __webpack_require__(91); + var _BarnesHutSolver2 = __webpack_require__(90); var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2); @@ -34814,19 +35798,19 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(ForceAtlas2BasedRepulsionSolver.prototype), "constructor", this).call(this, body, physicsBody, options); } + /** + * Calculate the forces based on the distance. + * + * @param distance + * @param dx + * @param dy + * @param node + * @param parentBranch + * @private + */ + _createClass(ForceAtlas2BasedRepulsionSolver, [{ key: "_calculateForces", - - /** - * Calculate the forces based on the distance. - * - * @param distance - * @param dx - * @param dy - * @param node - * @param parentBranch - * @private - */ value: function _calculateForces(distance, dx, dy, node, parentBranch) { if (distance === 0) { distance = 0.1 * Math.random(); @@ -34856,7 +35840,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 98 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -34867,15 +35851,15 @@ return /******/ (function(modules) { // webpackBootstrap 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _CentralGravitySolver2 = __webpack_require__(96); + var _CentralGravitySolver2 = __webpack_require__(95); var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2); @@ -34888,13 +35872,13 @@ return /******/ (function(modules) { // webpackBootstrap _get(Object.getPrototypeOf(ForceAtlas2BasedCentralGravitySolver.prototype), "constructor", this).call(this, body, physicsBody, options); } + /** + * Calculate the forces based on the distance. + * @private + */ + _createClass(ForceAtlas2BasedCentralGravitySolver, [{ key: "_calculateForces", - - /** - * Calculate the forces based on the distance. - * @private - */ value: function _calculateForces(distance, dx, dy, forces, node) { if (distance > 0) { var degree = node.edges.length + 1; @@ -34912,7 +35896,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 99 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -34927,6 +35911,10 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _NetworkUtil = __webpack_require__(99); + + var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); + var _componentsNodesCluster = __webpack_require__(100); var _componentsNodesCluster2 = _interopRequireDefault(_componentsNodesCluster); @@ -34941,13 +35929,14 @@ return /******/ (function(modules) { // webpackBootstrap this.body = body; this.clusteredNodes = {}; + this.clusteredEdges = {}; this.options = {}; this.defaultOptions = {}; util.extend(this.options, this.defaultOptions); this.body.emitter.on('_resetData', function () { - _this.clusteredNodes = {}; + _this.clusteredNodes = {};_this.clusteredEdges = {}; }); } @@ -34956,18 +35945,18 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options) { if (options !== undefined) {} } - }, { - key: 'clusterByHubsize', /** * * @param hubsize * @param options */ + }, { + key: 'clusterByHubsize', value: function clusterByHubsize(hubsize, options) { if (hubsize === undefined) { hubsize = this._getHubSize(); - } else if (typeof hubsize === 'object') { + } else if (typeof hubsize === "object") { options = this._checkOptions(hubsize); hubsize = this._getHubSize(); } @@ -34986,20 +35975,20 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('_dataChanged'); } - }, { - key: 'cluster', /** * loop over all nodes, check if they adhere to the condition and cluster if needed. * @param options * @param refreshData */ + }, { + key: 'cluster', value: function cluster() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; if (options.joinCondition === undefined) { - throw new Error('Cannot call clusterByNodeData without a joinCondition function in the options.'); + throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options."); } // check if the options object is fine, append if needed @@ -35012,14 +36001,14 @@ return /******/ (function(modules) { // webpackBootstrap for (var i = 0; i < this.body.nodeIndices.length; i++) { var nodeId = this.body.nodeIndices[i]; var node = this.body.nodes[nodeId]; - var clonedOptions = this._cloneOptions(node); + var clonedOptions = _NetworkUtil2['default'].cloneOptions(node); if (options.joinCondition(clonedOptions) === true) { childNodesObj[nodeId] = this.body.nodes[nodeId]; // collect the nodes that will be in the cluster for (var _i = 0; _i < node.edges.length; _i++) { var edge = node.edges[_i]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { childEdgesObj[edge.id] = edge; } } @@ -35028,8 +36017,6 @@ return /******/ (function(modules) { // webpackBootstrap this._cluster(childNodesObj, childEdgesObj, options, refreshData); } - }, { - key: 'clusterByEdgeCount', /** * Cluster all nodes in the network that have only X edges @@ -35037,6 +36024,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { + key: 'clusterByEdgeCount', value: function clusterByEdgeCount(edgeCount, options) { var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; @@ -35047,7 +36036,7 @@ return /******/ (function(modules) { // webpackBootstrap edges = undefined, node = undefined, nodeId = undefined, - visibleEdges = undefined; + relevantEdgeCount = undefined; // collect the nodes that will be in the cluster for (var i = 0; i < this.body.nodeIndices.length; i++) { var childNodesObj = {}; @@ -35056,46 +36045,42 @@ return /******/ (function(modules) { // webpackBootstrap // if this node is already used in another cluster this session, we do not have to re-evaluate it. if (usedNodes[nodeId] === undefined) { - visibleEdges = 0; + relevantEdgeCount = 0; node = this.body.nodes[nodeId]; edges = []; for (var j = 0; j < node.edges.length; j++) { edge = node.edges[j]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { + if (edge.toId !== edge.fromId) { + relevantEdgeCount++; + } edges.push(edge); } } // this node qualifies, we collect its neighbours to start the clustering process. - if (edges.length === edgeCount) { + if (relevantEdgeCount === edgeCount) { var gatheringSuccessful = true; for (var j = 0; j < edges.length; j++) { edge = edges[j]; var childNodeId = this._getConnectedId(edge, nodeId); - // if unused and if not referencing itself - if (childNodeId !== nodeId && usedNodes[nodeId] === undefined) { - // add the nodes to the list by the join condition. - if (options.joinCondition === undefined) { + // add the nodes to the list by the join condition. + if (options.joinCondition === undefined) { + childEdgesObj[edge.id] = edge; + childNodesObj[nodeId] = this.body.nodes[nodeId]; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + usedNodes[nodeId] = true; + } else { + var clonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[nodeId]); + if (options.joinCondition(clonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[nodeId] = this.body.nodes[nodeId]; - childNodesObj[childNodeId] = this.body.nodes[childNodeId]; usedNodes[nodeId] = true; } else { - var clonedOptions = this._cloneOptions(this.body.nodes[nodeId]); - if (options.joinCondition(clonedOptions) === true) { - childEdgesObj[edge.id] = edge; - childNodesObj[nodeId] = this.body.nodes[nodeId]; - usedNodes[nodeId] = true; - } else { - // this node does not qualify after all. - gatheringSuccessful = false; - break; - } + // this node does not qualify after all. + gatheringSuccessful = false; + break; } - } else { - // this node does not qualify after all. - gatheringSuccessful = false; - break; } } @@ -35115,34 +36100,32 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('_dataChanged'); } } - }, { - key: 'clusterOutliers', /** * Cluster all nodes in the network that have only 1 edge * @param options * @param refreshData */ + }, { + key: 'clusterOutliers', value: function clusterOutliers(options) { var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; this.clusterByEdgeCount(1, options, refreshData); } - }, { - key: 'clusterBridges', /** * Cluster all nodes in the network that have only 2 edge * @param options * @param refreshData */ + }, { + key: 'clusterBridges', value: function clusterBridges(options) { var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; this.clusterByEdgeCount(2, options, refreshData); } - }, { - key: 'clusterByConnection', /** * suck all connected nodes of a node into the node. @@ -35150,15 +36133,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param options * @param refreshData */ + }, { + key: 'clusterByConnection', value: function clusterByConnection(nodeId, options) { var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; // kill conditions if (nodeId === undefined) { - throw new Error('No nodeId supplied to clusterByConnection!'); + throw new Error("No nodeId supplied to clusterByConnection!"); } if (this.body.nodes[nodeId] === undefined) { - throw new Error('The nodeId given to clusterByConnection does not exist!'); + throw new Error("The nodeId given to clusterByConnection does not exist!"); } var node = this.body.nodes[nodeId]; @@ -35178,16 +36163,16 @@ return /******/ (function(modules) { // webpackBootstrap var childNodesObj = {}; var childEdgesObj = {}; var parentNodeId = node.id; - var parentClonedOptions = this._cloneOptions(node); + var parentClonedOptions = _NetworkUtil2['default'].cloneOptions(node); childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { var childNodeId = this._getConnectedId(edge, parentNodeId); - // if the child node is not in a cluster (may not be needed now with the edge.hiddenByCluster check) + // if the child node is not in a cluster if (this.clusteredNodes[childNodeId] === undefined) { if (childNodeId !== parentNodeId) { if (options.joinCondition === undefined) { @@ -35195,7 +36180,7 @@ return /******/ (function(modules) { // webpackBootstrap childNodesObj[childNodeId] = this.body.nodes[childNodeId]; } else { // clone the options and insert some additional parameters that could be interesting. - var childClonedOptions = this._cloneOptions(this.body.nodes[childNodeId]); + var childClonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[childNodeId]); if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[childNodeId] = this.body.nodes[childNodeId]; @@ -35211,41 +36196,20 @@ return /******/ (function(modules) { // webpackBootstrap this._cluster(childNodesObj, childEdgesObj, options, refreshData); } - }, { - key: '_cloneOptions', - - /** - * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. - * @param objId - * @param type - * @returns {{}} - * @private - */ - value: function _cloneOptions(item, type) { - var clonedOptions = {}; - if (type === undefined || type === 'node') { - util.deepExtend(clonedOptions, item.options, true); - clonedOptions.x = item.x; - clonedOptions.y = item.y; - clonedOptions.amountOfConnections = item.edges.length; - } else { - util.deepExtend(clonedOptions, item.options, true); - } - return clonedOptions; - } - }, { - key: '_createClusterEdges', /** * This function creates the edges that will be attached to the cluster * It looks for edges that are connected to the nodes from the "outside' of the cluster. * * @param childNodesObj - * @param newEdges - * @param options + * @param childEdgesObj + * @param clusterNodeProperties + * @param clusterEdgeProperties * @private */ - value: function _createClusterEdges(childNodesObj, clusterNodeProperties, clusterEdgeProperties) { + }, { + key: '_createClusterEdges', + value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { var edge = undefined, childNodeId = undefined, childNode = undefined, @@ -35265,17 +36229,22 @@ return /******/ (function(modules) { // webpackBootstrap for (var j = 0; j < childNode.edges.length; j++) { edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process. - if (edge.hiddenByCluster !== true) { - // set up the from and to. - if (edge.toId == childNodeId) { - // this is a double equals because ints and strings can be interchanged here. - toId = clusterNodeProperties.id; - fromId = edge.fromId; - otherNodeId = fromId; + if (this.clusteredEdges[edge.id] === undefined) { + // self-referencing edges will be added to the "hidden" list + if (edge.toId == edge.fromId) { + childEdgesObj[edge.id] = edge; } else { - toId = edge.toId; - fromId = clusterNodeProperties.id; - otherNodeId = toId; + // set up the from and to. + if (edge.toId == childNodeId) { + // this is a double equals because ints and strings can be interchanged here. + toId = clusterNodeProperties.id; + fromId = edge.fromId; + otherNodeId = fromId; + } else { + toId = edge.toId; + fromId = clusterNodeProperties.id; + otherNodeId = toId; + } } // Only edges from the cluster outwards are being replaced. @@ -35291,7 +36260,7 @@ return /******/ (function(modules) { // webpackBootstrap for (var j = 0; j < createEdges.length; j++) { var _edge = createEdges[j].edge; // copy the options of the edge we will replace - var clonedOptions = this._cloneOptions(_edge, 'edge'); + var clonedOptions = _NetworkUtil2['default'].cloneOptions(_edge, 'edge'); // make sure the properties of clusterEdges are superimposed on it util.deepExtend(clonedOptions, clusterEdgeProperties); @@ -35310,12 +36279,10 @@ return /******/ (function(modules) { // webpackBootstrap newEdge.connect(); // hide the replaced edge + this._backupEdgeOptions(_edge); _edge.setOptions({ physics: false, hidden: true }); - _edge.hiddenByCluster = true; } } - }, { - key: '_checkOptions', /** * This function checks the options that can be supplied to the different cluster functions @@ -35324,6 +36291,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { + key: '_checkOptions', value: function _checkOptions() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; @@ -35336,8 +36305,6 @@ return /******/ (function(modules) { // webpackBootstrap return options; } - }, { - key: '_cluster', /** * @@ -35347,10 +36314,12 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} refreshData | when true, do not wrap up * @private */ + }, { + key: '_cluster', value: function _cluster(childNodesObj, childEdgesObj, options) { var refreshData = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3]; - // kill condition: no children so can't cluster or only one node in the cluster, dont bother + // kill condition: no children so can't cluster or only one node in the cluster, don't bother if (Object.keys(childNodesObj).length < 2) { return; } @@ -35372,18 +36341,18 @@ return /******/ (function(modules) { // webpackBootstrap var childNodesOptions = []; for (var nodeId in childNodesObj) { if (childNodesObj.hasOwnProperty(nodeId)) { - var clonedOptions = this._cloneOptions(childNodesObj[nodeId]); + var clonedOptions = _NetworkUtil2['default'].cloneOptions(childNodesObj[nodeId]); childNodesOptions.push(clonedOptions); } } - // get clusterproperties based on childNodes + // get cluster properties based on childNodes var childEdgesOptions = []; for (var edgeId in childEdgesObj) { if (childEdgesObj.hasOwnProperty(edgeId)) { // these cluster edges will be removed on creation of the cluster. - if (edgeId.substr(0, 12) !== 'clusterEdge:') { - var clonedOptions = this._cloneOptions(childEdgesObj[edgeId], 'edge'); + if (edgeId.substr(0, 12) !== "clusterEdge:") { + var clonedOptions = _NetworkUtil2['default'].cloneOptions(childEdgesObj[edgeId], 'edge'); childEdgesOptions.push(clonedOptions); } } @@ -35391,7 +36360,7 @@ return /******/ (function(modules) { // webpackBootstrap clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions); if (!clusterNodeProperties) { - throw new Error('The processProperties function does not return properties!'); + throw new Error("The processProperties function does not return properties!"); } } @@ -35405,7 +36374,7 @@ return /******/ (function(modules) { // webpackBootstrap clusterNodeProperties.label = 'cluster'; } - // give the clusterNode a postion if it does not have one. + // give the clusterNode a position if it does not have one. var pos = undefined; if (clusterNodeProperties.x === undefined) { pos = this._getClusterPosition(childNodesObj); @@ -35432,16 +36401,18 @@ return /******/ (function(modules) { // webpackBootstrap // finally put the cluster node into global this.body.nodes[clusterNodeProperties.id] = clusterNode; - // create the new edges that will connect to the cluster - this._createClusterEdges(childNodesObj, clusterNodeProperties, options.clusterEdgeProperties); + // create the new edges that will connect to the cluster, all self-referencing edges will be added to childEdgesObject here. + this._createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // disable the childEdges for (var edgeId in childEdgesObj) { if (childEdgesObj.hasOwnProperty(edgeId)) { if (this.body.edges[edgeId] !== undefined) { var edge = this.body.edges[edgeId]; + // cache the options before changing + this._backupEdgeOptions(edge); + // disable physics and hide the edge edge.setOptions({ physics: false, hidden: true }); - edge.hiddenByCluster = true; } } } @@ -35463,23 +36434,37 @@ return /******/ (function(modules) { // webpackBootstrap } } }, { - key: 'isCluster', + key: '_backupEdgeOptions', + value: function _backupEdgeOptions(edge) { + if (this.clusteredEdges[edge.id] === undefined) { + this.clusteredEdges[edge.id] = { physics: edge.options.physics, hidden: edge.options.hidden }; + } + } + }, { + key: '_restoreEdge', + value: function _restoreEdge(edge) { + var originalOptions = this.clusteredEdges[edge.id]; + if (originalOptions !== undefined) { + edge.setOptions({ physics: originalOptions.physics, hidden: originalOptions.hidden }); + delete this.clusteredEdges[edge.id]; + } + } /** * Check if a node is a cluster. * @param nodeId * @returns {*} */ + }, { + key: 'isCluster', value: function isCluster(nodeId) { if (this.body.nodes[nodeId] !== undefined) { return this.body.nodes[nodeId].isCluster === true; } else { - console.log('Node does not exist.'); + console.log("Node does not exist."); return false; } } - }, { - key: '_getClusterPosition', /** * get the position of the cluster node based on what's inside @@ -35487,6 +36472,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @private */ + }, { + key: '_getClusterPosition', value: function _getClusterPosition(childNodesObj) { var childKeys = Object.keys(childNodesObj); var minX = childNodesObj[childKeys[0]].x; @@ -35504,26 +36491,26 @@ return /******/ (function(modules) { // webpackBootstrap return { x: 0.5 * (minX + maxX), y: 0.5 * (minY + maxY) }; } - }, { - key: 'openCluster', /** * Open a cluster by calling this function. * @param {String} clusterNodeId | the ID of the cluster node * @param {Boolean} refreshData | wrap up afterwards if not true */ + }, { + key: 'openCluster', value: function openCluster(clusterNodeId, options) { var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; // kill conditions if (clusterNodeId === undefined) { - throw new Error('No clusterNodeId supplied to openCluster.'); + throw new Error("No clusterNodeId supplied to openCluster."); } if (this.body.nodes[clusterNodeId] === undefined) { - throw new Error('The clusterNodeId supplied to openCluster does not exist.'); + throw new Error("The clusterNodeId supplied to openCluster does not exist."); } if (this.body.nodes[clusterNodeId].containedNodes === undefined) { - console.log('The node:' + clusterNodeId + ' is not a cluster.'); + console.log("The node:" + clusterNodeId + " is not a cluster."); return; } var clusterNode = this.body.nodes[clusterNodeId]; @@ -35558,8 +36545,12 @@ return /******/ (function(modules) { // webpackBootstrap var containedNode = this.body.nodes[nodeId]; containedNode = containedNodes[nodeId]; // inherit position - containedNode.x = clusterNode.x; - containedNode.y = clusterNode.y; + if (containedNode.options.fixed.x === false) { + containedNode.x = clusterNode.x; + } + if (containedNode.options.fixed.y === false) { + containedNode.y = clusterNode.y; + } } } } @@ -35573,7 +36564,7 @@ return /******/ (function(modules) { // webpackBootstrap containedNode.vx = clusterNode.vx; containedNode.vy = clusterNode.vy; - // we use these methods to avoid reinstantiating the shape, which happens with setOptions. + // we use these methods to avoid re-instantiating the shape, which happens with setOptions. containedNode.setOptions({ hidden: false, physics: true }); delete this.clusteredNodes[nodeId]; @@ -35613,7 +36604,7 @@ return /******/ (function(modules) { // webpackBootstrap } // clone the options and apply the cluster options to them - var clonedOptions = this._cloneOptions(transferEdge, 'edge'); + var clonedOptions = _NetworkUtil2['default'].cloneOptions(transferEdge, 'edge'); util.deepExtend(clonedOptions, otherCluster.clusterEdgeProperties); // apply the edge specific options to it. @@ -35629,8 +36620,7 @@ return /******/ (function(modules) { // webpackBootstrap } else { var replacedEdge = this.body.edges[edge.clusteringEdgeReplacingId]; if (replacedEdge !== undefined) { - replacedEdge.setOptions({ physics: true, hidden: false }); - replacedEdge.hiddenByCluster = false; + this._restoreEdge(replacedEdge); } } edge.cleanup(); @@ -35642,8 +36632,7 @@ return /******/ (function(modules) { // webpackBootstrap // handle the releasing of the edges for (var edgeId in containedEdges) { if (containedEdges.hasOwnProperty(edgeId)) { - var edge = containedEdges[edgeId]; - edge.setOptions({ physics: true, hidden: false }); + this._restoreEdge(containedEdges[edgeId]); } } @@ -35662,37 +36651,36 @@ return /******/ (function(modules) { // webpackBootstrap var containedNodes = this.body.nodes[clusterId].containedNodes; for (var nodeId in containedNodes) { if (containedNodes.hasOwnProperty(nodeId)) { - nodesArray.push(nodeId); + nodesArray.push(this.body.nodes[nodeId].id); } } } return nodesArray; } - }, { - key: 'findNode', /** * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node * @param nodeId * @returns {Array} - * @private */ + }, { + key: 'findNode', value: function findNode(nodeId) { var stack = []; var max = 100; var counter = 0; while (this.clusteredNodes[nodeId] !== undefined && counter < max) { - stack.push(this.clusteredNodes[nodeId].node); + stack.push(this.body.nodes[nodeId].id); nodeId = this.clusteredNodes[nodeId].clusterId; counter++; } - stack.push(this.body.nodes[nodeId]); + stack.push(this.body.nodes[nodeId].id); + stack.reverse(); + return stack; } - }, { - key: '_getConnectedId', /** * Get the Id the node is connected to @@ -35701,6 +36689,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { + key: '_getConnectedId', value: function _getConnectedId(edge, nodeId) { if (edge.toId != nodeId) { return edge.toId; @@ -35710,8 +36700,6 @@ return /******/ (function(modules) { // webpackBootstrap return edge.fromId; } } - }, { - key: '_getHubSize', /** * We determine how many connections denote an important hub. @@ -35719,6 +36707,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: '_getHubSize', value: function _getHubSize() { var average = 0; var averageSquared = 0; @@ -35757,6 +36747,141 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = ClusterEngine; module.exports = exports['default']; +/***/ }, +/* 99 */ +/***/ 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 NetworkUtil = (function () { + function NetworkUtil() { + _classCallCheck(this, NetworkUtil); + } + + /** + * Find the center position of the network considering the bounding boxes + */ + + _createClass(NetworkUtil, null, [{ + key: "getRange", + value: function getRange(allNodes) { + var specificNodes = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; + + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.shape.boundingBox.left) { + minX = node.shape.boundingBox.left; + } + if (maxX < node.shape.boundingBox.right) { + maxX = node.shape.boundingBox.right; + } + if (minY > node.shape.boundingBox.top) { + minY = node.shape.boundingBox.top; + } // top is negative, bottom is positive + if (maxY < node.shape.boundingBox.bottom) { + maxY = node.shape.boundingBox.bottom; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; + } + + /** + * Find the center position of the network + */ + }, { + key: "getRangeCore", + value: function getRangeCore(allNodes) { + var specificNodes = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; + + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.x) { + minX = node.x; + } + if (maxX < node.x) { + maxX = node.x; + } + if (minY > node.y) { + minY = node.y; + } // top is negative, bottom is positive + if (maxY < node.y) { + maxY = node.y; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; + } + + /** + * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + * @returns {{x: number, y: number}} + */ + }, { + key: "findCenter", + value: function findCenter(range) { + return { x: 0.5 * (range.maxX + range.minX), + y: 0.5 * (range.maxY + range.minY) }; + } + + /** + * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. + * @param item + * @param type + * @returns {{}} + */ + }, { + key: "cloneOptions", + value: function cloneOptions(item, type) { + var clonedOptions = {}; + if (type === undefined || type === 'node') { + util.deepExtend(clonedOptions, item.options, true); + clonedOptions.x = item.x; + clonedOptions.y = item.y; + clonedOptions.amountOfConnections = item.edges.length; + } else { + util.deepExtend(clonedOptions, item.options, true); + } + return clonedOptions; + } + }]); + + return NetworkUtil; + })(); + + exports["default"] = NetworkUtil; + module.exports = exports["default"]; + /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { @@ -35767,15 +36892,15 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; 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(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; 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; desc = parent = undefined; continue _function; } } 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 }; } 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; } + 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) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var _Node2 = __webpack_require__(62); + var _Node2 = __webpack_require__(61); var _Node3 = _interopRequireDefault(_Node2); @@ -35854,33 +36979,33 @@ return /******/ (function(modules) { // webpackBootstrap value: function bindEventListeners() { var _this = this; - this.body.emitter.on('dragStart', function () { + this.body.emitter.on("dragStart", function () { _this.dragging = true; }); - this.body.emitter.on('dragEnd', function () { + this.body.emitter.on("dragEnd", function () { return _this.dragging = false; }); - this.body.emitter.on('_resizeNodes', function () { + this.body.emitter.on("_resizeNodes", function () { return _this._resizeNodes(); }); - this.body.emitter.on('_redraw', function () { + this.body.emitter.on("_redraw", function () { if (_this.renderingActive === false) { _this._redraw(); } }); - this.body.emitter.on('_blockRedraw', function () { + this.body.emitter.on("_blockRedraw", function () { _this.allowRedraw = false; }); - this.body.emitter.on('_allowRedraw', function () { + this.body.emitter.on("_allowRedraw", function () { _this.allowRedraw = true;_this.redrawRequested = false; }); - this.body.emitter.on('_requestRedraw', this._requestRedraw.bind(this)); - this.body.emitter.on('_startRendering', function () { + this.body.emitter.on("_requestRedraw", this._requestRedraw.bind(this)); + this.body.emitter.on("_startRendering", function () { _this.renderRequests += 1; _this.renderingActive = true; _this._startRendering(); }); - this.body.emitter.on('_stopRendering', function () { + this.body.emitter.on("_stopRendering", function () { _this.renderRequests -= 1; _this.renderingActive = _this.renderRequests > 0; _this.renderTimer = undefined; @@ -35913,8 +37038,8 @@ return /******/ (function(modules) { // webpackBootstrap if (this.requiresTimeout === true) { this.renderTimer = window.setTimeout(this._renderStep.bind(this), this.simulationInterval); // wait this.renderTimeStep milliseconds and perform the animation step function } else { - this.renderTimer = window.requestAnimationFrame(this._renderStep.bind(this)); // wait this.renderTimeStep milliseconds and perform the animation step function - } + this.renderTimer = window.requestAnimationFrame(this._renderStep.bind(this)); // wait this.renderTimeStep milliseconds and perform the animation step function + } } } } @@ -35938,25 +37063,25 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'redraw', /** * Redraw the network with the current data * chart will be resized too. */ + }, { + key: 'redraw', value: function redraw() { this.body.emitter.emit('setSize'); this._redraw(); } - }, { - key: '_requestRedraw', /** * Redraw the network with the current data * @param hidden | used to get the first estimate of the node sizes. only the nodes are drawn after which they are quickly drawn over. * @private */ + }, { + key: '_requestRedraw', value: function _requestRedraw() { var _this2 = this; @@ -35979,7 +37104,7 @@ return /******/ (function(modules) { // webpackBootstrap var hidden = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; if (this.allowRedraw === true) { - this.body.emitter.emit('initRedraw'); + this.body.emitter.emit("initRedraw"); this.redrawRequested = false; var ctx = this.canvas.frame.canvas.getContext('2d'); @@ -35989,9 +37114,7 @@ return /******/ (function(modules) { // webpackBootstrap this.canvas.setSize(); } - if (this.pixelRatio === undefined) { - this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); - } + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); @@ -36000,13 +37123,18 @@ return /******/ (function(modules) { // webpackBootstrap var h = this.canvas.frame.canvas.clientHeight; ctx.clearRect(0, 0, w, h); + // if the div is hidden, we stop the redraw here for performance. + if (this.canvas.frame.clientWidth === 0) { + return; + } + // set scaling and translation ctx.save(); ctx.translate(this.body.view.translation.x, this.body.view.translation.y); ctx.scale(this.body.view.scale, this.body.view.scale); ctx.beginPath(); - this.body.emitter.emit('beforeDrawing', ctx); + this.body.emitter.emit("beforeDrawing", ctx); ctx.closePath(); if (hidden === false) { @@ -36019,24 +37147,17 @@ return /******/ (function(modules) { // webpackBootstrap this._drawNodes(ctx, hidden); } - if (this.controlNodesActive === true) { - this._drawControlNodes(ctx); - } - ctx.beginPath(); - //this.physics.nodesSolver._debug(ctx,"#F00F0F"); - this.body.emitter.emit('afterDrawing', ctx); + this.body.emitter.emit("afterDrawing", ctx); ctx.closePath(); + // restore original scaling and translation ctx.restore(); - if (hidden === true) { ctx.clearRect(0, 0, w, h); } } } - }, { - key: '_resizeNodes', /** * Redraw all nodes @@ -36045,6 +37166,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} [alwaysShow] * @private */ + }, { + key: '_resizeNodes', value: function _resizeNodes() { var ctx = this.canvas.frame.canvas.getContext('2d'); if (this.pixelRatio === undefined) { @@ -36070,8 +37193,6 @@ return /******/ (function(modules) { // webpackBootstrap // restore original scaling and translation ctx.restore(); } - }, { - key: '_drawNodes', /** * Redraw all nodes @@ -36080,6 +37201,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Boolean} [alwaysShow] * @private */ + }, { + key: '_drawNodes', value: function _drawNodes(ctx) { var alwaysShow = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; @@ -36118,8 +37241,6 @@ return /******/ (function(modules) { // webpackBootstrap node.draw(ctx); } } - }, { - key: '_drawEdges', /** * Redraw all edges @@ -36127,6 +37248,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {CanvasRenderingContext2D} ctx * @private */ + }, { + key: '_drawEdges', value: function _drawEdges(ctx) { var edges = this.body.edges; var edgeIndices = this.body.edgeIndices; @@ -36139,33 +37262,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_drawControlNodes', - - /** - * Redraw all edges - * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d'); - * @param {CanvasRenderingContext2D} ctx - * @private - */ - value: function _drawControlNodes(ctx) { - var edges = this.body.edges; - var edgeIndices = this.body.edgeIndices; - var edge = undefined; - - for (var i = 0; i < edgeIndices.length; i++) { - edge = edges[edgeIndices[i]]; - edge._drawControlNodes(ctx); - } - } - }, { - key: '_determineBrowserMethod', /** * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because * some implementations (safari and IE9) did not support requestAnimationFrame * @private */ + }, { + key: '_determineBrowserMethod', value: function _determineBrowserMethod() { if (typeof window !== 'undefined') { var browserType = navigator.userAgent.toLowerCase(); @@ -36206,7 +37310,7 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(25); + var hammerUtil = __webpack_require__(24); var util = __webpack_require__(1); @@ -36227,6 +37331,7 @@ return /******/ (function(modules) { // webpackBootstrap this.resizeTimer = undefined; this.resizeFunction = this._onResize.bind(this); this.cameraState = {}; + this.initialized = false; this.options = {}; this.defaultOptions = { @@ -36245,7 +37350,7 @@ return /******/ (function(modules) { // webpackBootstrap var _this = this; // bind the events - this.body.emitter.once('resize', function (obj) { + this.body.emitter.once("resize", function (obj) { if (obj.width !== 0) { _this.body.view.translation.x = obj.width * 0.5; } @@ -36253,8 +37358,8 @@ 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.body.emitter.on("setSize", this.setSize.bind(this)); + this.body.emitter.on("destroy", function () { _this.hammerFrame.destroy(); _this.hammer.destroy(); _this._cleanUp(); @@ -36276,7 +37381,7 @@ return /******/ (function(modules) { // webpackBootstrap this.resizeTimer = setInterval(function () { var changed = _this2.setSize(); if (changed === true) { - _this2.body.emitter.emit('_requestRedraw'); + _this2.body.emitter.emit("_requestRedraw"); } }, 1000); this.resizeFunction = this._onResize.bind(this); @@ -36297,39 +37402,60 @@ return /******/ (function(modules) { // webpackBootstrap key: '_onResize', value: function _onResize() { this.setSize(); - this.body.emitter.emit('_redraw'); + this.body.emitter.emit("_redraw"); } - }, { - key: '_getCameraState', /** * Get and store the cameraState * @private */ + }, { + key: '_getCameraState', value: function _getCameraState() { - this.cameraState.previousWidth = this.frame.canvas.width; - this.cameraState.scale = this.body.view.scale; - this.cameraState.position = this.DOMtoCanvas({ x: 0.5 * this.frame.canvas.width, y: 0.5 * this.frame.canvas.height }); + var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? this.pixelRatio : arguments[0]; + + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } } - }, { - key: '_setCameraState', /** * Set the cameraState * @private */ + }, { + key: '_setCameraState', value: function _setCameraState() { - if (this.cameraState.scale !== undefined) { - this.body.view.scale = this.body.view.scale * (this.frame.canvas.clientWidth / this.cameraState.previousWidth); + if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0) { + + var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth; + var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight; + var newScale = this.cameraState.scale; + + if (widthRatio != 1 && heightRatio != 1) { + newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio); + } else if (widthRatio != 1) { + newScale = this.cameraState.scale * widthRatio; + } else if (heightRatio != 1) { + newScale = this.cameraState.scale * heightRatio; + } + this.body.view.scale = newScale; // this comes from the view module. - var viewCenter = this.DOMtoCanvas({ + var currentViewCenter = this.DOMtoCanvas({ x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight }); + var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node - x: viewCenter.x - this.cameraState.position.x, - y: viewCenter.y - this.cameraState.position.y + x: currentViewCenter.x - this.cameraState.position.x, + y: currentViewCenter.y - this.cameraState.position.y }; this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale; this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale; @@ -36347,14 +37473,14 @@ return /******/ (function(modules) { // webpackBootstrap return value + 'px'; } } - throw new Error('Could not use the value supplie for width or height:' + value); + throw new Error('Could not use the value supplied for width or height:' + value); } - }, { - key: '_create', /** * Create the HTML */ + }, { + key: '_create', value: function _create() { // remove all elements from the container element. while (this.body.container.hasChildNodes()) { @@ -36369,7 +37495,7 @@ return /******/ (function(modules) { // webpackBootstrap ////////////////////////////////////////////////////////////////// - this.frame.canvas = document.createElement('canvas'); + this.frame.canvas = document.createElement("canvas"); this.frame.canvas.style.position = 'relative'; this.frame.appendChild(this.frame.canvas); @@ -36381,10 +37507,10 @@ return /******/ (function(modules) { // webpackBootstrap noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; this.frame.canvas.appendChild(noCanvas); } else { - var ctx = this.frame.canvas.getContext('2d'); + var ctx = this.frame.canvas.getContext("2d"); this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); - this.frame.canvas.getContext('2d').setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + this.frame.canvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); } // add the frame to the container element @@ -36395,13 +37521,13 @@ return /******/ (function(modules) { // webpackBootstrap this._bindHammer(); } - }, { - key: '_bindHammer', /** * This function binds hammer, it can be repeated over and over due to the uniqueness check. * @private */ + }, { + key: '_bindHammer', value: function _bindHammer() { var _this3 = this; @@ -36462,8 +37588,6 @@ return /******/ (function(modules) { // webpackBootstrap _this3.body.eventListeners.onRelease(event); }); } - }, { - key: 'setSize', /** * Set a new size for the network @@ -36472,11 +37596,12 @@ return /******/ (function(modules) { // webpackBootstrap * @param {string} height Height in pixels or percentage (for example '400px' * or '30%') */ + }, { + key: 'setSize', value: function setSize() { var width = arguments.length <= 0 || arguments[0] === undefined ? this.options.width : arguments[0]; var height = arguments.length <= 1 || arguments[1] === undefined ? this.options.height : arguments[1]; - this._getCameraState(); width = this._prepareValue(width); height = this._prepareValue(height); @@ -36484,7 +37609,14 @@ return /******/ (function(modules) { // webpackBootstrap var oldWidth = this.frame.canvas.width; var oldHeight = this.frame.canvas.height; + // update the pixel ratio + var ctx = this.frame.canvas.getContext("2d"); + var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) { + this._getCameraState(previousRatio); + this.frame.style.width = width; this.frame.style.height = height; @@ -36502,6 +37634,11 @@ return /******/ (function(modules) { // webpackBootstrap // this would adapt the width of the canvas to the width from 100% if and only if // there is a change. + // store the camera if there is a change in size. + if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio) || this.frame.canvas.height != Math.round(this.frame.canvas.clientHeight * this.pixelRatio)) { + this._getCameraState(previousRatio); + } + if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio)) { this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); emitEvent = true; @@ -36519,8 +37656,13 @@ return /******/ (function(modules) { // webpackBootstrap oldWidth: Math.round(oldWidth / this.pixelRatio), oldHeight: Math.round(oldHeight / this.pixelRatio) }); + + // restore the camera on change. + this._setCameraState(); } - this._setCameraState(); + + // set initialized so the get and set camera will work from now on. + this.initialized = true; return emitEvent; } }, { @@ -36536,8 +37678,6 @@ return /******/ (function(modules) { // webpackBootstrap value: function _XconvertDOMtoCanvas(x) { return (x - this.body.view.translation.x) / this.body.view.scale; } - }, { - key: '_XconvertCanvasToDOM', /** * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to @@ -36546,11 +37686,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_XconvertCanvasToDOM', value: function _XconvertCanvasToDOM(x) { return x * this.body.view.scale + this.body.view.translation.x; } - }, { - key: '_YconvertDOMtoCanvas', /** * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to @@ -36559,11 +37699,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_YconvertDOMtoCanvas', value: function _YconvertDOMtoCanvas(y) { return (y - this.body.view.translation.y) / this.body.view.scale; } - }, { - key: '_YconvertCanvasToDOM', /** * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to @@ -36572,11 +37712,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_YconvertCanvasToDOM', value: function _YconvertCanvasToDOM(y) { return y * this.body.view.scale + this.body.view.translation.y; } - }, { - key: 'canvasToDOM', /** * @@ -36584,11 +37724,11 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @constructor */ + }, { + key: 'canvasToDOM', value: function canvasToDOM(pos) { return { x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y) }; } - }, { - key: 'DOMtoCanvas', /** * @@ -36596,6 +37736,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{x: number, y: number}} * @constructor */ + }, { + key: 'DOMtoCanvas', value: function DOMtoCanvas(pos) { return { x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y) }; } @@ -36611,15 +37753,21 @@ return /******/ (function(modules) { // webpackBootstrap /* 103 */ /***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; - Object.defineProperty(exports, "__esModule", { + 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 _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"); } } + 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 _NetworkUtil = __webpack_require__(99); + + var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); var util = __webpack_require__(1); @@ -36653,92 +37801,29 @@ return /******/ (function(modules) { // webpackBootstrap } _createClass(View, [{ - key: "setOptions", + key: 'setOptions', value: function setOptions() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; this.options = options; } - }, { - key: "_getRange", - - /** - * Find the center position of the network - * @private - */ - value: function _getRange() { - var specificNodes = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; - - var minY = 1e9, - maxY = -1e9, - minX = 1e9, - maxX = -1e9, - node; - if (specificNodes.length > 0) { - for (var i = 0; i < specificNodes.length; i++) { - node = this.body.nodes[specificNodes[i]]; - if (minX > node.shape.boundingBox.left) { - minX = node.shape.boundingBox.left; - } - if (maxX < node.shape.boundingBox.right) { - maxX = node.shape.boundingBox.right; - } - if (minY > node.shape.boundingBox.top) { - minY = node.shape.boundingBox.top; - } // top is negative, bottom is positive - if (maxY < node.shape.boundingBox.bottom) { - maxY = node.shape.boundingBox.bottom; - } // top is negative, bottom is positive - } - } else { - for (var i = 0; i < this.body.nodeIndices.length; i++) { - node = this.body.nodes[this.body.nodeIndices[i]]; - if (minX > node.shape.boundingBox.left) { - minX = node.shape.boundingBox.left; - } - if (maxX < node.shape.boundingBox.right) { - maxX = node.shape.boundingBox.right; - } - if (minY > node.shape.boundingBox.top) { - minY = node.shape.boundingBox.top; - } // top is negative, bottom is positive - if (maxY < node.shape.boundingBox.bottom) { - maxY = node.shape.boundingBox.bottom; - } // top is negative, bottom is positive - } - } - - if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { - minY = 0, maxY = 0, minX = 0, maxX = 0; - } - return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; - } - }, { - key: "_findCenter", - - /** - * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; - * @returns {{x: number, y: number}} - * @private - */ - value: function _findCenter(range) { - return { x: 0.5 * (range.maxX + range.minX), - y: 0.5 * (range.maxY + range.minY) }; - } - }, { - key: "fit", /** * This function zooms out to fit all data on screen based on amount of nodes * @param {Object} Options * @param {Boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false; */ + }, { + key: 'fit', value: function fit() { var options = arguments.length <= 0 || arguments[0] === undefined ? { nodes: [] } : arguments[0]; var initialZoom = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; - var range; - var zoomLevel; + var range = undefined; + var zoomLevel = undefined; + if (options.nodes === undefined || options.nodes.length === 0) { + options.nodes = this.body.nodeIndices; + } if (initialZoom === true) { // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation. @@ -36756,7 +37841,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - range = this._getRange(options.nodes); + range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes); var numberOfNodes = this.body.nodeIndices.length; zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. @@ -36766,7 +37851,7 @@ return /******/ (function(modules) { // webpackBootstrap zoomLevel *= factor; } else { this.body.emitter.emit("_resizeNodes"); - range = this._getRange(options.nodes); + range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes); var xDistance = Math.abs(range.maxX - range.minX) * 1.1; var yDistance = Math.abs(range.maxY - range.minY) * 1.1; @@ -36783,12 +37868,10 @@ return /******/ (function(modules) { // webpackBootstrap zoomLevel = 1.0; } - var center = this._findCenter(range); + var center = _NetworkUtil2['default'].findCenter(range); var animationOptions = { position: center, scale: zoomLevel, animation: options.animation }; this.moveTo(animationOptions); } - }, { - key: "focus", // animation @@ -36798,6 +37881,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} nodeId * @param {Number} [options] */ + }, { + key: 'focus', value: function focus(nodeId) { var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; @@ -36811,8 +37896,6 @@ return /******/ (function(modules) { // webpackBootstrap console.log("Node: " + nodeId + " cannot be found."); } } - }, { - key: "moveTo", /** * @@ -36821,6 +37904,8 @@ return /******/ (function(modules) { // webpackBootstrap * | options.position = {x:Number, y:Number} // position to move to * | options.animation = {duration:Number, easingFunction:String} || Boolean // position to move to */ + }, { + key: 'moveTo', value: function moveTo(options) { if (options === undefined) { options = {}; @@ -36859,8 +37944,6 @@ return /******/ (function(modules) { // webpackBootstrap this.animateView(options); } - }, { - key: "animateView", /** * @@ -36873,6 +37956,8 @@ return /******/ (function(modules) { // webpackBootstrap * // easeInQuart, easeOutQuart, easeInOutQuart, * // easeInQuint, easeOutQuint, easeInOutQuint */ + }, { + key: 'animateView', value: function animateView(options) { if (options === undefined) { return; @@ -36927,13 +38012,13 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit("_startRendering"); } } - }, { - key: "_lockedRedraw", /** * used to animate smoothly by hijacking the redraw function. * @private */ + }, { + key: '_lockedRedraw', value: function _lockedRedraw() { var nodePosition = { x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y }; var viewCenter = this.canvas.DOMtoCanvas({ x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight }); @@ -36950,7 +38035,7 @@ return /******/ (function(modules) { // webpackBootstrap this.body.view.translation = targetTranslation; } }, { - key: "releaseNode", + key: 'releaseNode', value: function releaseNode() { if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) { this.body.emitter.off("initRedraw", this.viewFunction); @@ -36958,14 +38043,14 @@ return /******/ (function(modules) { // webpackBootstrap this.lockedOnNodeOffset = undefined; } } - }, { - key: "_transitionRedraw", /** * * @param easingTime * @private */ + }, { + key: '_transitionRedraw', value: function _transitionRedraw() { var finished = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; @@ -36992,12 +38077,12 @@ return /******/ (function(modules) { // webpackBootstrap } } }, { - key: "getScale", + key: 'getScale', value: function getScale() { return this.body.view.scale; } }, { - key: "getViewPosition", + key: 'getViewPosition', value: function getViewPosition() { return this.canvas.DOMtoCanvas({ x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight }); } @@ -37006,8 +38091,8 @@ return /******/ (function(modules) { // webpackBootstrap return View; })(); - exports["default"] = View; - module.exports = exports["default"]; + exports['default'] = View; + module.exports = exports['default']; /***/ }, /* 104 */ @@ -37117,8 +38202,6 @@ return /******/ (function(modules) { // webpackBootstrap this.navigationHandler.setOptions(this.options); } - }, { - key: 'getPointer', /** * Get the pointer location from a touch location @@ -37126,20 +38209,22 @@ return /******/ (function(modules) { // webpackBootstrap * @return {{x: Number, y: Number}} pointer * @private */ + }, { + key: 'getPointer', value: function getPointer(touch) { return { x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas), y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas) }; } - }, { - key: 'onTouch', /** * On start of a touch gesture, store the pointer * @param event * @private */ + }, { + key: 'onTouch', value: function onTouch(event) { if (new Date().valueOf() - this.touchTime > 50) { this.drag.pointer = this.getPointer(event.center); @@ -37149,13 +38234,13 @@ return /******/ (function(modules) { // webpackBootstrap this.touchTime = new Date().valueOf(); } } - }, { - key: 'onTap', /** * handle tap/click event: select/unselect a node * @private */ + }, { + key: 'onTap', value: function onTap(event) { var pointer = this.getPointer(event.center); var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey); @@ -37163,24 +38248,24 @@ return /******/ (function(modules) { // webpackBootstrap this.checkSelectionChanges(pointer, event, multiselect); this.selectionHandler._generateClickEvent('click', event, pointer); } - }, { - key: 'onDoubleTap', /** * handle doubletap event * @private */ + }, { + key: 'onDoubleTap', value: function onDoubleTap(event) { var pointer = this.getPointer(event.center); this.selectionHandler._generateClickEvent('doubleClick', event, pointer); } - }, { - key: 'onHold', /** * handle long tap event: multi select nodes * @private */ + }, { + key: 'onHold', value: function onHold(event) { var pointer = this.getPointer(event.center); var multiselect = this.selectionHandler.options.multiselect; @@ -37190,14 +38275,14 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionHandler._generateClickEvent('click', event, pointer); this.selectionHandler._generateClickEvent('hold', event, pointer); } - }, { - key: 'onRelease', /** * handle the release of the screen * * @private */ + }, { + key: 'onRelease', value: function onRelease(event) { if (new Date().valueOf() - this.touchTime > 10) { var pointer = this.getPointer(event.center); @@ -37212,14 +38297,14 @@ return /******/ (function(modules) { // webpackBootstrap var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); this.selectionHandler._generateClickEvent('oncontext', event, pointer); } - }, { - key: 'checkSelectionChanges', /** * * @param pointer * @param add */ + }, { + key: 'checkSelectionChanges', value: function checkSelectionChanges(pointer, event) { var add = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; @@ -37238,8 +38323,8 @@ return /******/ (function(modules) { // webpackBootstrap var _determineIfDifferent2 = this._determineIfDifferent(previousSelection, currentSelection); - var nodesChanges = _determineIfDifferent2.nodesChanges; - var edgesChanges = _determineIfDifferent2.edgesChanges; + var nodesChanged = _determineIfDifferent2.nodesChanged; + var edgesChanged = _determineIfDifferent2.edgesChanged; var nodeSelected = false; @@ -37248,15 +38333,15 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionHandler._generateClickEvent('selectNode', event, pointer); selected = true; nodeSelected = true; - } else if (selectedNodesCount - previouslySelectedNodeCount < 0) { - // node was deselected - this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); - selected = true; - } else if (selectedNodesCount === previouslySelectedNodeCount && nodesChanges === true) { + } else if (nodesChanged === true && selectedNodesCount > 0) { this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); this.selectionHandler._generateClickEvent('selectNode', event, pointer); nodeSelected = true; selected = true; + } else if (selectedNodesCount - previouslySelectedNodeCount < 0) { + // node was deselected + this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); + selected = true; } // handle the selected edges @@ -37264,13 +38349,13 @@ return /******/ (function(modules) { // webpackBootstrap // edge was selected this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; - } else if (selectedEdgesCount - previouslySelectedEdgeCount < 0) { - // edge was deselected + } else if (selectedEdgesCount > 0 && edgesChanged === true) { this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); + this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; - } else if (selectedEdgesCount === previouslySelectedEdgeCount && edgesChanges === true) { + } else if (selectedEdgesCount - previouslySelectedEdgeCount < 0) { + // edge was deselected this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); - this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; } @@ -37280,45 +38365,43 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionHandler._generateClickEvent('select', event, pointer); } } - }, { - key: '_determineIfDifferent', /** * This function checks if the nodes and edges previously selected have changed. * @param previousSelection * @param currentSelection - * @returns {{nodesChanges: boolean, edgesChanges: boolean}} + * @returns {{nodesChanged: boolean, edgesChanged: boolean}} * @private */ + }, { + key: '_determineIfDifferent', value: function _determineIfDifferent(previousSelection, currentSelection) { - var nodesChanges = false; - var edgesChanges = false; + var nodesChanged = false; + var edgesChanged = false; for (var i = 0; i < previousSelection.nodes.length; i++) { if (currentSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) { - nodesChanges = true; + nodesChanged = true; } } for (var i = 0; i < currentSelection.nodes.length; i++) { if (previousSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) { - nodesChanges = true; + nodesChanged = true; } } for (var i = 0; i < previousSelection.edges.length; i++) { if (currentSelection.edges.indexOf(previousSelection.edges[i]) === -1) { - edgesChanges = true; + edgesChanged = true; } } for (var i = 0; i < currentSelection.edges.length; i++) { if (previousSelection.edges.indexOf(previousSelection.edges[i]) === -1) { - edgesChanges = true; + edgesChanged = true; } } - return { nodesChanges: nodesChanges, edgesChanges: edgesChanges }; + return { nodesChanged: nodesChanged, edgesChanged: edgesChanged }; } - }, { - key: 'onDragStart', /** * This function is called by onDragStart. @@ -37326,6 +38409,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: 'onDragStart', value: function onDragStart(event) { //in case the touch event was triggered on an external div, do the initial touch now. if (this.drag.pointer === undefined) { @@ -37378,13 +38463,13 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true); } } - }, { - key: 'onDrag', /** * handle drag event * @private */ + }, { + key: 'onDrag', value: function onDrag(event) { var _this2 = this; @@ -37440,13 +38525,13 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'onDragEnd', /** * handle drag start event * @private */ + }, { + key: 'onDragEnd', value: function onDragEnd(event) { this.drag.dragging = false; var selection = this.drag.selection; @@ -37463,14 +38548,14 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('_requestRedraw'); } } - }, { - key: 'onPinch', /** * Handle pinch event * @param event * @private */ + }, { + key: 'onPinch', value: function onPinch(event) { var pointer = this.getPointer(event.center); @@ -37483,8 +38568,6 @@ return /******/ (function(modules) { // webpackBootstrap var scale = this.pinch.scale * event.scale; this.zoom(scale, pointer); } - }, { - key: 'zoom', /** * Zoom the network in or out @@ -37493,6 +38576,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number} appliedScale scale is limited within the boundaries * @private */ + }, { + key: 'zoom', value: function zoom(scale, pointer) { if (this.options.zoomView === true) { var scaleOld = this.body.view.scale; @@ -37534,8 +38619,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'onMouseWheel', /** * Event handler for mouse wheel event, used to zoom the timeline @@ -37544,50 +38627,54 @@ return /******/ (function(modules) { // webpackBootstrap * @param {MouseEvent} event * @private */ + }, { + key: 'onMouseWheel', value: function onMouseWheel(event) { - // retrieve delta - var delta = 0; - if (event.wheelDelta) { - /* IE/Opera. */ - delta = event.wheelDelta / 120; - } else if (event.detail) { - /* Mozilla case. */ - // In Mozilla, sign of delta is different than in IE. - // Also, delta is multiple of 3. - delta = -event.detail / 3; - } + if (this.options.zoomView === true) { + // retrieve delta + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta !== 0) { + + // calculate the new scale + var scale = this.body.view.scale; + var zoom = delta / 10; + if (delta < 0) { + zoom = zoom / (1 - zoom); + } + scale *= 1 + zoom; - // If delta is nonzero, handle it. - // Basically, delta is now positive if wheel was scrolled up, - // and negative, if wheel was scrolled down. - if (delta !== 0) { + // calculate the pointer location + var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); - // calculate the new scale - var scale = this.body.view.scale; - var zoom = delta / 10; - if (delta < 0) { - zoom = zoom / (1 - zoom); + // apply the new scale + this.zoom(scale, pointer); } - scale *= 1 + zoom; - // calculate the pointer location - var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); - - // apply the new scale - this.zoom(scale, pointer); + // Prevent default actions caused by mouse wheel. + event.preventDefault(); } - - // Prevent default actions caused by mouse wheel. - event.preventDefault(); } - }, { - key: 'onMouseMove', /** * Mouse move handler for checking whether the title moves over a node with a title. * @param {Event} event * @private */ + }, { + key: 'onMouseMove', value: function onMouseMove(event) { var _this3 = this; @@ -37638,8 +38725,6 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionHandler.hoverObject(obj); } } - }, { - key: '_checkShowPopup', /** * Check if there is an element on the given position in the network @@ -37649,6 +38734,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{x:Number, y:Number}} pointer * @private */ + }, { + key: '_checkShowPopup', value: function _checkShowPopup(pointer) { var x = this.canvas._XconvertDOMtoCanvas(pointer.x); var y = this.canvas._YconvertDOMtoCanvas(pointer.y); @@ -37733,8 +38820,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: '_checkHidePopup', /** * Check if the popup must be hidden, which is the case when the mouse is no @@ -37742,6 +38827,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {{x:Number, y:Number}} pointer * @private */ + }, { + key: '_checkHidePopup', value: function _checkHidePopup(pointer) { var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); @@ -37795,8 +38882,8 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(25); - var keycharm = __webpack_require__(41); + var hammerUtil = __webpack_require__(24); + var keycharm = __webpack_require__(40); var NavigationHandler = (function () { function NavigationHandler(body, canvas) { @@ -37813,13 +38900,13 @@ return /******/ (function(modules) { // webpackBootstrap this.touchTime = 0; this.activated = false; - this.body.emitter.on('activate', function () { + this.body.emitter.on("activate", function () { _this.activated = true;_this.configureKeyboardBindings(); }); - this.body.emitter.on('deactivate', function () { + this.body.emitter.on("deactivate", function () { _this.activated = false;_this.configureKeyboardBindings(); }); - this.body.emitter.on('destroy', function () { + this.body.emitter.on("destroy", function () { if (_this.keycharm !== undefined) { _this.keycharm.destroy(); } @@ -37867,8 +38954,6 @@ return /******/ (function(modules) { // webpackBootstrap 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 @@ -37878,6 +38963,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: 'loadNavigationElements', value: function loadNavigationElements() { var _this2 = this; @@ -37897,7 +38984,7 @@ return /******/ (function(modules) { // webpackBootstrap this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]); var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]); - if (navigationDivActions[i] === '_fit') { + if (navigationDivActions[i] === "_fit") { hammerUtil.onTouch(hammer, this._fit.bind(this)); } else { hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this, navigationDivActions[i])); @@ -37921,47 +39008,47 @@ return /******/ (function(modules) { // webpackBootstrap 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'); + 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'); + 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 */ + }, { + key: '_fit', 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.body.emitter.emit("fit", { duration: 700 }); this.touchTime = new Date().valueOf(); } } - }, { - key: '_stopMovement', /** * this stops all movement induced by the navigation buttons * * @private */ + }, { + key: '_stopMovement', 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.body.emitter.off("initRedraw", this.boundFunctions[boundAction]); + this.body.emitter.emit("_stopRendering"); } } this.boundFunctions = {}; @@ -37998,12 +39085,12 @@ return /******/ (function(modules) { // webpackBootstrap this.body.view.scale /= 1 + this.options.keyboard.speed.zoom; this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale }); } - }, { - key: 'configureKeyboardBindings', /** * bind all keys using keycharm. */ + }, { + key: 'configureKeyboardBindings', value: function configureKeyboardBindings() { var _this3 = this; @@ -38021,79 +39108,79 @@ return /******/ (function(modules) { // webpackBootstrap this.keycharm.reset(); if (this.activated === true) { - this.keycharm.bind('up', function () { - _this3.bindToRedraw('_moveUp'); - }, 'keydown'); - this.keycharm.bind('down', function () { - _this3.bindToRedraw('_moveDown'); - }, 'keydown'); - this.keycharm.bind('left', function () { - _this3.bindToRedraw('_moveLeft'); - }, 'keydown'); - this.keycharm.bind('right', function () { - _this3.bindToRedraw('_moveRight'); - }, 'keydown'); - this.keycharm.bind('=', function () { - _this3.bindToRedraw('_zoomIn'); - }, 'keydown'); - this.keycharm.bind('num+', function () { - _this3.bindToRedraw('_zoomIn'); - }, 'keydown'); - this.keycharm.bind('num-', function () { - _this3.bindToRedraw('_zoomOut'); - }, 'keydown'); - this.keycharm.bind('-', function () { - _this3.bindToRedraw('_zoomOut'); - }, 'keydown'); - this.keycharm.bind('[', function () { - _this3.bindToRedraw('_zoomOut'); - }, 'keydown'); - this.keycharm.bind(']', function () { - _this3.bindToRedraw('_zoomIn'); - }, 'keydown'); - this.keycharm.bind('pageup', function () { - _this3.bindToRedraw('_zoomIn'); - }, 'keydown'); - this.keycharm.bind('pagedown', function () { - _this3.bindToRedraw('_zoomOut'); - }, 'keydown'); - - this.keycharm.bind('up', function () { - _this3.unbindFromRedraw('_moveUp'); - }, 'keyup'); - this.keycharm.bind('down', function () { - _this3.unbindFromRedraw('_moveDown'); - }, 'keyup'); - this.keycharm.bind('left', function () { - _this3.unbindFromRedraw('_moveLeft'); - }, 'keyup'); - this.keycharm.bind('right', function () { - _this3.unbindFromRedraw('_moveRight'); - }, 'keyup'); - this.keycharm.bind('=', function () { - _this3.unbindFromRedraw('_zoomIn'); - }, 'keyup'); - this.keycharm.bind('num+', function () { - _this3.unbindFromRedraw('_zoomIn'); - }, 'keyup'); - this.keycharm.bind('num-', function () { - _this3.unbindFromRedraw('_zoomOut'); - }, 'keyup'); - this.keycharm.bind('-', function () { - _this3.unbindFromRedraw('_zoomOut'); - }, 'keyup'); - this.keycharm.bind('[', function () { - _this3.unbindFromRedraw('_zoomOut'); - }, 'keyup'); - this.keycharm.bind(']', function () { - _this3.unbindFromRedraw('_zoomIn'); - }, 'keyup'); - this.keycharm.bind('pageup', function () { - _this3.unbindFromRedraw('_zoomIn'); - }, 'keyup'); - this.keycharm.bind('pagedown', function () { - _this3.unbindFromRedraw('_zoomOut'); - }, 'keyup'); + this.keycharm.bind("up", function () { + _this3.bindToRedraw("_moveUp"); + }, "keydown"); + this.keycharm.bind("down", function () { + _this3.bindToRedraw("_moveDown"); + }, "keydown"); + this.keycharm.bind("left", function () { + _this3.bindToRedraw("_moveLeft"); + }, "keydown"); + this.keycharm.bind("right", function () { + _this3.bindToRedraw("_moveRight"); + }, "keydown"); + this.keycharm.bind("=", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num+", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("[", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("]", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pageup", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pagedown", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + + this.keycharm.bind("up", function () { + _this3.unbindFromRedraw("_moveUp"); + }, "keyup"); + this.keycharm.bind("down", function () { + _this3.unbindFromRedraw("_moveDown"); + }, "keyup"); + this.keycharm.bind("left", function () { + _this3.unbindFromRedraw("_moveLeft"); + }, "keyup"); + this.keycharm.bind("right", function () { + _this3.unbindFromRedraw("_moveRight"); + }, "keyup"); + this.keycharm.bind("=", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num+", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("[", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("]", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pageup", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pagedown", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); } } } @@ -38145,24 +39232,24 @@ return /******/ (function(modules) { // webpackBootstrap this.container.appendChild(this.frame); } + /** + * @param {number} x Horizontal position of the popup window + * @param {number} y Vertical position of the popup window + */ + _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 */ + }, { + key: 'setText', value: function setText(content) { if (content instanceof Element) { this.frame.innerHTML = ''; @@ -38171,13 +39258,13 @@ return /******/ (function(modules) { // webpackBootstrap this.frame.innerHTML = content; // string containing text or HTML } } - }, { - key: 'show', /** * Show the popup window * @param {boolean} [doShow] Show or hide the window */ + }, { + key: 'show', value: function show(doShow) { if (doShow === undefined) { doShow = true; @@ -38205,23 +39292,23 @@ return /******/ (function(modules) { // webpackBootstrap left = this.padding; } - this.frame.style.left = left + 'px'; - this.frame.style.top = top + 'px'; - this.frame.style.visibility = 'visible'; + 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 */ + }, { + key: 'hide', value: function hide() { this.hidden = true; - this.frame.style.visibility = 'hidden'; + this.frame.style.visibility = "hidden"; } }]); @@ -38245,8 +39332,8 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var Node = __webpack_require__(62); - var Edge = __webpack_require__(82); + var Node = __webpack_require__(61); + var Edge = __webpack_require__(81); var util = __webpack_require__(1); var SelectionHandler = (function () { @@ -38278,12 +39365,10 @@ return /******/ (function(modules) { // webpackBootstrap key: "setOptions", value: function setOptions(options) { if (options !== undefined) { - var fields = ["multiselect", "hoverConnectedEdges", "selectable", "selectConnectedEdges"]; + var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges']; util.selectiveDeepExtend(fields, this.options, options); } } - }, { - key: "selectOnPoint", /** * handles the selection part of the tap; @@ -38291,6 +39376,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} pointer * @private */ + }, { + key: "selectOnPoint", value: function selectOnPoint(pointer) { var selected = false; if (this.options.selectable === true) { @@ -38337,14 +39424,14 @@ return /******/ (function(modules) { // webpackBootstrap } else { 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); } @@ -38373,8 +39460,6 @@ return /******/ (function(modules) { // webpackBootstrap this._removeFromSelection(obj); } } - }, { - key: "_getAllNodesOverlappingWith", /** * retrieve all nodes overlapping with given object @@ -38382,6 +39467,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { + key: "_getAllNodesOverlappingWith", value: function _getAllNodesOverlappingWith(object) { var overlappingNodes = []; var nodes = this.body.nodes; @@ -38393,8 +39480,6 @@ return /******/ (function(modules) { // webpackBootstrap } return overlappingNodes; } - }, { - key: "_pointerToPositionObject", /** * Return a position object in canvasspace from a single point in screenspace @@ -38403,6 +39488,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {{left: number, top: number, right: number, bottom: number}} * @private */ + }, { + key: "_pointerToPositionObject", value: function _pointerToPositionObject(pointer) { var canvasPos = this.canvas.DOMtoCanvas(pointer); return { @@ -38412,16 +39499,15 @@ return /******/ (function(modules) { // webpackBootstrap bottom: canvasPos.y - 1 }; } - }, { - key: "getNodeAt", /** * Get the top node at the a specific point (like a click) * * @param {{x: Number, y: Number}} pointer * @return {Node | undefined} node - * @private */ + }, { + key: "getNodeAt", value: function getNodeAt(pointer) { var returnNode = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -38440,8 +39526,6 @@ return /******/ (function(modules) { // webpackBootstrap return undefined; } } - }, { - key: "_getEdgesOverlappingWith", /** * retrieve all edges overlapping with given object, selector is around center @@ -38449,6 +39533,8 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { + key: "_getEdgesOverlappingWith", value: function _getEdgesOverlappingWith(object, overlappingEdges) { var edges = this.body.edges; for (var i = 0; i < this.body.edgeIndices.length; i++) { @@ -38458,8 +39544,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_getAllEdgesOverlappingWith", /** * retrieve all nodes overlapping with given object @@ -38467,13 +39551,13 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Number[]} An array with id's of the overlapping nodes * @private */ + }, { + key: "_getAllEdgesOverlappingWith", value: function _getAllEdgesOverlappingWith(object) { var overlappingEdges = []; this._getEdgesOverlappingWith(object, overlappingEdges); return overlappingEdges; } - }, { - key: "getEdgeAt", /** * Place holder. To implement change the getNodeAt to a _getObjectAt. Have the _getObjectAt call @@ -38481,8 +39565,9 @@ return /******/ (function(modules) { // webpackBootstrap * * @param pointer * @returns {undefined} - * @private */ + }, { + key: "getEdgeAt", value: function getEdgeAt(pointer) { var returnEdge = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; @@ -38499,8 +39584,6 @@ return /******/ (function(modules) { // webpackBootstrap return undefined; } } - }, { - key: "_addToSelection", /** * Add object to the selection array. @@ -38508,6 +39591,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param obj * @private */ + }, { + key: "_addToSelection", value: function _addToSelection(obj) { if (obj instanceof Node) { this.selectionObj.nodes[obj.id] = obj; @@ -38515,8 +39600,6 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionObj.edges[obj.id] = obj; } } - }, { - key: "_addToHover", /** * Add object to the selection array. @@ -38524,6 +39607,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param obj * @private */ + }, { + key: "_addToHover", value: function _addToHover(obj) { if (obj instanceof Node) { this.hoverObj.nodes[obj.id] = obj; @@ -38531,8 +39616,6 @@ return /******/ (function(modules) { // webpackBootstrap this.hoverObj.edges[obj.id] = obj; } } - }, { - key: "_removeFromSelection", /** * Remove a single option from selection. @@ -38540,21 +39623,22 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} obj * @private */ + }, { + key: "_removeFromSelection", value: function _removeFromSelection(obj) { if (obj instanceof Node) { delete this.selectionObj.nodes[obj.id]; + this._unselectConnectedEdges(obj); } else { delete this.selectionObj.edges[obj.id]; } } - }, { - key: "unselectAll", /** * Unselect all. The selectionObj is useful for this. - * - * @private */ + }, { + key: "unselectAll", value: function unselectAll() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -38569,8 +39653,6 @@ return /******/ (function(modules) { // webpackBootstrap this.selectionObj = { nodes: {}, edges: {} }; } - }, { - key: "_getSelectedNodeCount", /** * return the number of selected nodes @@ -38578,6 +39660,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: "_getSelectedNodeCount", value: function _getSelectedNodeCount() { var count = 0; for (var nodeId in this.selectionObj.nodes) { @@ -38587,8 +39671,6 @@ return /******/ (function(modules) { // webpackBootstrap } return count; } - }, { - key: "_getSelectedNode", /** * return the selected node @@ -38596,6 +39678,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: "_getSelectedNode", value: function _getSelectedNode() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -38604,8 +39688,6 @@ return /******/ (function(modules) { // webpackBootstrap } return undefined; } - }, { - key: "_getSelectedEdge", /** * return the selected edge @@ -38613,6 +39695,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: "_getSelectedEdge", value: function _getSelectedEdge() { for (var edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { @@ -38621,8 +39705,6 @@ return /******/ (function(modules) { // webpackBootstrap } return undefined; } - }, { - key: "_getSelectedEdgeCount", /** * return the number of selected edges @@ -38630,6 +39712,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: "_getSelectedEdgeCount", value: function _getSelectedEdgeCount() { var count = 0; for (var edgeId in this.selectionObj.edges) { @@ -38639,8 +39723,6 @@ return /******/ (function(modules) { // webpackBootstrap } return count; } - }, { - key: "_getSelectedObjectCount", /** * return the number of selected objects. @@ -38648,6 +39730,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: "_getSelectedObjectCount", value: function _getSelectedObjectCount() { var count = 0; for (var nodeId in this.selectionObj.nodes) { @@ -38662,8 +39746,6 @@ return /******/ (function(modules) { // webpackBootstrap } return count; } - }, { - key: "_selectionIsEmpty", /** * Check if anything is selected @@ -38671,6 +39753,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} * @private */ + }, { + key: "_selectionIsEmpty", value: function _selectionIsEmpty() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -38684,8 +39768,6 @@ return /******/ (function(modules) { // webpackBootstrap } return true; } - }, { - key: "_clusterInSelection", /** * check if one of the selected nodes is a cluster. @@ -38693,6 +39775,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} * @private */ + }, { + key: "_clusterInSelection", value: function _clusterInSelection() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -38703,8 +39787,6 @@ return /******/ (function(modules) { // webpackBootstrap } return false; } - }, { - key: "_selectConnectedEdges", /** * select the edges connected to the node that is being selected @@ -38712,6 +39794,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { + key: "_selectConnectedEdges", value: function _selectConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -38719,8 +39803,6 @@ return /******/ (function(modules) { // webpackBootstrap this._addToSelection(edge); } } - }, { - key: "_hoverConnectedEdges", /** * select the edges connected to the node that is being selected @@ -38728,6 +39810,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { + key: "_hoverConnectedEdges", value: function _hoverConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -38735,8 +39819,6 @@ return /******/ (function(modules) { // webpackBootstrap this._addToHover(edge); } } - }, { - key: "_unselectConnectedEdges", /** * unselect the edges connected to the node that is being selected @@ -38744,6 +39826,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node} node * @private */ + }, { + key: "_unselectConnectedEdges", value: function _unselectConnectedEdges(node) { for (var i = 0; i < node.edges.length; i++) { var edge = node.edges[i]; @@ -38751,8 +39835,6 @@ return /******/ (function(modules) { // webpackBootstrap this._removeFromSelection(edge); } } - }, { - key: "blurObject", /** * This is called when someone clicks on a node. either select or deselect it. @@ -38761,6 +39843,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node || Edge} object * @private */ + }, { + key: "blurObject", value: function blurObject(object) { if (object.hover === true) { object.hover = false; @@ -38771,8 +39855,6 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "hoverObject", /** * This is called when someone clicks on a node. either select or deselect it. @@ -38781,6 +39863,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Node || Edge} object * @private */ + }, { + key: "hoverObject", value: function hoverObject(object) { var hoverChanged = false; // remove all node hover highlights @@ -38805,10 +39889,10 @@ return /******/ (function(modules) { // webpackBootstrap } // if the blur remains the same and the object is undefined (mouse off), we blur the edge else if (object === undefined) { - this.blurObject(this.hoverObj.edges[edgeId]); - delete this.hoverObj.edges[edgeId]; - hoverChanged = true; - } + this.blurObject(this.hoverObj.edges[edgeId]); + delete this.hoverObj.edges[edgeId]; + hoverChanged = true; + } } } @@ -38829,24 +39913,22 @@ return /******/ (function(modules) { // webpackBootstrap } if (hoverChanged === true) { - this.body.emitter.emit("_requestRedraw"); + this.body.emitter.emit('_requestRedraw'); } } - }, { - key: "getSelection", /** * * retrieve the currently selected objects * @return {{nodes: Array., edges: Array.}} selection */ + }, { + key: "getSelection", value: function getSelection() { var nodeIds = this.getSelectedNodes(); var edgeIds = this.getSelectedEdges(); return { nodes: nodeIds, edges: edgeIds }; } - }, { - key: "getSelectedNodes", /** * @@ -38854,19 +39936,19 @@ return /******/ (function(modules) { // webpackBootstrap * @return {String[]} selection An array with the ids of the * selected nodes. */ + }, { + key: "getSelectedNodes", value: function getSelectedNodes() { var idArray = []; if (this.options.selectable === true) { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { - idArray.push(nodeId); + idArray.push(this.selectionObj.nodes[nodeId].id); } } } return idArray; } - }, { - key: "getSelectedEdges", /** * @@ -38874,83 +39956,100 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Array} selection An array with the ids of the * selected nodes. */ + }, { + key: "getSelectedEdges", value: function getSelectedEdges() { var idArray = []; if (this.options.selectable === true) { for (var edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { - idArray.push(edgeId); + idArray.push(this.selectionObj.edges[edgeId].id); } } } return idArray; } - }, { - key: "selectNodes", /** - * select zero or more nodes with the option to highlight edges - * @param {Number[] | String[]} selection An array with the ids of the - * selected nodes. - * @param {boolean} [highlightEdges] + * Updates the current selection + * @param {{nodes: Array., edges: Array.}} Selection + * @param {Object} options Options */ - value: function selectNodes(selection) { - var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + }, { + key: "setSelection", + value: function setSelection(selection) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var i = undefined, id = undefined; - if (!selection || selection.length === undefined) throw "Selection must be an array with ids"; + if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; + // first unselect any selected node, if option is true or undefined + if (options.unselectAll || options.unselectAll === undefined) { + this.unselectAll(); + } + if (selection.nodes) { + for (i = 0; i < selection.nodes.length; i++) { + id = selection.nodes[i]; - // first unselect any selected node - this.unselectAll(); + var node = this.body.nodes[id]; + if (!node) { + throw new RangeError('Node with id "' + id + '" not found'); + } + // don't select edges with it + this.selectObject(node, options.highlightEdges); + } + } - for (i = 0; i < selection.length; i++) { - id = selection[i]; + if (selection.edges) { + for (i = 0; i < selection.edges.length; i++) { + id = selection.edges[i]; - var node = this.body.nodes[id]; - if (!node) { - throw new RangeError("Node with id \"" + id + "\" not found"); + var edge = this.body.edges[id]; + if (!edge) { + throw new RangeError('Edge with id "' + id + '" not found'); + } + this.selectObject(edge); } - this.selectObject(node, highlightEdges); } - this.body.emitter.emit("_requestRedraw"); + this.body.emitter.emit('_requestRedraw'); } - }, { - key: "selectEdges", /** - * select zero or more edges + * select zero or more nodes with the option to highlight edges * @param {Number[] | String[]} selection An array with the ids of the * selected nodes. + * @param {boolean} [highlightEdges] */ - value: function selectEdges(selection) { - var i = undefined, - id = undefined; + }, { + key: "selectNodes", + value: function selectNodes(selection) { + var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - if (!selection || selection.length === undefined) throw "Selection must be an array with ids"; + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; - // first unselect any selected objects - this.unselectAll(); + this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges }); + } - for (i = 0; i < selection.length; i++) { - id = selection[i]; + /** + * select zero or more edges + * @param {Number[] | String[]} selection An array with the ids of the + * selected nodes. + */ + }, { + key: "selectEdges", + value: function selectEdges(selection) { + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; - var edge = this.body.edges[id]; - if (!edge) { - throw new RangeError("Edge with id \"" + id + "\" not found"); - } - this.selectObject(edge); - } - this.body.emitter.emit("_requestRedraw"); + this.setSelection({ edges: selection }); } - }, { - key: "updateSelection", /** * Validate the selection: remove ids of nodes which no longer exist * @private */ + }, { + key: "updateSelection", value: function updateSelection() { for (var nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { @@ -38985,10 +40084,18 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); + var _slicedToArray = (function () { function sliceIterator(arr, i) { 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; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + 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 _NetworkUtil = __webpack_require__(99); + + var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); + var util = __webpack_require__(1); var LayoutEngine = (function () { @@ -38999,8 +40106,9 @@ return /******/ (function(modules) { // webpackBootstrap this.initialRandomSeed = Math.round(Math.random() * 1000000); this.randomSeed = this.initialRandomSeed; + this.setPhysics = false; this.options = {}; - this.optionsBackup = {}; + this.optionsBackup = { physics: {} }; this.defaultOptions = { randomSeed: undefined, @@ -39008,14 +40116,16 @@ return /******/ (function(modules) { // webpackBootstrap hierarchical: { enabled: false, levelSeparation: 150, + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, direction: 'UD', // UD, DU, LR, RL sortMethod: 'hubsize' // hubsize, directed } }; util.extend(this.options, this.defaultOptions); - - this.hierarchicalLevels = {}; - this.bindEventListeners(); } @@ -39039,7 +40149,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setOptions(options, allOptions) { if (options !== undefined) { var prevHierarchicalState = this.options.hierarchical.enabled; - util.selectiveDeepExtend(['randomSeed', 'improvedLayout'], this.options, options); + util.selectiveDeepExtend(["randomSeed", "improvedLayout"], this.options, options); util.mergeOptions(this.options, options, 'hierarchical'); if (options.randomSeed !== undefined) { this.initialRandomSeed = options.randomSeed; @@ -39051,7 +40161,7 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('refresh', true); } - // make sure the level seperation is the right way up + // make sure the level separation is the right way up if (this.options.hierarchical.direction === 'RL' || this.options.hierarchical.direction === 'DU') { if (this.options.hierarchical.levelSeparation > 0) { this.options.hierarchical.levelSeparation *= -1; @@ -39064,7 +40174,7 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings, we adapt the other options if needed. - return this.adaptAllOptions(allOptions); + return this.adaptAllOptionsForHierarchicalLayout(allOptions); } else { if (prevHierarchicalState === true) { // refresh the overridden options for nodes and edges. @@ -39076,22 +40186,24 @@ return /******/ (function(modules) { // webpackBootstrap return allOptions; } }, { - key: 'adaptAllOptions', - value: function adaptAllOptions(allOptions) { + key: 'adaptAllOptionsForHierarchicalLayout', + value: function adaptAllOptionsForHierarchicalLayout(allOptions) { if (this.options.hierarchical.enabled === true) { // set the physics if (allOptions.physics === undefined || allOptions.physics === true) { - allOptions.physics = { solver: 'hierarchicalRepulsion' }; - this.optionsBackup.physics = { solver: 'barnesHut' }; + allOptions.physics = { + enabled: this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled, + solver: 'hierarchicalRepulsion' + }; + this.optionsBackup.physics.enabled = this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled; + this.optionsBackup.physics.solver = this.optionsBackup.physics.solver || 'barnesHut'; } else if (typeof allOptions.physics === 'object') { - this.optionsBackup.physics = { solver: 'barnesHut' }; - if (allOptions.physics.solver !== undefined) { - this.optionsBackup.physics = { solver: allOptions.physics.solver }; - } - allOptions.physics['solver'] = 'hierarchicalRepulsion'; + this.optionsBackup.physics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; + this.optionsBackup.physics.solver = allOptions.physics.solver || 'barnesHut'; + allOptions.physics.solver = 'hierarchicalRepulsion'; } else if (allOptions.physics !== false) { - this.optionsBackup.physics = { solver: 'barnesHut' }; - allOptions.physics['solver'] = 'hierarchicalRepulsion'; + this.optionsBackup.physics.solver = 'barnesHut'; + allOptions.physics = { solver: 'hierarchicalRepulsion' }; } // get the type of static smooth curve in case it is required @@ -39135,6 +40247,7 @@ return /******/ (function(modules) { // webpackBootstrap // force all edges into static smooth curves. Only applies to edges that do not use the global options for smooth. this.body.emitter.emit('_forceDisableDynamicCurves', type); } + return allOptions; } }, { @@ -39161,16 +40274,16 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'layoutNetwork', /** - * Use KamadaKawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we + * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we * cluster them first to reduce the amount. */ + }, { + key: 'layoutNetwork', value: function layoutNetwork() { if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) { - // first check if we should KamadaKawai to layout. The threshold is if less than half of the visible + // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible // nodes have predefined positions we use this. var positionDefined = 0; for (var i = 0; i < this.body.nodeIndices.length; i++) { @@ -39182,27 +40295,31 @@ return /******/ (function(modules) { // webpackBootstrap // if less than half of the nodes have a predefined position we continue if (positionDefined < 0.5 * this.body.nodeIndices.length) { - var MAX_LEVELS = 200; - var levels = 0; + var MAX_LEVELS = 10; + var level = 0; var clusterThreshold = 100; // if there are a lot of nodes, we cluster before we run the algorithm. if (this.body.nodeIndices.length > clusterThreshold) { var startLength = this.body.nodeIndices.length; while (this.body.nodeIndices.length > clusterThreshold) { - levels += 1; + //console.time("clustering") + level += 1; var before = this.body.nodeIndices.length; // if there are many nodes we do a hubsize cluster - if (levels % 3 === 0) { + if (level % 3 === 0) { this.body.modules.clustering.clusterBridges(); } else { this.body.modules.clustering.clusterOutliers(); } var after = this.body.nodeIndices.length; - if (before == after && levels % 3 !== 0 || levels > MAX_LEVELS) { + if (before == after && level % 3 !== 0 || level > MAX_LEVELS) { this._declusterAll(); - console.info('This network could not be positioned by this version of the improved layout algorithm.'); + this.body.emitter.emit("_layoutFailed"); + console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance."); return; } + //console.timeEnd("clustering") + //console.log(level,after) } // increase the size of the edges this.body.modules.kamadaKawai.setOptions({ springLength: Math.max(150, 2 * startLength) }); @@ -39211,14 +40328,39 @@ return /******/ (function(modules) { // webpackBootstrap // position the system for these nodes and edges this.body.modules.kamadaKawai.solve(this.body.nodeIndices, this.body.edgeIndices, true); + // shift to center point + this._shiftToCenter(); + + // perturb the nodes a little bit to force the physics to kick in + var offset = 70; + for (var i = 0; i < this.body.nodeIndices.length; i++) { + this.body.nodes[this.body.nodeIndices[i]].x += (0.5 - this.seededRandom()) * offset; + this.body.nodes[this.body.nodeIndices[i]].y += (0.5 - this.seededRandom()) * offset; + } + // uncluster all clusters this._declusterAll(); // reposition all bezier nodes. - this.body.emitter.emit('_repositionBezierNodes'); + this.body.emitter.emit("_repositionBezierNodes"); } } } + + /** + * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view + * @private + */ + }, { + key: '_shiftToCenter', + value: function _shiftToCenter() { + var range = _NetworkUtil2['default'].getRangeCore(this.body.nodes, this.body.nodeIndices); + var center = _NetworkUtil2['default'].findCenter(range); + for (var i = 0; i < this.body.nodeIndices.length; i++) { + this.body.nodes[this.body.nodeIndices[i]].x -= center.x; + this.body.nodes[this.body.nodeIndices[i]].y -= center.y; + } + } }, { key: '_declusterAll', value: function _declusterAll() { @@ -39241,8 +40383,6 @@ return /******/ (function(modules) { // webpackBootstrap value: function getSeed() { return this.initialRandomSeed; } - }, { - key: 'setupHierarchicalLayout', /** * This is the main function to layout the nodes in a hierarchical way. @@ -39250,19 +40390,33 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: 'setupHierarchicalLayout', value: function setupHierarchicalLayout() { if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) { // get the size of the largest hubs and check if the user has defined a level for a node. var node = undefined, nodeId = undefined; var definedLevel = false; + var definedPositions = true; var undefinedLevel = false; this.hierarchicalLevels = {}; - this.nodeSpacing = 100; + this.lastNodeOnLevel = {}; + this.hierarchicalChildrenReference = {}; + this.hierarchicalParentReference = {}; + this.hierarchicalTrees = {}; + this.treeIndex = -1; + + this.distributionOrdering = {}; + this.distributionIndex = {}; + this.distributionOrderingPresence = {}; for (nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { node = this.body.nodes[nodeId]; + if (node.options.x === undefined && node.options.y === undefined) { + definedPositions = false; + } if (node.options.level !== undefined) { definedLevel = true; this.hierarchicalLevels[nodeId] = node.options.level; @@ -39277,28 +40431,567 @@ return /******/ (function(modules) { // webpackBootstrap throw new Error('To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.'); return; } else { - // setup the system to use hierarchical method. - //this._changeConstants(); - - // define levels if undefined by the users. Based on hubsize + // define levels if undefined by the users. Based on hubsize. if (undefinedLevel === true) { if (this.options.hierarchical.sortMethod === 'hubsize') { this._determineLevelsByHubsize(); - } else if (this.options.hierarchical.sortMethod === 'directed' || 'direction') { + } else if (this.options.hierarchical.sortMethod === 'directed') { this._determineLevelsDirected(); + } else if (this.options.hierarchical.sortMethod === 'custom') { + this._determineLevelsCustomCallback(); } } + // fallback for cases where there are nodes but no edges + for (var _nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId)) { + if (this.hierarchicalLevels[_nodeId] === undefined) { + this.hierarchicalLevels[_nodeId] = 0; + } + } + } // check the distribution of the nodes per level. var distribution = this._getDistribution(); + // get the parent children relations. + this._generateMap(); + // place the nodes on the canvas. this._placeNodesByHierarchy(distribution); + + // condense the whitespace. + this._condenseHierarchy(); + + // shift to center so gravity does not have to do much + this._shiftToCenter(); } } } + + /** + * @private + */ }, { - key: '_placeNodesByHierarchy', + key: '_condenseHierarchy', + value: function _condenseHierarchy() { + var _this2 = this; + + // Global var in this scope to define when the movement has stopped. + var stillShifting = false; + var branches = {}; + // first we have some methods to help shifting trees around. + // the main method to shift the trees + var shiftTrees = function shiftTrees() { + var treeSizes = getTreeSizes(); + for (var i = 0; i < treeSizes.length - 1; i++) { + var diff = treeSizes[i].max - treeSizes[i + 1].min; + shiftTree(i + 1, diff + _this2.options.hierarchical.treeSpacing); + } + }; + + // shift a single tree by an offset + var shiftTree = function shiftTree(index, offset) { + for (var nodeId in _this2.hierarchicalTrees) { + if (_this2.hierarchicalTrees.hasOwnProperty(nodeId)) { + if (_this2.hierarchicalTrees[nodeId] === index) { + var node = _this2.body.nodes[nodeId]; + var pos = _this2._getPositionForHierarchy(node); + _this2._setPositionForHierarchy(node, pos + offset, undefined, true); + } + } + } + }; + + // get the width of a tree + var getTreeSize = function getTreeSize(index) { + var min = 1e9; + var max = -1e9; + for (var nodeId in _this2.hierarchicalTrees) { + if (_this2.hierarchicalTrees.hasOwnProperty(nodeId)) { + if (_this2.hierarchicalTrees[nodeId] === index) { + var pos = _this2._getPositionForHierarchy(_this2.body.nodes[nodeId]); + min = Math.min(pos, min); + max = Math.max(pos, max); + } + } + } + return { min: min, max: max }; + }; + + // get the width of all trees + var getTreeSizes = function getTreeSizes() { + var treeWidths = []; + for (var i = 0; i <= _this2.treeIndex; i++) { + treeWidths.push(getTreeSize(i)); + } + return treeWidths; + }; + + // get a map of all nodes in this branch + var getBranchNodes = function getBranchNodes(source, map) { + map[source.id] = true; + if (_this2.hierarchicalChildrenReference[source.id]) { + var children = _this2.hierarchicalChildrenReference[source.id]; + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + getBranchNodes(_this2.body.nodes[children[i]], map); + } + } + } + }; + + // get a min max width as well as the maximum movement space it has on either sides + // we use min max terminology because width and height can interchange depending on the direction of the layout + var getBranchBoundary = function getBranchBoundary(branchMap) { + var maxLevel = arguments.length <= 1 || arguments[1] === undefined ? 1e9 : arguments[1]; + + var minSpace = 1e9; + var maxSpace = 1e9; + var min = 1e9; + var max = -1e9; + for (var branchNode in branchMap) { + if (branchMap.hasOwnProperty(branchNode)) { + var node = _this2.body.nodes[branchNode]; + var level = _this2.hierarchicalLevels[node.id]; + var position = _this2._getPositionForHierarchy(node); + + // get the space around the node. + + var _getSpaceAroundNode2 = _this2._getSpaceAroundNode(node, branchMap); + + var _getSpaceAroundNode22 = _slicedToArray(_getSpaceAroundNode2, 2); + + var minSpaceNode = _getSpaceAroundNode22[0]; + var maxSpaceNode = _getSpaceAroundNode22[1]; + + minSpace = Math.min(minSpaceNode, minSpace); + maxSpace = Math.min(maxSpaceNode, maxSpace); + + // the width is only relevant for the levels two nodes have in common. This is why we filter on this. + if (level <= maxLevel) { + min = Math.min(position, min); + max = Math.max(position, max); + } + } + } + + return [min, max, minSpace, maxSpace]; + }; + + // get the maximum level of a branch. + var getMaxLevel = function getMaxLevel(nodeId) { + var level = _this2.hierarchicalLevels[nodeId]; + if (_this2.hierarchicalChildrenReference[nodeId]) { + var children = _this2.hierarchicalChildrenReference[nodeId]; + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + level = Math.max(level, getMaxLevel(children[i])); + } + } + } + return level; + }; + + // check what the maximum level is these nodes have in common. + var getCollisionLevel = function getCollisionLevel(node1, node2) { + var maxLevel1 = getMaxLevel(node1.id); + var maxLevel2 = getMaxLevel(node2.id); + return Math.min(maxLevel1, maxLevel2); + }; + + // check if two nodes have the same parent(s) + var hasSameParent = function hasSameParent(node1, node2) { + var parents1 = _this2.hierarchicalParentReference[node1.id]; + var parents2 = _this2.hierarchicalParentReference[node2.id]; + if (parents1 === undefined || parents2 === undefined) { + return false; + } + + for (var i = 0; i < parents1.length; i++) { + for (var j = 0; j < parents2.length; j++) { + if (parents1[i] == parents2[j]) { + return true; + } + } + } + return false; + }; + + // condense elements. These can be nodes or branches depending on the callback. + var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) { + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = _this2.distributionOrdering[level]; + if (levelNodes.length > 1) { + for (var j = 0; j < levelNodes.length - 1; j++) { + if (hasSameParent(levelNodes[j], levelNodes[j + 1]) === true) { + if (_this2.hierarchicalTrees[levelNodes[j].id] === _this2.hierarchicalTrees[levelNodes[j + 1].id]) { + callback(levelNodes[j], levelNodes[j + 1], centerParents); + } + } + } + } + } + }; + + // callback for shifting branches + var branchShiftCallback = function branchShiftCallback(node1, node2) { + var centerParent = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + + //window.CALLBACKS.push(() => { + var pos1 = _this2._getPositionForHierarchy(node1); + var pos2 = _this2._getPositionForHierarchy(node2); + var diffAbs = Math.abs(pos2 - pos1); + //console.log("NOW CHEcKING:", node1.id, node2.id, diffAbs); + if (diffAbs > _this2.options.hierarchical.nodeSpacing) { + var branchNodes1 = {};branchNodes1[node1.id] = true; + var branchNodes2 = {};branchNodes2[node2.id] = true; + + getBranchNodes(node1, branchNodes1); + getBranchNodes(node2, branchNodes2); + + // check the largest distance between the branches + var maxLevel = getCollisionLevel(node1, node2); + + var _getBranchBoundary = getBranchBoundary(branchNodes1, maxLevel); + + var _getBranchBoundary2 = _slicedToArray(_getBranchBoundary, 4); + + var min1 = _getBranchBoundary2[0]; + var max1 = _getBranchBoundary2[1]; + var minSpace1 = _getBranchBoundary2[2]; + var maxSpace1 = _getBranchBoundary2[3]; + + var _getBranchBoundary3 = getBranchBoundary(branchNodes2, maxLevel); + + var _getBranchBoundary32 = _slicedToArray(_getBranchBoundary3, 4); + + var min2 = _getBranchBoundary32[0]; + var max2 = _getBranchBoundary32[1]; + var minSpace2 = _getBranchBoundary32[2]; + var maxSpace2 = _getBranchBoundary32[3]; + + //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, getBranchBoundary(branchNodes2, maxLevel), maxLevel); + var diffBranch = Math.abs(max1 - min2); + if (diffBranch > _this2.options.hierarchical.nodeSpacing) { + var offset = max1 - min2 + _this2.options.hierarchical.nodeSpacing; + if (offset < -minSpace2 + _this2.options.hierarchical.nodeSpacing) { + offset = -minSpace2 + _this2.options.hierarchical.nodeSpacing; + //console.log("RESETTING OFFSET", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset); + } + if (offset < 0) { + //console.log("SHIFTING", node2.id, offset); + _this2._shiftBlock(node2.id, offset); + stillShifting = true; + + if (centerParent === true) _this2._centerParent(node2); + } + } + } + //this.body.emitter.emit("_redraw");}) + }; + + var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) { + //window.CALLBACKS.push(() => { + // console.log("ts",node.id); + var nodeId = node.id; + var allEdges = node.edges; + var nodeLevel = _this2.hierarchicalLevels[node.id]; + + // gather constants + var C2 = _this2.options.hierarchical.levelSeparation * _this2.options.hierarchical.levelSeparation; + var referenceNodes = {}; + var aboveEdges = []; + for (var i = 0; i < allEdges.length; i++) { + var edge = allEdges[i]; + if (edge.toId != edge.fromId) { + var otherNode = edge.toId == nodeId ? edge.from : edge.to; + referenceNodes[allEdges[i].id] = otherNode; + if (_this2.hierarchicalLevels[otherNode.id] < nodeLevel) { + aboveEdges.push(edge); + } + } + } + + // differentiated sum of lengths based on only moving one node over one axis + var getFx = function getFx(point, edges) { + var sum = 0; + for (var i = 0; i < edges.length; i++) { + if (referenceNodes[edges[i].id] !== undefined) { + var a = _this2._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + sum += a / Math.sqrt(a * a + C2); + } + } + return sum; + }; + + // doubly differentiated sum of lengths based on only moving one node over one axis + var getDFx = function getDFx(point, edges) { + var sum = 0; + for (var i = 0; i < edges.length; i++) { + if (referenceNodes[edges[i].id] !== undefined) { + var a = _this2._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + sum -= C2 * Math.pow(a * a + C2, -1.5); + } + } + return sum; + }; + + var getGuess = function getGuess(iterations, edges) { + var guess = _this2._getPositionForHierarchy(node); + // Newton's method for optimization + var guessMap = {}; + for (var i = 0; i < iterations; i++) { + var fx = getFx(guess, edges); + var dfx = getDFx(guess, edges); + + // we limit the movement to avoid instability. + var limit = 40; + var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx))); + guess = guess - ratio; + // reduce duplicates + if (guessMap[guess] !== undefined) { + break; + } + guessMap[guess] = i; + } + return guess; + }; + + var moveBranch = function moveBranch(guess) { + // position node if there is space + var nodePosition = _this2._getPositionForHierarchy(node); + + // check movable area of the branch + if (branches[node.id] === undefined) { + var branchNodes = {}; + branchNodes[node.id] = true; + getBranchNodes(node, branchNodes); + branches[node.id] = branchNodes; + } + + var _getBranchBoundary4 = getBranchBoundary(branches[node.id]); + + var _getBranchBoundary42 = _slicedToArray(_getBranchBoundary4, 4); + + var minBranch = _getBranchBoundary42[0]; + var maxBranch = _getBranchBoundary42[1]; + var minSpaceBranch = _getBranchBoundary42[2]; + var maxSpaceBranch = _getBranchBoundary42[3]; + + var diff = guess - nodePosition; + + // check if we are allowed to move the node: + var branchOffset = 0; + if (diff > 0) { + branchOffset = Math.min(diff, maxSpaceBranch - _this2.options.hierarchical.nodeSpacing); + } else if (diff < 0) { + branchOffset = -Math.min(-diff, minSpaceBranch - _this2.options.hierarchical.nodeSpacing); + } + + if (branchOffset != 0) { + //console.log("moving branch:",branchOffset, maxSpaceBranch, minSpaceBranch) + _this2._shiftBlock(node.id, branchOffset); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + var moveNode = function moveNode(guess) { + var nodePosition = _this2._getPositionForHierarchy(node); + + // position node if there is space + + var _getSpaceAroundNode3 = _this2._getSpaceAroundNode(node); + + var _getSpaceAroundNode32 = _slicedToArray(_getSpaceAroundNode3, 2); + + var minSpace = _getSpaceAroundNode32[0]; + var maxSpace = _getSpaceAroundNode32[1]; + + var diff = guess - nodePosition; + // check if we are allowed to move the node: + var newPosition = nodePosition; + if (diff > 0) { + newPosition = Math.min(nodePosition + (maxSpace - _this2.options.hierarchical.nodeSpacing), guess); + } else if (diff < 0) { + newPosition = Math.max(nodePosition - (minSpace - _this2.options.hierarchical.nodeSpacing), guess); + } + + if (newPosition !== nodePosition) { + //console.log("moving Node:",diff, minSpace, maxSpace); + _this2._setPositionForHierarchy(node, newPosition, undefined, true); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + var guess = getGuess(iterations, aboveEdges); + moveBranch(guess); + guess = getGuess(iterations, allEdges); + moveNode(guess); + //}) + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) { + var levels = Object.keys(_this2.distributionOrdering); + levels = levels.reverse(); + for (var i = 0; i < iterations; i++) { + stillShifting = false; + for (var j = 0; j < levels.length; j++) { + var level = levels[j]; + var levelNodes = _this2.distributionOrdering[level]; + for (var k = 0; k < levelNodes.length; k++) { + minimizeEdgeLength(1000, levelNodes[k]); + } + } + if (stillShifting !== true) { + //console.log("FINISHED minimizeEdgeLengthBottomUp IN " + i); + break; + } + } + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) { + var levels = Object.keys(_this2.distributionOrdering); + levels = levels.reverse(); + for (var i = 0; i < iterations; i++) { + stillShifting = false; + shiftElementsCloser(branchShiftCallback, levels, true); + if (stillShifting !== true) { + //console.log("FINISHED shiftBranchesCloserBottomUp IN " + (i+1)); + break; + } + } + }; + + // center all parents + var centerAllParents = function centerAllParents() { + for (var nodeId in _this2.body.nodes) { + if (_this2.body.nodes.hasOwnProperty(nodeId)) _this2._centerParent(_this2.body.nodes[nodeId]); + } + }; + + // center all parents + var centerAllParentsBottomUp = function centerAllParentsBottomUp() { + var levels = Object.keys(_this2.distributionOrdering); + levels = levels.reverse(); + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = _this2.distributionOrdering[level]; + for (var j = 0; j < levelNodes.length; j++) { + _this2._centerParent(levelNodes[j]); + } + } + }; + + // the actual work is done here. + if (this.options.hierarchical.blockShifting === true) { + shiftBranchesCloserBottomUp(5); + centerAllParents(); + } + + // minimize edge length + if (this.options.hierarchical.edgeMinimization === true) { + minimizeEdgeLengthBottomUp(20); + } + + if (this.options.hierarchical.parentCentralization === true) { + centerAllParentsBottomUp(); + } + + shiftTrees(); + } + + /** + * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map. + * This is used to only get the distances to nodes outside of a branch. + * @param node + * @param map + * @returns {*[]} + * @private + */ + }, { + key: '_getSpaceAroundNode', + value: function _getSpaceAroundNode(node, map) { + var useMap = true; + if (map === undefined) { + useMap = false; + } + var level = this.hierarchicalLevels[node.id]; + if (level !== undefined) { + var index = this.distributionIndex[node.id]; + var position = this._getPositionForHierarchy(node); + var minSpace = 1e9; + var maxSpace = 1e9; + if (index !== 0) { + var prevNode = this.distributionOrdering[level][index - 1]; + if (useMap === true && map[prevNode.id] === undefined || useMap === false) { + var prevPos = this._getPositionForHierarchy(prevNode); + minSpace = position - prevPos; + } + } + + if (index != this.distributionOrdering[level].length - 1) { + var nextNode = this.distributionOrdering[level][index + 1]; + if (useMap === true && map[nextNode.id] === undefined || useMap === false) { + var nextPos = this._getPositionForHierarchy(nextNode); + maxSpace = Math.min(maxSpace, nextPos - position); + } + } + + return [minSpace, maxSpace]; + } else { + return [0, 0]; + } + } + + /** + * We use this method to center a parent node and check if it does not cross other nodes when it does. + * @param node + * @private + */ + }, { + key: '_centerParent', + value: function _centerParent(node) { + if (this.hierarchicalParentReference[node.id]) { + var parents = this.hierarchicalParentReference[node.id]; + for (var i = 0; i < parents.length; i++) { + var parentId = parents[i]; + var parentNode = this.body.nodes[parentId]; + if (this.hierarchicalChildrenReference[parentId]) { + // get the range of the children + var minPos = 1e9; + var maxPos = -1e9; + var children = this.hierarchicalChildrenReference[parentId]; + if (children.length > 0) { + for (var _i = 0; _i < children.length; _i++) { + var childNode = this.body.nodes[children[_i]]; + minPos = Math.min(minPos, this._getPositionForHierarchy(childNode)); + maxPos = Math.max(maxPos, this._getPositionForHierarchy(childNode)); + } + } + + var position = this._getPositionForHierarchy(parentNode); + + var _getSpaceAroundNode4 = this._getSpaceAroundNode(parentNode); + + var _getSpaceAroundNode42 = _slicedToArray(_getSpaceAroundNode4, 2); + + var minSpace = _getSpaceAroundNode42[0]; + var maxSpace = _getSpaceAroundNode42[1]; + + var newPosition = 0.5 * (minPos + maxPos); + var diff = position - newPosition; + if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) { + this._setPositionForHierarchy(parentNode, newPosition, undefined, true); + } + } + } + } + } /** * This function places the nodes on the canvas based on the hierarchial distribution. @@ -39306,39 +40999,138 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} distribution | obtained by the function this._getDistribution() * @private */ + }, { + key: '_placeNodesByHierarchy', value: function _placeNodesByHierarchy(distribution) { - var nodeId = undefined, - node = undefined; this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches. for (var level in distribution) { if (distribution.hasOwnProperty(level)) { - for (nodeId in distribution[level].nodes) { - if (distribution[level].nodes.hasOwnProperty(nodeId)) { - - node = distribution[level].nodes[nodeId]; - - if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { - if (node.x === undefined) { - node.x = distribution[level].distance; - } - distribution[level].distance = node.x + this.nodeSpacing; - } else { - if (node.y === undefined) { - node.y = distribution[level].distance; - } - distribution[level].distance = node.y + this.nodeSpacing; + // sort nodes in level by position: + var nodeArray = Object.keys(distribution[level]); + nodeArray = this._indexArrayToNodes(nodeArray); + this._sortNodeArray(nodeArray); + var handledNodeCount = 0; + + for (var i = 0; i < nodeArray.length; i++) { + var node = nodeArray[i]; + if (this.positionedNodes[node.id] === undefined) { + var pos = this.options.hierarchical.nodeSpacing * handledNodeCount; + // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y + if (handledNodeCount > 0) { + pos = this._getPositionForHierarchy(nodeArray[i - 1]) + this.options.hierarchical.nodeSpacing; } + this._setPositionForHierarchy(node, pos, level); + this._validataPositionAndContinue(node, level, pos); - this.positionedNodes[nodeId] = true; - this._placeBranchNodes(node.edges, node.id, distribution, level); + handledNodeCount++; } } } } } + + /** + * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes + * on a X position that ensures there will be no overlap. + * + * @param parentId + * @param parentLevel + * @private + */ }, { - key: '_getDistribution', + key: '_placeBranchNodes', + value: function _placeBranchNodes(parentId, parentLevel) { + // if this is not a parent, cancel the placing. This can happen with multiple parents to one child. + if (this.hierarchicalChildrenReference[parentId] === undefined) { + return; + } + + // get a list of childNodes + var childNodes = []; + for (var i = 0; i < this.hierarchicalChildrenReference[parentId].length; i++) { + childNodes.push(this.body.nodes[this.hierarchicalChildrenReference[parentId][i]]); + } + + // use the positions to order the nodes. + this._sortNodeArray(childNodes); + + // position the childNodes + for (var i = 0; i < childNodes.length; i++) { + var childNode = childNodes[i]; + var childNodeLevel = this.hierarchicalLevels[childNode.id]; + // check if the child node is below the parent node and if it has already been positioned. + if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { + // get the amount of space required for this node. If parent the width is based on the amount of children. + var pos = undefined; + + // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y + if (i === 0) { + pos = this._getPositionForHierarchy(this.body.nodes[parentId]); + } else { + pos = this._getPositionForHierarchy(childNodes[i - 1]) + this.options.hierarchical.nodeSpacing; + } + this._setPositionForHierarchy(childNode, pos, childNodeLevel); + this._validataPositionAndContinue(childNode, childNodeLevel, pos); + } else { + return; + } + } + + // center the parent nodes. + var minPos = 1e9; + var maxPos = -1e9; + for (var i = 0; i < childNodes.length; i++) { + var childNodeId = childNodes[i].id; + minPos = Math.min(minPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); + maxPos = Math.max(maxPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); + } + this._setPositionForHierarchy(this.body.nodes[parentId], 0.5 * (minPos + maxPos), parentLevel); + } + + /** + * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes. + * Finally it will call _placeBranchNodes to place the branch nodes. + * @param node + * @param level + * @param pos + * @private + */ + }, { + key: '_validataPositionAndContinue', + value: function _validataPositionAndContinue(node, level, pos) { + // if overlap has been detected, we shift the branch + if (this.lastNodeOnLevel[level] !== undefined) { + var previousPos = this._getPositionForHierarchy(this.body.nodes[this.lastNodeOnLevel[level]]); + if (pos - previousPos < this.options.hierarchical.nodeSpacing) { + var diff = previousPos + this.options.hierarchical.nodeSpacing - pos; + var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id); + this._shiftBlock(sharedParent.withChild, diff); + } + } + + // store change in position. + this.lastNodeOnLevel[level] = node.id; + + this.positionedNodes[node.id] = true; + + this._placeBranchNodes(node.id, level); + } + + /** + * Receives an array with node indices and returns an array with the actual node references. Used for sorting based on + * node properties. + * @param idArray + */ + }, { + key: '_indexArrayToNodes', + value: function _indexArrayToNodes(idArray) { + var array = []; + for (var i = 0; i < idArray.length; i++) { + array.push(this.body.nodes[idArray[i]]); + } + return array; + } /** * This function get the distribution of levels based on hubsize @@ -39346,6 +41138,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {Object} * @private */ + }, { + key: '_getDistribution', value: function _getDistribution() { var distribution = {}; var nodeId = undefined, @@ -39365,16 +41159,13 @@ return /******/ (function(modules) { // webpackBootstrap node.options.fixed.x = true; } if (distribution[level] === undefined) { - distribution[level] = { amount: 0, nodes: {}, distance: 0 }; + distribution[level] = {}; } - distribution[level].amount += 1; - distribution[level].nodes[nodeId] = node; + distribution[level][nodeId] = node; } } return distribution; } - }, { - key: '_getHubSize', /** * Get the hubsize from all remaining unlevelled nodes. @@ -39382,6 +41173,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} * @private */ + }, { + key: '_getHubSize', value: function _getHubSize() { var hubSize = 0; for (var nodeId in this.body.nodes) { @@ -39394,8 +41187,6 @@ return /******/ (function(modules) { // webpackBootstrap } return hubSize; } - }, { - key: '_determineLevelsByHubsize', /** * this function allocates nodes in levels based on the recursive branching from the largest hubs. @@ -39403,53 +41194,69 @@ return /******/ (function(modules) { // webpackBootstrap * @param hubsize * @private */ + }, { + key: '_determineLevelsByHubsize', value: function _determineLevelsByHubsize() { - var nodeId = undefined, - node = undefined; + var _this3 = this; + var hubSize = 1; + var levelDownstream = function levelDownstream(nodeA, nodeB) { + if (_this3.hierarchicalLevels[nodeB.id] === undefined) { + // set initial level + if (_this3.hierarchicalLevels[nodeA.id] === undefined) { + _this3.hierarchicalLevels[nodeA.id] = 0; + } + // set level + _this3.hierarchicalLevels[nodeB.id] = _this3.hierarchicalLevels[nodeA.id] + 1; + } + }; + while (hubSize > 0) { // determine hubs hubSize = this._getHubSize(); if (hubSize === 0) break; - for (nodeId in this.body.nodes) { + for (var nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - node = this.body.nodes[nodeId]; + var node = this.body.nodes[nodeId]; if (node.edges.length === hubSize) { - this._setLevelByHubsize(0, node); + this._crawlNetwork(levelDownstream, nodeId); } } } } } - }, { - key: '_setLevelByHubsize', /** - * this function is called recursively to enumerate the barnches of the largest hubs and give each node a level. - * - * @param level - * @param edges - * @param parentId + * TODO: release feature * @private */ - value: function _setLevelByHubsize(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) return; + }, { + key: '_determineLevelsCustomCallback', + value: function _determineLevelsCustomCallback() { + var _this4 = this; - var childNode = undefined; - this.hierarchicalLevels[node.id] = level; - for (var i = 0; i < node.edges.length; i++) { - if (node.edges[i].toId === node.id) { - childNode = node.edges[i].from; - } else { - childNode = node.edges[i].to; + var minLevel = 100000; + + // TODO: this should come from options. + var customCallback = function customCallback(nodeA, nodeB, edge) {}; + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this4.hierarchicalLevels[nodeA.id]; + // set initial level + if (levelA === undefined) { + _this4.hierarchicalLevels[nodeA.id] = minLevel; } - this._setLevelByHubsize(level + 1, childNode); - } + + var diff = customCallback(_NetworkUtil2['default'].cloneOptions(nodeA, 'node'), _NetworkUtil2['default'].cloneOptions(nodeB, 'node'), _NetworkUtil2['default'].cloneOptions(edge, 'edge')); + + _this4.hierarchicalLevels[nodeB.id] = _this4.hierarchicalLevels[nodeA.id] + diff; + }; + + this._crawlNetwork(levelByDirection); + this._setMinLevelToZero(); } - }, { - key: '_determineLevelsDirected', /** * this function allocates nodes in levels based on the direction of the edges @@ -39457,108 +41264,274 @@ return /******/ (function(modules) { // webpackBootstrap * @param hubsize * @private */ + }, { + key: '_determineLevelsDirected', value: function _determineLevelsDirected() { - var nodeId = undefined, - node = undefined; - var minLevel = 10000; + var _this5 = this; - // set first node to source - for (nodeId in this.body.nodes) { - if (this.body.nodes.hasOwnProperty(nodeId)) { - node = this.body.nodes[nodeId]; - this._setLevelDirected(minLevel, node); + var minLevel = 10000; + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this5.hierarchicalLevels[nodeA.id]; + // set initial level + if (levelA === undefined) { + _this5.hierarchicalLevels[nodeA.id] = minLevel; + } + if (edge.toId == nodeB.id) { + _this5.hierarchicalLevels[nodeB.id] = _this5.hierarchicalLevels[nodeA.id] + 1; + } else { + _this5.hierarchicalLevels[nodeB.id] = _this5.hierarchicalLevels[nodeA.id] - 1; } - } + }; + this._crawlNetwork(levelByDirection); + this._setMinLevelToZero(); + } + /** + * Small util method to set the minimum levels of the nodes to zero. + * @private + */ + }, { + key: '_setMinLevelToZero', + value: function _setMinLevelToZero() { + var minLevel = 1e9; // get the minimum level - for (nodeId in this.body.nodes) { + for (var nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - minLevel = this.hierarchicalLevels[nodeId] < minLevel ? this.hierarchicalLevels[nodeId] : minLevel; + if (this.hierarchicalLevels[nodeId] !== undefined) { + minLevel = Math.min(this.hierarchicalLevels[nodeId], minLevel); + } } } // subtract the minimum from the set so we have a range starting from 0 - for (nodeId in this.body.nodes) { + for (var nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - this.hierarchicalLevels[nodeId] -= minLevel; + if (this.hierarchicalLevels[nodeId] !== undefined) { + this.hierarchicalLevels[nodeId] -= minLevel; + } } } } + + /** + * Update the bookkeeping of parent and child. + * @private + */ }, { - key: '_setLevelDirected', + key: '_generateMap', + value: function _generateMap() { + var _this6 = this; + + var fillInRelations = function fillInRelations(parentNode, childNode) { + if (_this6.hierarchicalLevels[childNode.id] > _this6.hierarchicalLevels[parentNode.id]) { + var parentNodeId = parentNode.id; + var childNodeId = childNode.id; + if (_this6.hierarchicalChildrenReference[parentNodeId] === undefined) { + _this6.hierarchicalChildrenReference[parentNodeId] = []; + } + _this6.hierarchicalChildrenReference[parentNodeId].push(childNodeId); + if (_this6.hierarchicalParentReference[childNodeId] === undefined) { + _this6.hierarchicalParentReference[childNodeId] = []; + } + _this6.hierarchicalParentReference[childNodeId].push(parentNodeId); + } + }; + + this._crawlNetwork(fillInRelations); + } /** - * this function is called recursively to enumerate the branched of the first node and give each node a level based on edge direction - * - * @param level - * @param edges - * @param parentId + * Crawl over the entire network and use a callback on each node couple that is connected to each other. + * @param callback | will receive nodeA nodeB and the connecting edge. A and B are unique. + * @param startingNodeId * @private */ - value: function _setLevelDirected(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) return; + }, { + key: '_crawlNetwork', + value: function _crawlNetwork(callback, startingNodeId) { + var _this7 = this; - var childNode = undefined; - this.hierarchicalLevels[node.id] = level; + if (callback === undefined) callback = function () {}; - for (var i = 0; i < node.edges.length; i++) { - if (node.edges[i].toId === node.id) { - childNode = node.edges[i].from; - this._setLevelDirected(level - 1, childNode); - } else { - childNode = node.edges[i].to; - this._setLevelDirected(level + 1, childNode); + var progress = {}; + var treeIndex = 0; + + var crawler = function crawler(node, tree) { + if (progress[node.id] === undefined) { + + if (_this7.hierarchicalTrees[node.id] === undefined) { + _this7.hierarchicalTrees[node.id] = tree; + _this7.treeIndex = Math.max(tree, _this7.treeIndex); + } + + progress[node.id] = true; + var childNode = undefined; + for (var i = 0; i < node.edges.length; i++) { + if (node.edges[i].connected === true) { + if (node.edges[i].toId === node.id) { + childNode = node.edges[i].from; + } else { + childNode = node.edges[i].to; + } + + if (node.id !== childNode.id) { + callback(node, childNode, node.edges[i]); + crawler(childNode, tree); + } + } + } } + }; + + // we can crawl from a specific node or over all nodes. + if (startingNodeId === undefined) { + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + if (progress[node.id] === undefined) { + crawler(node, treeIndex); + treeIndex += 1; + } + } + } else { + var node = this.body.nodes[startingNodeId]; + if (node === undefined) { + console.error("Node not found:", startingNodeId); + return; + } + crawler(node); } } - }, { - key: '_placeBranchNodes', /** - * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes - * on a X position that ensures there will be no overlap. - * - * @param edges + * Shift a branch a certain distance * @param parentId - * @param distribution - * @param parentLevel + * @param diff * @private */ - value: function _placeBranchNodes(edges, parentId, distribution, parentLevel) { - for (var i = 0; i < edges.length; i++) { - var childNode = undefined; - var parentNode = undefined; - if (edges[i].toId === parentId) { - childNode = edges[i].from; - parentNode = edges[i].to; - } else { - childNode = edges[i].to; - parentNode = edges[i].from; + }, { + key: '_shiftBlock', + value: function _shiftBlock(parentId, diff) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + this.body.nodes[parentId].x += diff; + } else { + this.body.nodes[parentId].y += diff; + } + if (this.hierarchicalChildrenReference[parentId] !== undefined) { + for (var i = 0; i < this.hierarchicalChildrenReference[parentId].length; i++) { + this._shiftBlock(this.hierarchicalChildrenReference[parentId][i], diff); } - var childNodeLevel = this.hierarchicalLevels[childNode.id]; + } + } - if (this.positionedNodes[childNode.id] === undefined) { - // if a node is conneceted to another node on the same level (or higher (means lower level))!, this is not handled here. - if (childNodeLevel > parentLevel) { - if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { - if (childNode.x === undefined) { - childNode.x = Math.max(distribution[childNodeLevel].distance, parentNode.x); - } - distribution[childNodeLevel].distance = childNode.x + this.nodeSpacing; - this.positionedNodes[childNode.id] = true; - } else { - if (childNode.y === undefined) { - childNode.y = Math.max(distribution[childNodeLevel].distance, parentNode.y); - } - distribution[childNodeLevel].distance = childNode.y + this.nodeSpacing; - } - this.positionedNodes[childNode.id] = true; + /** + * Find a common parent between branches. + * @param childA + * @param childB + * @returns {{foundParent, withChild}} + * @private + */ + }, { + key: '_findCommonParent', + value: function _findCommonParent(childA, childB) { + var _this8 = this; - if (childNode.edges.length > 1) { - this._placeBranchNodes(childNode.edges, childNode.id, distribution, childNodeLevel); + var parents = {}; + var iterateParents = function iterateParents(parents, child) { + if (_this8.hierarchicalParentReference[child] !== undefined) { + for (var i = 0; i < _this8.hierarchicalParentReference[child].length; i++) { + var _parent = _this8.hierarchicalParentReference[child][i]; + parents[_parent] = true; + iterateParents(parents, _parent); + } + } + }; + var findParent = function findParent(parents, child) { + if (_this8.hierarchicalParentReference[child] !== undefined) { + for (var i = 0; i < _this8.hierarchicalParentReference[child].length; i++) { + var _parent2 = _this8.hierarchicalParentReference[child][i]; + if (parents[_parent2] !== undefined) { + return { foundParent: _parent2, withChild: child }; + } + var branch = findParent(parents, _parent2); + if (branch.foundParent !== null) { + return branch; } } } + return { foundParent: null, withChild: child }; + }; + + iterateParents(parents, childA); + return findParent(parents, childB); + } + + /** + * Abstract the getting of the position so we won't have to repeat the check for direction all the time + * @param node + * @param position + * @param level + * @private + */ + }, { + key: '_setPositionForHierarchy', + value: function _setPositionForHierarchy(node, position, level) { + var doNotUpdate = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + + //console.log('_setPositionForHierarchy',node.id, position) + if (doNotUpdate !== true) { + if (this.distributionOrdering[level] === undefined) { + this.distributionOrdering[level] = []; + this.distributionOrderingPresence[level] = {}; + } + + if (this.distributionOrderingPresence[level][node.id] === undefined) { + this.distributionOrdering[level].push(node); + this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1; + } + this.distributionOrderingPresence[level][node.id] = true; + } + + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + node.x = position; + } else { + node.y = position; + } + } + + /** + * Abstract the getting of the position of a node so we do not have to repeat the direction check all the time. + * @param node + * @returns {number|*} + * @private + */ + }, { + key: '_getPositionForHierarchy', + value: function _getPositionForHierarchy(node) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + return node.x; + } else { + return node.y; + } + } + + /** + * Use the x or y value to sort the array, allowing users to specify order. + * @param nodeArray + * @private + */ + }, { + key: '_sortNodeArray', + value: function _sortNodeArray(nodeArray) { + if (nodeArray.length > 1) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + nodeArray.sort(function (a, b) { + return a.x - b.x; + }); + } else { + nodeArray.sort(function (a, b) { + return a.y - b.y; + }); + } } } }]); @@ -39585,7 +41558,7 @@ return /******/ (function(modules) { // webpackBootstrap var util = __webpack_require__(1); var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(25); + var hammerUtil = __webpack_require__(24); /** * clears the toolbar div element of children @@ -39645,13 +41618,13 @@ return /******/ (function(modules) { // webpackBootstrap this.body.emitter.on('_resetData', this._restore.bind(this)); } + /** + * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes. + * @private + */ + _createClass(ManipulationSystem, [{ key: '_restore', - - /** - * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes. - * @private - */ value: function _restore() { if (this.inMode !== false) { if (this.options.initiallyActive === true) { @@ -39661,13 +41634,13 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: 'setOptions', /** * Set the Options * @param options */ + }, { + key: 'setOptions', value: function setOptions(options, allOptions, globalOptions) { if (allOptions !== undefined) { if (allOptions.locale !== undefined) { @@ -39695,14 +41668,14 @@ return /******/ (function(modules) { // webpackBootstrap this._setup(); } } - }, { - key: 'toggleEditMode', /** * Enable or disable edit-mode. Draws the DOM required and cleans up after itself. * * @private */ + }, { + key: 'toggleEditMode', value: function toggleEditMode() { if (this.editMode === true) { this.disableEditMode(); @@ -39736,19 +41709,19 @@ return /******/ (function(modules) { // webpackBootstrap this._createEditButton(); } } - }, { - key: 'showManipulatorToolbar', /** * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar. * * @private */ + }, { + key: 'showManipulatorToolbar', value: function showManipulatorToolbar() { // restore the state of any bound functions or events, remove control nodes, restore physics this._clean(); - // reset global letiables + // reset global variables this.manipulationDOM = {}; // if the gui is enabled, draw all elements. @@ -39818,14 +41791,12 @@ return /******/ (function(modules) { // webpackBootstrap // redraw to show any possible changes this.body.emitter.emit('_redraw'); } - }, { - key: 'addNodeMode', /** * Create the toolbar for adding Nodes - * - * @private */ + }, { + key: 'addNodeMode', value: function addNodeMode() { // when using the gui, enable edit mode if it wasnt already. if (this.editMode !== true) { @@ -39849,14 +41820,12 @@ return /******/ (function(modules) { // webpackBootstrap this._temporaryBindEvent('click', this._performAddNode.bind(this)); } - }, { - key: 'editNode', /** * call the bound function to handle the editing of the node. The node has to be selected. - * - * @private */ + }, { + key: 'editNode', value: function editNode() { var _this2 = this; @@ -39872,7 +41841,7 @@ return /******/ (function(modules) { // webpackBootstrap this.inMode = 'editNode'; if (typeof this.options.editNode === 'function') { if (node.isCluster !== true) { - var data = util.deepExtend({}, node.options, true); + var data = util.deepExtend({}, node.options, false); data.x = node.x; data.y = node.y; @@ -39897,14 +41866,12 @@ return /******/ (function(modules) { // webpackBootstrap this.showManipulatorToolbar(); } } - }, { - key: 'addEdgeMode', /** * create the toolbar to connect nodes - * - * @private */ + }, { + key: 'addEdgeMode', value: function addEdgeMode() { // when using the gui, enable edit mode if it wasnt already. if (this.editMode !== true) { @@ -39935,18 +41902,16 @@ return /******/ (function(modules) { // webpackBootstrap this._temporaryBindUI('onDragStart', function () {}); this._temporaryBindUI('onHold', function () {}); } - }, { - key: 'editEdgeMode', /** * create the toolbar to edit edges - * - * @private */ + }, { + key: 'editEdgeMode', value: function editEdgeMode() { var _this3 = this; - // when using the gui, enable edit mode if it wasnt already. + // when using the gui, enable edit mode if it wasn't already. if (this.editMode !== true) { this.enableEditMode(); } @@ -40012,14 +41977,12 @@ return /******/ (function(modules) { // webpackBootstrap this.showManipulatorToolbar(); } } - }, { - key: 'deleteSelected', /** * delete everything in the selection - * - * @private */ + }, { + key: 'deleteSelected', value: function deleteSelected() { var _this4 = this; @@ -40077,8 +42040,6 @@ return /******/ (function(modules) { // webpackBootstrap this.showManipulatorToolbar(); } } - }, { - key: '_setup', //********************************************** PRIVATE ***************************************// @@ -40086,6 +42047,8 @@ return /******/ (function(modules) { // webpackBootstrap * draw or remove the DOM * @private */ + }, { + key: '_setup', value: function _setup() { if (this.options.enabled === true) { // Enable the GUI @@ -40104,13 +42067,13 @@ return /******/ (function(modules) { // webpackBootstrap this.guiEnabled = false; } } - }, { - key: '_createWrappers', /** * create the div overlays that contain the DOM * @private */ + }, { + key: '_createWrappers', value: function _createWrappers() { // load the manipulator HTML elements. All styling done in css. if (this.manipulationDiv === undefined) { @@ -40144,8 +42107,6 @@ return /******/ (function(modules) { // webpackBootstrap this.canvas.frame.appendChild(this.closeDiv); } } - }, { - key: '_getNewTargetNode', /** * generate a new target node. Used for creating new edges and editing edges @@ -40154,6 +42115,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*} * @private */ + }, { + key: '_getNewTargetNode', value: function _getNewTargetNode(x, y) { var controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle); @@ -40163,14 +42126,18 @@ return /******/ (function(modules) { // webpackBootstrap controlNodeStyle.x = x; controlNodeStyle.y = y; - return this.body.functions.createNode(controlNodeStyle); + // we have to define the bounding box in order for the nodes to be drawn immediately + var node = this.body.functions.createNode(controlNodeStyle); + node.shape.boundingBox = { left: x, right: x, top: y, bottom: y }; + + return node; } - }, { - key: '_createEditButton', /** * Create the edit button */ + }, { + key: '_createEditButton', value: function _createEditButton() { // restore everything to it's original state (if applicable) this._clean(); @@ -40189,13 +42156,13 @@ return /******/ (function(modules) { // webpackBootstrap // bind a hammer listener to the button, calling the function toggleEditMode. this._bindHammerToDiv(button, this.toggleEditMode.bind(this)); } - }, { - key: '_clean', /** * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed. * @private */ + }, { + key: '_clean', value: function _clean() { // not in mode this.inMode = false; @@ -40221,13 +42188,13 @@ return /******/ (function(modules) { // webpackBootstrap // restore the physics if required this.body.emitter.emit('restorePhysics'); } - }, { - key: '_cleanManipulatorHammers', /** * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up. * @private */ + }, { + key: '_cleanManipulatorHammers', value: function _cleanManipulatorHammers() { // _clean hammer bindings if (this.manipulationHammers.length != 0) { @@ -40237,13 +42204,13 @@ return /******/ (function(modules) { // webpackBootstrap this.manipulationHammers = []; } } - }, { - key: '_removeManipulationDOM', /** * Remove all DOM elements created by this module. * @private */ + }, { + key: '_removeManipulationDOM', value: function _removeManipulationDOM() { // removes all the bindings and overloads this._clean(); @@ -40261,7 +42228,7 @@ return /******/ (function(modules) { // webpackBootstrap this.canvas.frame.removeChild(this.editModeDiv); } if (this.closeDiv) { - this.canvas.frame.removeChild(this.manipulationDiv); + this.canvas.frame.removeChild(this.closeDiv); } // set the references to undefined @@ -40269,14 +42236,14 @@ return /******/ (function(modules) { // webpackBootstrap this.editModeDiv = undefined; this.closeDiv = undefined; } - }, { - key: '_createSeperator', /** * create a seperator line. the index is to differentiate in the manipulation dom * @param index * @private */ + }, { + key: '_createSeperator', value: function _createSeperator() { var index = arguments.length <= 0 || arguments[0] === undefined ? 1 : arguments[0]; @@ -40284,11 +42251,11 @@ return /******/ (function(modules) { // webpackBootstrap this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line'; this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]); } - }, { - key: '_createAddNodeButton', // ---------------------- DOM functions for buttons --------------------------// + }, { + key: '_createAddNodeButton', value: function _createAddNodeButton(locale) { var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']); this.manipulationDiv.appendChild(button); @@ -40347,8 +42314,6 @@ return /******/ (function(modules) { // webpackBootstrap value: function _createDescription(label) { this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label)); } - }, { - key: '_temporaryBindEvent', // -------------------------- End of DOM functions for buttons ------------------------------// @@ -40358,12 +42323,12 @@ return /******/ (function(modules) { // webpackBootstrap * @param newFunction * @private */ + }, { + key: '_temporaryBindEvent', value: function _temporaryBindEvent(event, newFunction) { this.temporaryEventFunctions.push({ event: event, boundFunction: newFunction }); this.body.emitter.on(event, newFunction); } - }, { - key: '_temporaryBindUI', /** * this overrides an UI function until cleanup by the clean function @@ -40371,6 +42336,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param newFunction * @private */ + }, { + key: '_temporaryBindUI', value: function _temporaryBindUI(UIfunctionName, newFunction) { if (this.body.eventListeners[UIfunctionName] !== undefined) { this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName]; @@ -40379,14 +42346,14 @@ return /******/ (function(modules) { // webpackBootstrap throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners))); } } - }, { - key: '_unbindTemporaryUIs', /** * Restore the overridden UI functions to their original state. * * @private */ + }, { + key: '_unbindTemporaryUIs', value: function _unbindTemporaryUIs() { for (var functionName in this.temporaryUIFunctions) { if (this.temporaryUIFunctions.hasOwnProperty(functionName)) { @@ -40396,13 +42363,13 @@ return /******/ (function(modules) { // webpackBootstrap } this.temporaryUIFunctions = {}; } - }, { - key: '_unbindTemporaryEvents', /** * Unbind the events created by _temporaryBindEvent * @private */ + }, { + key: '_unbindTemporaryEvents', value: function _unbindTemporaryEvents() { for (var i = 0; i < this.temporaryEventFunctions.length; i++) { var eventName = this.temporaryEventFunctions[i].event; @@ -40411,26 +42378,26 @@ return /******/ (function(modules) { // webpackBootstrap } this.temporaryEventFunctions = []; } - }, { - key: '_bindHammerToDiv', /** * Bind an hammer instance to a DOM element. * @param domElement * @param funct */ + }, { + key: '_bindHammerToDiv', value: function _bindHammerToDiv(domElement, boundFunction) { var hammer = new Hammer(domElement, {}); hammerUtil.onTouch(hammer, boundFunction); this.manipulationHammers.push(hammer); } - }, { - key: '_cleanupTemporaryNodesAndEdges', /** * Neatly clean up temporary edges and nodes * @private */ + }, { + key: '_cleanupTemporaryNodesAndEdges', value: function _cleanupTemporaryNodesAndEdges() { // _clean temporary edges for (var i = 0; i < this.temporaryIds.edges.length; i++) { @@ -40453,8 +42420,6 @@ return /******/ (function(modules) { // webpackBootstrap this.temporaryIds = { nodes: [], edges: [] }; } - }, { - key: '_controlNodeTouch', // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------// @@ -40463,19 +42428,21 @@ return /******/ (function(modules) { // webpackBootstrap * @param event * @private */ + }, { + key: '_controlNodeTouch', value: function _controlNodeTouch(event) { this.selectionHandler.unselectAll(); this.lastTouch = this.body.functions.getPointer(event.center); this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object } - }, { - key: '_controlNodeDragStart', /** * the drag start is used to mark one of the control nodes as selected. * @param event * @private */ + }, { + key: '_controlNodeDragStart', value: function _controlNodeDragStart(event) { var pointer = this.lastTouch; var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); @@ -40495,21 +42462,25 @@ return /******/ (function(modules) { // webpackBootstrap edge.edgeType.to = to; } + // we use the selection to find the node that is being dragged. We explicitly select it here. + if (this.selectedControlNode !== undefined) { + this.selectionHandler.selectObject(this.selectedControlNode); + } + this.body.emitter.emit('_redraw'); } - }, { - key: '_controlNodeDrag', /** * dragging the control nodes or the canvas * @param event * @private */ + }, { + key: '_controlNodeDrag', value: function _controlNodeDrag(event) { this.body.emitter.emit('disablePhysics'); var pointer = this.body.functions.getPointer(event.center); var pos = this.canvas.DOMtoCanvas(pointer); - if (this.selectedControlNode !== undefined) { this.selectedControlNode.x = pos.x; this.selectedControlNode.y = pos.y; @@ -40521,19 +42492,25 @@ return /******/ (function(modules) { // webpackBootstrap } this.body.emitter.emit('_redraw'); } - }, { - key: '_controlNodeDragEnd', /** * connecting or restoring the control nodes. * @param event * @private */ + }, { + key: '_controlNodeDragEnd', value: function _controlNodeDragEnd(event) { var pointer = this.body.functions.getPointer(event.center); var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); var edge = this.body.edges[this.edgeBeingEditedId]; + // if the node that was dragged is not a control node, return + if (this.selectedControlNode === undefined) { + return; + } + // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here. + this.selectionHandler.unselectAll(); var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); var node = undefined; for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { @@ -40542,7 +42519,6 @@ return /******/ (function(modules) { // webpackBootstrap break; } } - // perform the connection if (node !== undefined && this.selectedControlNode !== undefined) { if (node.isCluster === true) { @@ -40561,8 +42537,6 @@ return /******/ (function(modules) { // webpackBootstrap } this.body.emitter.emit('_redraw'); } - }, { - key: '_handleConnect', // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------// @@ -40573,6 +42547,8 @@ return /******/ (function(modules) { // webpackBootstrap * * @private */ + }, { + key: '_handleConnect', value: function _handleConnect(event) { // check to avoid double fireing of this function. if (new Date().valueOf() - this.touchTime > 100) { @@ -40628,14 +42604,14 @@ return /******/ (function(modules) { // webpackBootstrap this.body.view.translation = { x: this.lastTouch.translation.x + diffX, y: this.lastTouch.translation.y + diffY }; } } - }, { - key: '_finishConnect', /** * Connect the new edge to the target if one exists, otherwise remove temp line * @param event * @private */ + }, { + key: '_finishConnect', value: function _finishConnect(event) { var pointer = this.body.functions.getPointer(event.center); var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); @@ -40672,8 +42648,6 @@ return /******/ (function(modules) { // webpackBootstrap } this.body.emitter.emit('_redraw'); } - }, { - key: '_performAddNode', // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------// @@ -40682,6 +42656,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * Adds a node on the specified location */ + }, { + key: '_performAddNode', value: function _performAddNode(clickData) { var _this5 = this; @@ -40710,14 +42686,14 @@ return /******/ (function(modules) { // webpackBootstrap this.showManipulatorToolbar(); } } - }, { - key: '_performAddEdge', /** * connect two nodes with a new edge. * * @private */ + }, { + key: '_performAddEdge', value: function _performAddEdge(sourceNodeId, targetNodeId) { var _this6 = this; @@ -40741,14 +42717,14 @@ return /******/ (function(modules) { // webpackBootstrap this.showManipulatorToolbar(); } } - }, { - key: '_performEditEdge', /** * connect two nodes with a new edge. * * @private */ + }, { + key: '_performEditEdge', value: function _performEditEdge(sourceNodeId, targetNodeId) { var _this7 = this; @@ -40822,6 +42798,7 @@ return /******/ (function(modules) { // webpackBootstrap from: { enabled: { boolean: boolean }, scaleFactor: { number: number }, __type__: { object: object, boolean: boolean } }, __type__: { string: ['from', 'to', 'middle'], object: object } }, + arrowStrikethrough: { boolean: boolean }, color: { color: { string: string }, highlight: { string: string }, @@ -40865,6 +42842,7 @@ return /******/ (function(modules) { // webpackBootstrap selfReferenceSize: { number: number }, shadow: { enabled: { boolean: boolean }, + color: { string: string }, size: { number: number }, x: { number: number }, y: { number: number }, @@ -40914,6 +42892,11 @@ return /******/ (function(modules) { // webpackBootstrap hierarchical: { enabled: { boolean: boolean }, levelSeparation: { number: number }, + nodeSpacing: { number: number }, + treeSpacing: { number: number }, + blockShifting: { boolean: boolean }, + edgeMinimization: { boolean: boolean }, + parentCentralization: { boolean: boolean }, direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed __type__: { object: object, boolean: boolean } @@ -40997,6 +42980,7 @@ return /******/ (function(modules) { // webpackBootstrap }, shadow: { enabled: { boolean: boolean }, + color: { string: string }, size: { number: number }, x: { number: number }, y: { number: number }, @@ -41006,7 +42990,9 @@ return /******/ (function(modules) { // webpackBootstrap shapeProperties: { borderDashes: { boolean: boolean, array: array }, borderRadius: { number: number }, + interpolation: { boolean: boolean }, useImageSize: { boolean: boolean }, + useBorderWithImage: { boolean: boolean }, __type__: { object: object } }, size: { number: number }, @@ -41136,6 +43122,7 @@ return /******/ (function(modules) { // webpackBootstrap }, shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: [10, 0, 20, 1], x: [5, -30, 30, 1], y: [5, -30, 30, 1] @@ -41144,6 +43131,7 @@ return /******/ (function(modules) { // webpackBootstrap shapeProperties: { borderDashes: false, borderRadius: [6, 0, 20, 1], + interpolation: true, useImageSize: false }, size: [25, 0, 200, 1] @@ -41154,6 +43142,7 @@ return /******/ (function(modules) { // webpackBootstrap middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05] }, from: { enabled: false, scaleFactor: [1, 0, 3, 0.05] } }, + arrowStrikethrough: true, color: { color: ['color', '#848484'], highlight: ['color', '#848484'], @@ -41190,6 +43179,7 @@ return /******/ (function(modules) { // webpackBootstrap selfReferenceSize: [20, 0, 200, 1], shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: [10, 0, 20, 1], x: [5, -30, 30, 1], y: [5, -30, 30, 1] @@ -41208,6 +43198,11 @@ return /******/ (function(modules) { // webpackBootstrap hierarchical: { enabled: false, levelSeparation: [150, 20, 500, 5], + nodeSpacing: [100, 20, 500, 5], + treeSpacing: [200, 20, 500, 5], + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL sortMethod: ['hubsize', 'directed'] // hubsize, directed } @@ -41274,6 +43269,7 @@ return /******/ (function(modules) { // webpackBootstrap solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'], timestep: [0.5, 0.01, 1, 0.01] }, + //adaptiveTimestep: true global: { locale: ['en', 'nl'] } @@ -41281,16 +43277,11 @@ return /******/ (function(modules) { // webpackBootstrap exports.allOptions = allOptions; exports.configureOptions = configureOptions; - //adaptiveTimestep: true /***/ }, /* 111 */ /***/ function(module, exports, __webpack_require__) { - /** - * Created by Alex on 8/7/2015. - */ - // distance finding algorithm "use strict"; @@ -41329,13 +43320,13 @@ return /******/ (function(modules) { // webpackBootstrap this.distanceSolver = new _componentsAlgorithmsFloydWarshallJs2["default"](); } + /** + * Not sure if needed but can be used to update the spring length and spring constant + * @param options + */ + _createClass(KamadaKawai, [{ key: "setOptions", - - /** - * Not sure if needed but can be used to update the spring length and spring constant - * @param options - */ value: function setOptions(options) { if (options) { if (options.springLength) { @@ -41346,14 +43337,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "solve", /** * Position the system * @param nodesArray * @param edgesArray */ + }, { + key: "solve", value: function solve(nodesArray, edgesArray) { var ignoreClusters = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; @@ -41408,14 +43399,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_getHighestEnergyNode", /** * get the node with the highest energy * @returns {*[]} * @private */ + }, { + key: "_getHighestEnergyNode", value: function _getHighestEnergyNode(ignoreClusters) { var nodesArray = this.body.nodeIndices; var nodes = this.body.nodes; @@ -41447,8 +43438,6 @@ return /******/ (function(modules) { // webpackBootstrap return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max]; } - }, { - key: "_getEnergy", /** * calculate the energy of a single node @@ -41456,6 +43445,8 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {*[]} * @private */ + }, { + key: "_getEnergy", value: function _getEnergy(m) { var nodesArray = this.body.nodeIndices; var nodes = this.body.nodes; @@ -41478,8 +43469,6 @@ return /******/ (function(modules) { // webpackBootstrap var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2)); return [delta_m, dE_dx, dE_dy]; } - }, { - key: "_moveNode", /** * move the node based on it's energy @@ -41489,6 +43478,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param dE_dy * @private */ + }, { + key: "_moveNode", value: function _moveNode(m, dE_dx, dE_dy) { var nodesArray = this.body.nodeIndices; var nodes = this.body.nodes; @@ -41524,14 +43515,14 @@ return /******/ (function(modules) { // webpackBootstrap nodes[m].x += dx; nodes[m].y += dy; } - }, { - key: "_createL_matrix", /** * Create the L matrix: edge length times shortest path * @param D_matrix * @private */ + }, { + key: "_createL_matrix", value: function _createL_matrix(D_matrix) { var nodesArray = this.body.nodeIndices; var edgeLength = this.springLength; @@ -41544,14 +43535,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } - }, { - key: "_createK_matrix", /** * Create the K matrix: spring constants times shortest path * @param D_matrix * @private */ + }, { + key: "_createK_matrix", value: function _createK_matrix(D_matrix) { var nodesArray = this.body.nodeIndices; var edgeStrength = this.springConstant; @@ -41614,8 +43605,11 @@ return /******/ (function(modules) { // webpackBootstrap // put the weights for the edges in. This assumes unidirectionality. for (var i = 0; i < edgesArray.length; i++) { var edge = edges[edgesArray[i]]; - D_matrix[edge.fromId][edge.toId] = 1; - D_matrix[edge.toId][edge.fromId] = 1; + // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix + if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { + D_matrix[edge.fromId][edge.toId] = 1; + D_matrix[edge.toId][edge.fromId] = 1; + } } var nodeCount = nodesArray.length; @@ -42278,10 +44272,10 @@ return /******/ (function(modules) { // webpackBootstrap if (token === 'false') { token = false; // convert to boolean } else if (token === 'true') { - token = true; // convert to boolean - } else if (!isNaN(Number(token))) { - token = Number(token); // convert to number - } + token = true; // convert to boolean + } else if (!isNaN(Number(token))) { + token = Number(token); // convert to number + } tokenType = TOKENTYPE.IDENTIFIER; return; } @@ -42423,8 +44417,8 @@ return /******/ (function(modules) { // webpackBootstrap getToken(); // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " } else { - parseNodeStatement(graph, id); - } + parseNodeStatement(graph, id); + } } /** @@ -42930,13 +44924,13 @@ return /******/ (function(modules) { // webpackBootstrap this.callback = callback; } + /** + * @param {string} url The Url to cache the image as + * @return {Image} imageToLoadBrokenUrlOn The image object + */ + _createClass(Images, [{ key: "_addImageToCache", - - /** - * @param {string} url The Url to cache the image as - * @return {Image} imageToLoadBrokenUrlOn The image object - */ value: function _addImageToCache(url, imageToCache) { // IE11 fix -- thanks dponch! if (imageToCache.width === 0) { @@ -42948,14 +44942,14 @@ return /******/ (function(modules) { // webpackBootstrap this.images[url] = imageToCache; } - }, { - key: "_tryloadBrokenUrl", /** * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image * @param {string} brokenUrl Url the broken image to try and load * @return {Image} imageToLoadBrokenUrlOn The image object */ + }, { + key: "_tryloadBrokenUrl", value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { var _this = this; @@ -42972,25 +44966,25 @@ return /******/ (function(modules) { // webpackBootstrap //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image imageToLoadBrokenUrlOn.src = brokenUrl; } - }, { - key: "_redrawWithImage", /** * @return {Image} imageToRedrawWith The images that will be passed to the callback when it is invoked */ + }, { + key: "_redrawWithImage", value: function _redrawWithImage(imageToRedrawWith) { if (this.callback) { this.callback(imageToRedrawWith); } } - }, { - key: "load", /** * @param {string} url Url of the image * @param {string} brokenUrl Url of an image to use if the url image is not found * @return {Image} img The image object */ + }, { + key: "load", value: function load(url, brokenUrl, id) { var _this2 = this; @@ -43054,6 +45048,24 @@ return /******/ (function(modules) { // webpackBootstrap exports['en_EN'] = exports['en']; exports['en_US'] = exports['en']; + // German + exports['de'] = { + edit: 'Editieren', + del: 'Lösche Auswahl', + back: 'Zurück', + addNode: 'Knoten hinzufügen', + addEdge: 'Kante hinzufügen', + editNode: 'Knoten editieren', + editEdge: 'Kante editieren', + addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.', + edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.', + editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.', + createEdgeError: 'Es ist nicht möglich, Kanten mit Clustern zu verbinden.', + deleteClusterError: 'Cluster können nicht gelöscht werden.', + editClusterError: 'Cluster können nicht editiert werden.' + }; + exports['de_DE'] = exports['de']; + // Spanish exports['es'] = { edit: 'Editar', diff --git a/dist/vis.map b/dist/vis.map index ec54d83b..21d08c5d 100644 --- a/dist/vis.map +++ b/dist/vis.map @@ -1 +1 @@ -{"version":3,"file":"vis.map","sources":["./dist/vis.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","util","DOMutil","DataSet","DataView","Queue","Graph3d","graph3d","Camera","Filter","Point2d","Point3d","Slider","StepNumber","Timeline","Graph2d","timeline","DateUtil","DataStep","Range","stack","TimeStep","components","items","Item","BackgroundItem","BoxItem","PointItem","RangeItem","Component","CurrentTime","CustomTime","DataAxis","GraphGroup","Group","BackgroundGroup","ItemSet","Legend","LineGraph","TimeAxis","Network","network","Images","dotparser","gephiParser","allOptions","convertDot","input","DOTToGraph","convertGephi","options","parseGephi","moment","Hammer","keycharm","uuid","isNumber","object","Number","recursiveDOMDelete","DOMobject","hasChildNodes","firstChild","removeChild","giveRange","min","max","total","value","scale","Math","isString","String","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","randomUUID","v4","assignAllKeys","obj","prop","hasOwnProperty","fillIfDefined","a","b","allowDeletion","arguments","length","undefined","protoExtend","i","other","extend","selectiveExtend","props","Array","isArray","Error","selectiveDeepExtend","TypeError","constructor","Object","deepExtend","selectiveNotDeepExtend","indexOf","push","equalArray","len","convert","type","Boolean","valueOf","isMoment","toDate","getType","toISOString","copyAndExtendArray","arr","newValue","newArr","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteTop","top","addClassName","className","classes","split","join","removeClassName","index","splice","forEach","callback","toArray","array","updateProperty","key","throttle","fn","wait","timeout","needExecution","throttled","setTimeout","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","target","srcElement","nodeType","parentNode","hasParent","parent","e","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","shorthandRegex","replace","r","g","result","parseInt","overrideOpacity","color","opacity","rgb","substr","RGBToHex","red","green","blue","toString","slice","parseColor","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","RGBToHSV","minRGB","maxRGB","d","hue","saturation","cssUtil","cssText","styles","style","trim","parts","keys","addCssText","currentStyles","newStyles","removeCssText","removeStyles","HSVToRGB","floor","f","q","t","isOk","test","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","mergeOptions","mergeTarget","enabled","binarySearchCustom","orderedItems","searchFunction","field","field2","maxIterations","iteration","low","high","middle","item","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","global","utils_hooks__hooks","hookCallback","apply","setHookCallback","prototype","res","hasOwnProp","create_utc__createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","_pf","valid__isValid","_isValid","flags","_d","getTime","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","copyConfig","to","from","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","Locale","normalizeLocale","toLowerCase","chooseLocale","names","j","next","loadLocale","name","oldLocale","locales","globalLocale","_abbr","code","locale_locales__getSetGlobalLocale","values","data","locale_locales__getLocale","defineLocale","abbr","set","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","token","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","Function","formatMoment","isValid","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","isFunction","sth","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","RegExp","unescapeFormat","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","year","month","UTC","getUTCDate","localeMonths","_months","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","date","getSetMonth","getDaysInMonth","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecateSimple","deprecations","configFromISO","l","string","from_string__isoRegex","isoDates","isoTimes","matchOffset","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","M","ms","setFullYear","createUTCDate","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","weekOfYear","firstDayOfWeek","firstDayOfWeekOfYear","adjustedMoment","end","daysToDayOfWeek","day","local__createLocal","add","week","dayOfYear","localeWeek","_week","dow","doy","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","dayOfYearFromWeeks","weekday","week1Jan","janX","getUTCDay","getSetDayOfYear","round","clone","startOf","defaults","currentDateArray","now","_useUTC","getUTCFullYear","getUTCMonth","getFullYear","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","GG","W","E","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","hour","meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","offset","separator","utcOffset","offsetFromString","matches","chunk","chunkOffset","cloneWithOffset","model","diff","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","create__isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","moment_calendar__calendar","time","formats","sod","calendar","inputMs","endOf","isBetween","isSame","asFloat","delta","that","zoneDelta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","moment_valid__isValid","parsingFlags","invalidAt","addWeekYearFormatToken","getter","weeksInYear","getSetWeekYear","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","getSetQuarter","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","source","lists__get","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","match1","match2","match3","match4","match6","match1to2","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","parseTwoDigitYear","getSetYear","defaultLocaleWeek","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","get","toJSON","isoWeek","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment","webpackPolyfill","paths","children","webpackContext","req","resolve","buf","ii","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","n","rnds","random","rng","_rng","globalVar","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","_seedBytes","prepareElements","JSONcontainer","elementType","redundant","used","cleanupElements","getSVGElement","svgContainer","shift","document","createElementNS","appendChild","getDOMElement","DOMContainer","insertBefore","createElement","drawPoint","x","groupTemplate","labelObj","point","setAttributeNS","size","label","xOffset","yOffset","content","textContent","drawBar","width","height","rect","_options","_fieldId","fieldId","_type","_subscribers","setOptions","queue","_queue","destroy","on","subscribers","subscribe","off","filter","unsubscribe","_trigger","params","senderId","concat","subscriber","addedIds","me","_addItem","update","updatedIds","updatedData","addOrUpdate","_updateItem","ids","firstType","returnType","allowedValues","itemId","_getItem","order","_sort","_filterFields","getIds","getDataSet","mappedItems","filteredItem","sort","av","bv","remove","removedId","removedIds","_remove","clear","maxField","itemField","minField","distinct","fieldType","exists","types","raw","converted","JSON","stringify","delay","Infinity","_timeout","_extended","_flushIfNeeded","flush","methods","original","method","context","entry","clearTimeout","_ids","_onEvent","setData","refresh","newIds","added","removed","viewOptions","getArguments","defaultFilter","dataSet","updated","container","SyntaxError","containerElement","margin","defaultXCenter","defaultYCenter","xLabel","yLabel","zLabel","passValueFn","xValueLabel","yValueLabel","zValueLabel","filterLabel","legendLabel","STYLE","DOT","showPerspective","showGrid","keepAspectRatio","showShadow","showGrayBottom","showTooltip","verticalRatio","animationInterval","animationPreload","camera","setArmRotation","setArmLength","eye","dataTable","dataPoints","colX","colY","colZ","colValue","colFilter","xMin","xStep","xMax","yMin","yStep","yMax","zMin","zStep","zMax","valueMin","valueMax","xBarWidth","yBarWidth","axisColor","gridColor","dataColor","fill","stroke","strokeWidth","getMouseX","clientX","targetTouches","getMouseY","clientY","Emitter","_setScale","z","xCenter","yCenter","zCenter","setArmLocation","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","getCameraLocation","cy","cz","sinTx","sin","getCameraRotation","cosTx","cos","sinTy","cosTy","sinTz","cosTz","dx","dy","dz","bx","by","ex","ey","ez","getArmLength","xcenter","frame","canvas","clientWidth","ycenter","_setBackgroundColor","backgroundColor","borderColor","borderWidth","borderStyle","BAR","BARCOLOR","BARSIZE","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","_getStyleNumber","styleName","_determineColumnIndexes","getNumberOfColumns","getNumberOfRows","counter","column","getDistinctValues","distinctValues","getColumnRange","minMax","_dataInitialize","rawData","_onChange","dataFilter","setOnLoadCallback","redraw","withBars","defaultXBarWidth","dataX","defaultYBarWidth","dataY","xRange","defaultXMin","defaultXMax","defaultXStep","yRange","defaultYMin","defaultYMax","defaultYStep","zRange","defaultZMin","defaultZMax","defaultZStep","valueRange","defaultValueMin","defaultValueMax","_getDataPoints","sortNumber","dataMatrix","xIndex","yIndex","trans","screen","bottom","pointRight","pointTop","pointCross","position","noCanvas","fontWeight","padding","innerHTML","onmousedown","_onMouseDown","ontouchstart","_onTouchStart","onmousewheel","_onWheel","ontooltip","_onTooltip","onkeydown","setSize","_resizeCanvas","clientHeight","animationStart","slider","play","animationStop","stop","_resizeCenter","setCameraPosition","pos","horizontal","vertical","distance","getCameraPosition","getArmRotation","_readData","_redrawFilter","animationAutoStart","cameraPosition","styleNumber","tooltip","showAnimationControls","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGrid","_redrawDataLine","_redrawDataBar","_redrawDataDot","_redrawInfo","_redrawLegend","ctx","getContext","clearRect","widthMin","widthMax","dotSize","right","lineWidth","font","ymin","ymax","_hsv2rgb","strokeStyle","beginPath","moveTo","lineTo","strokeRect","fillStyle","closePath","gridLineLen","step","start","getCurrent","textAlign","textBaseline","fillText","visible","setValues","setPlayInterval","onchange","getIndex","selectValue","setOnChangeCallback","lineStyle","getLabel","getSelectedValue","prettyStep","text","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armAngle","H","S","V","R","G","B","C","Hi","X","cross","topSideVisible","zAvg","lineJoin","lineCap","transBottom","dist","sortDepth","aDiff","bDiff","crossproduct","crossProduct","_getStrokeWidth","radius","arc","PI","surface","corners","xWidth","yWidth","surfaces","center","avg","transCenter","leftButtonDown","_onMouseUp","which","button","touchDown","startMouseX","startMouseY","startStart","startEnd","startArmRotation","cursor","onmousemove","_onMouseMove","onmouseup","diffX","diffY","horizontalNew","verticalNew","snapAngle","snapValue","parameters","emit","boundingRect","mouseX","mouseY","tooltipTimeout","_hideTooltip","dataPoint","_dataPointFromXY","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","wheelDelta","detail","oldLength","newLength","_insideTriangle","triangle","bs","cs","distMax","closestDataPoint","closestDist","triangle1","triangle2","distX","distY","sqrt","line","dot","dom","borderRadius","boxShadow","borderLeft","contentWidth","offsetWidth","contentHeight","offsetHeight","lineHeight","dotWidth","dotHeight","mixin","_callbacks","once","self","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","sub","sum","armLocation","armRotation","armLength","cameraLocation","cameraRotation","calculateCameraOrientation","rot","graph","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getColumn","getValues","getValue","dataView","progress","prev","bar","MozBorderRadius","slide","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","setIndex","playNext","interval","clearInterval","getPlayInterval","setPlayLoop","doLoop","onChange","indexToLeft","startClientX","startSlideX","leftToIndex","_start","_end","_step","precision","_current","setRange","setStep","calculatePrettyStep","log10","log","LN10","step1","step2","step5","toPrecision","getStep","groups","forthArgument","defaultOptions","autoResize","throttleRedraw","orientation","axis","maxHeight","minHeight","_create","body","domProps","emitter","bind","hiddenDates","getScale","timeAxis","toScreen","_toScreen","toGlobalScreen","_toGlobalScreen","toTime","_toTime","toGlobalTime","_toGlobalTime","range","timeAxis2","currentTime","itemSet","itemsData","groupsData","getEventProperties","oncontextmenu","setGroups","setItems","_redraw","Core","Configurator","Validator","printStyle","configureOptions","_createConfigurator","markDirty","refreshItems","errorFound","validate","selection","getSelection","setSelection","newDataSet","initialLoad","getItemRange","setWindow","animation","fit","focus","itemData","_this","getDataRange","minItem","maxItem","factor","lhs","rhs","getStart","getEnd","show","getWidthLeft","getWidthRight","dataset","centerContainer","itemFromTarget","group","groupFromTarget","customTime","customTimeFromTarget","snap","snappedTime","what","foreground","labelSet","groupId","pageX","srcEvent","pageY","propagating","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_firstTarget","hammer","events","propagatedHandler","_handled","stopped","stopPropagation","firstTarget","_handlers","Manager","PropagatingHammer","o","wrapper","pointerType","isFirst","handler","eventType","exportName","setTimeoutContext","bindFn","invokeArrayArg","arg","each","iterator","dest","src","merge","inherit","child","properties","childP","baseP","_super","boolOrFn","TYPE_FUNCTION","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","inStr","str","find","inArray","findByKey","uniqueArray","results","prefixed","property","prefix","camelProp","VENDOR_PREFIXES","uniqueId","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","manager","inputTarget","domHandler","ev","enable","init","createInputInstance","Type","inputClass","SUPPORT_POINTER_EVENTS","PointerEventInput","SUPPORT_ONLY_TOUCH","TouchInput","SUPPORT_TOUCH","TouchMouseInput","MouseInput","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","INPUT_START","isFinal","INPUT_END","INPUT_CANCEL","session","computeInputData","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","angle","getAngle","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","rotation","getRotation","computeIntervalInputData","offsetDelta","prevDelta","velocity","velocityX","velocityY","last","lastInterval","COMPUTE_INTERVAL","getVelocity","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","PROPS_XY","atan2","PROPS_CLIENT_XY","evEl","MOUSE_ELEMENT_EVENTS","evWin","MOUSE_WINDOW_EVENTS","allow","pressed","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","store","pointerEvents","SingleTouchInput","evTarget","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","INPUT_MOVE","identifier","changedTargetTouches","touch","mouse","TouchAction","cleanTouchActions","actions","TOUCH_ACTION_NONE","hasPanX","TOUCH_ACTION_PAN_X","hasPanY","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_AUTO","Recognizer","state","STATE_POSSIBLE","simultaneous","requireFail","stateStr","STATE_CANCELLED","STATE_ENDED","STATE_CHANGED","STATE_BEGAN","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","recognizers","preset","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","TEST_ELEMENT","MOBILE_REGEX","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM",2,3,4,5,"MSPointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_INPUT_MAP","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","compute","getTouchAction","preventDefaults","prevented","hasNone","preventSrc","STATE_RECOGNIZED","STATE_FAILED","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","withState","tryEmit","canEmit","inputDataClone","process","reset","attrTest","optionPointers","isRecognized","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","force","curRecognizer","existing","Tap","Pan","Swipe","Pinch","Rotate","Press","__webpack_amd_options__","deltaDifference","scaleOffset","startToFront","endToFront","moveable","zoomable","zoomMin","zoomMax","animationTimer","_onDragStart","_onDrag","_onDragEnd","_onMouseWheel","_onTouch","_onPinch","validateDirection","getPointer","byUser","finalStart","finalEnd","_cancelAnimation","initStart","initEnd","easingName","easingFunction","initTime","anyChanged","dragging","ease","done","_applyRange","updateHiddenDates","newStart","newEnd","getRange","conversion","totalHidden","previousDelta","_isInsideRange","allowDragging","getHiddenDurationBetween","diffRange","safeStart","snapAwayFromHidden","safeEnd","zoomKey","pointer","pointerDate","_pointerToDate","zoom","centerDate","hiddenDuration","hiddenDurationBefore","getHiddenDurationBefore","hiddenDurationAfter","move","onTouch","isTouching","onRelease","isReleasing","offTouch","offRelease","_isResized","resized","_previousWidth","_previousHeight","convertHiddenOptions","repeat","dateItem","totalRange","pixelTime","startDate","endDate","runUntil","dayOffset","removeDuplicates","startHidden","isHidden","endHidden","rangeStart","rangeEnd","hidden","safeDates","printDates","stepOverHiddenDates","timeStep","previousTime","stepInHidden","currentValue","current","switchedYear","switchedMonth","switchedDay","correctTimeForHidden","totalDuration","partialDuration","accumulatedHiddenDuration","getAccumulatedHiddenDuration","newTime","timeOffset","requiredDuration","previousPoint","correctionEnabled","hammerUtil","Activator","onMouseWheel","isActive","backgroundVertical","backgroundHorizontal","leftContainer","rightContainer","shadowTop","shadowBottom","shadowTopLeft","shadowBottomLeft","shadowTopRight","shadowBottomRight","_redrawTimer","scrollTop","scrollTopMin","customTimes","redrawCount","drawPoints","onRender","clickToUse","activator","_initAutoResize","component","configurator","configure","appliedOptions","setModuleOptions","_origRedraw","active","_stopAutoResize","setCustomTime","getCustomTime","addCustomTime","timestamp","some","removeCustomTime","getVisibleItems","getWindow","borderRootHeight","borderRootWidth","autoHeight","containerHeight","centerWidth","_updateScrollTop","visibilityTop","visibilityBottom","visibility","MAX_REDRAWS","repaint","setCurrentTime","getCurrentTime","_startAutoResize","_onResize","lastWidth","lastHeight","watchTimer","setInterval","initialScrollTop","oldScrollTop","_getScrollTop","newScrollTop","_setScrollTop","align","groupOrderSwap","fromGroup","toGroup","targetOrder","groupOrder","selectable","multiselect","editable","updateTime","updateGroup","groupEditable","onAdd","onUpdate","onMove","onRemove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup","itemOptions","itemListeners","_onAdd","_onUpdate","_onRemove","groupListeners","_onAddGroups","_onUpdateGroups","_onRemoveGroups","groupIds","stackDirty","touchParams","groupTouchParams","UNGROUPED","BACKGROUND","box","_updateUngrouped","backgroundGroup","_onSelectItem","_onMultiSelectItem","_onAddItem","groupHammer","_onGroupDragStart","_onGroupDrag","_onGroupDragEnd","addCallback","dirty","displayed","hide","unselect","select","rawVisibleItems","visibleItems","_deselect","_orderGroups","visibleInterval","zoomed","lastVisibleInterval","restack","firstGroup","_firstGroup","firstMargin","nonFirstMargin","groupMargin","groupResized","firstGroupIndex","firstGroupId","ungrouped","_getGroupId","getLabelSet","oldItemsData","getItems","_order","getGroups","removeItem","_getType","selected","_removeItem","groupData","groupOptions","oldGroupId","oldSubGroupId","subgroup","oldGroup","_constructByEndArray","endArray","dragLeftItem","dragRightItem","itemProps","_getGroupIndex","initialX","dragLeft","dragRight","selectedItem","baseGroupIndex","groupIndex","groupOffset","ctrlKey","metaKey","_onDragStartAddItem","xAbs","newItem","offsetLeft","updateGroupAllowed","newGroupBase","initial","updateTimeAllowed","initialStart","initialEnd","newOffset","_moveToGroup","originalOrder","movingUp","targetGroupTop","draggedGroupHeight","targetGroupHeight","targetGroup","draggedGroup","newOrder","origOrder","draggedId","numGroups","curPos","orgOffset","slippedPosition","switchGroup","shouldBeGroup","switchGroupId","shiftKey","oldSelection","newSelection","_getItemRange","_item","itemSetFromTarget","minimumStep","autoScale","FORMAT","minorLabels","majorLabels","setMoment","setFormat","setMinimumStep","roundToMinor","hasNext","setScale","setAutoScale","stepYear","stepMonth","stepDay","stepHour","stepMinute","stepSecond","stepMillisecond","isMajor","getLabelMinor","getLabelMajor","getClassName","even","today","currentWeek","currentMonth","currentYear","subgroups","subgroupIndex","subgroupOrderer","subgroupOrder","byStart","byEnd","checkRangedItems","inner","marker","Element","title","getLabelWidth","markerHeight","lastMarkerHeight","limitSize","repositionX","customOrderedItems","_updateVisibleItems","nostack","_calculateHeight","offsetTop","repositionY","resetSubgroups","setParent","orderSubgroups","_checkIfVisible","sortArray","sortField","itemIndex","removeFromDataSet","startArray","orderByStart","orderByEnd","oldVisibleItems","visibleItemsLookup","lowerBound","upperBound","_checkIfVisibleWithReference","initialPosByStart","_traceVisible","initialPosByEnd","initialPos","breakCondition","isVisible","EPSILON","aTime","bTime","iMax","collidingItem","jj","collision","newTop","baseClassName","_updateContents","_updateTitle","_updateDataAttributes","_updateStyle","getComputedStyle","maxWidth","_repaintDeleteButton","_repaintDragLeft","_repaintDragRight","contentLeft","parentWidth","boxWidth","groupChanged","deleteButton","template","_contentToString","removeAttribute","dataAttributes","attributes","setAttribute","outerHTML","itemSetHeight","marginLeft","onTop","itemSubgroup","totalHeight","newHeight","lines","majorTexts","minorTexts","lineTop","showMinorLabels","showMajorLabels","parentChanged","_calculateCharSize","minorLabelHeight","minorCharHeight","majorLabelHeight","majorCharHeight","minorLineHeight","minorLineWidth","majorLineHeight","majorLineWidth","foregroundNextSibling","nextSibling","backgroundNextSibling","_repaintLabels","timeLabelsize","minorCharWidth","xNext","labelMinor","xFirstMajorLabel","labelFits","_repaintMinorText","_repaintMajorText","_repaintMajorLine","_repaintMinorLine","leftTime","leftText","widthText","majorCharWidth","pop","createTextNode","childNodes","nodeValue","measureCharMinor","measureCharMajor","overlay","_onTapOverlay","onClick","_hasParent","deactivate","escListener","activate","display","unbind","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","bindAll","getKey","newBindings","eventParams","drag","warned","substring","showCurrentTime","currentTimeTimer","_interopRequireDefault","__esModule","default","_classCallCheck","instance","Constructor","defineProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","protoProps","staticProps","_ColorPicker","_ColorPicker2","parentModule","defaultContainer","pixelRatio","changedOptions","allowCreation","initialized","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","_removePopup","_clean","_handleObject","_makeItem","_makeHeader","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","_push","insertTo","_showPopupIfNeeded","path","_arguments","_this2","_len","_key","_ret2","div","objectLabel","selectedValue","_update","_makeLabel","err","popupString","popupValue","oninput","_setupPopup","_this3","html","hideTimeout","deleteTimeout","_this4","correspondingElement","checkbox","checked","_this5","defaultColor","_showColorPicker","_this6","bodyRect","pickerX","pickerY","setColor","setCallback","colorString","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","draw","physics","solver","enabledPath","enabledValue","error","_makeColorField","_makeDropdown","_makeRange","_constructOptions","optionsObj","getOptions","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","_bindHammer","_setSize","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_hide","_updatePicker","alert","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","setTransform","putImageData","circle","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","_setOpacity","_setBrightness","brightnessLabel","opacityLabel","cancelButton","applyButton","_apply","saveButton","_save","loadButton","_loadLast","pinch","_moveSelector","sat","hfac","sfac","fillRect","getImageData","centerY","centerX","newLeft","referenceOptions","subObject","usedOptions","check","__any__","getSuggestion","__type__","checkFields","referenceOption","refOptionObj","optionType","refOptionType","print","printLocation","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","boolean","any","function","null","groupsDraggable","linegraph","getLegend","isGroupVisible","yAxisLeft","yAxisRight","legendLeft","legendRight","screenToValue","yAxisOrientation","defaultGroup","sampling","graphHeight","shaded","barChart","sideBySide","interpolation","parametrization","dataAxis","icons","alignZeros","legend","abortedGraphUpdate","updateSVGheight","updateSVGheightOnResize","lastStart","svgElements","groupsUsingDefaultStyles","COUNTER","svg","framework","BarFunctions","_updateAllGroupData","_updateGroup","removeGroup","addGroup","groupsContent","ungroupedCounter","forceGraphUpdate","_updateGraph","rangePerPixelInv","preprocessedGroupData","processedGroupData","groupRanges","changeCalled","minDate","maxDate","_getRelevantData","_applySampling","_convertXcoordinates","_getYRanges","_updateYAxis","MAX_CYCLES","_convertYcoordinates","dataContainer","guess","increment","amountOfPoints","xDistance","pointsPerPixel","sampledData","combinedDataLeft","combinedDataRight","getData","getYRange","getStackedYRange","minVal","maxVal","yAxisLeftUsed","yAxisRightUsed","minLeft","minRight","maxLeft","maxRight","ignore","_toggleAxisVisiblity","drawIcons","master","lineOffset","stepPixels","zeroCrossing","amountOfSteps","tempGroups","axisUsed","datapoints","xValue","yValue","extractedData","svgHeight","labelValue","convertValue","setZeroPosition","linegraphOptions","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","linegraphSVG","DOMelements","labels","conversionFactor","minWidth","iconsRemoved","amountOfGroups","lineContainer","graphOptions","_redrawGroupIcons","iconHeight","iconOffset","groupArray","drawIcon","_cleanupIcons","activeGroups","_redrawLabels","_redrawTitle","stepSize","marginRange","valueAtBottom","marginEnd","maxLabelSize","stepIndex","_redrawLabel","_redrawLine","titleWidth","titleCharHeight","invertedValue","convertedValue","characterHeight","largestWidth","textMinor","textMajor","textTitle","measureCharTitle","titleCharWidth","customRange","formattingFunction","marginStart","deadSpace","majorSteps","minorSteps","setFirst","safeRange","minimumStepValue","orderOfMagnitude","minorStepIdx","magnitudefactor","solutionFound","niceStart","niceEnd","rounded","previous","steps","usingDefaultStyle","zeroPosition","Line","Bar","Points","SVGcontainer","fillPath","fillHeight","outline","barWidth","bar1Height","bar2Height","icon","combinedData","groupLabel","intersections","_getDataIntersections","_getStackedYRange","accumulatedNegative","accumulatedPositive","xpos","coreDistance","amount","resolved","_catmullRom","_linear","dFill","_catmullRomUniform","p0","bp1","bp2","normalization","d1","d2","d3","A","N","d3powA","d2powA","d3pow2A","d2pow2A","d1pow2A","d1powA","getGroupTemplate","callbackResult","getCallback","Bargraph","drawData","barPoints","heightOffset","_getSafeDrawData","nextKey","prevKey","pointData","side","iconSize","iconSpacing","excludeFromLegend","textArea","scrollableHeight","drawLegendIcons","paddingTop","nodes","nodeIndices","edges","edgeIndices","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseMove","onContext","functions","createNode","createEdge","view","bindEventListeners","images","_modulesGroups2","_modulesCanvas2","selectionHandler","_modulesSelectionHandler2","interactionHandler","_modulesInteractionHandler2","_modulesView2","renderer","_modulesCanvasRenderer2","_modulesPhysicsEngine2","layoutEngine","_modulesLayoutEngine2","clustering","_modulesClustering2","manipulation","_modulesManipulationSystem2","nodesHandler","_modulesNodesHandler2","edgesHandler","_modulesEdgesHandler2","_modulesKamadaKawaiJs2","_modulesGroups","_modulesNodesHandler","_modulesEdgesHandler","_modulesPhysicsEngine","_modulesClustering","_modulesCanvasRenderer","_modulesCanvas","_modulesView","_modulesInteractionHandler","_modulesSelectionHandler","_modulesLayoutEngine","_modulesManipulationSystem","_sharedConfigurator","_sharedConfigurator2","_sharedValidator","_sharedValidator2","_optionsJs","_modulesKamadaKawaiJs","layout","interaction","networkOptions","_updateVisibleIndices","nodeId","edgeId","updatePhysicsData","_updateValueRange","unselectAll","dotData","gephi","gephiData","valueTotal","setValueRange","canvasToDOM","DOMtoCanvas","findNode","isCluster","openCluster","cluster","getNodesInCluster","clusterByConnection","clusterByHubsize","clusterOutliers","getSeed","enableEditMode","disableEditMode","addNodeMode","editNode","editNodeMode","addEdgeMode","editEdgeMode","deleteSelected","getPositions","storePositions","moveNode","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","startSimulation","stopSimulation","stabilize","getSelectedNodes","getSelectedEdges","getNodeAt","getEdgeAt","edge","selectNodes","selectEdges","getViewPosition","releaseNode","getOptionsFromConfigurator","Groups","defaultIndex","groupsArray","defaultGroups","useDefaultGroups","optionFields","groupName","groupname","_componentsNode","_componentsNode2","_componentsSharedLabel","_componentsSharedLabel2","NodesHandler","nodesListeners","borderWidthSelected","brokenImage","fixed","face","strokeColor","image","labelHighlightBold","level","mass","scaling","maxVisible","drawThreshold","customScalingFunction","shadow","shape","shapeProperties","borderDashes","useImageSize","parseOptions","updateShape","updateLabelModule","_reset","doNotEmit","oldNodesData","newNodes","positionInitially","changedData","dataChanged","constructorClass","clearPositions","dataArray","boundingBox","nodeList","nodeObj","toId","fromId","edgeList","_sharedLabel","_sharedLabel2","_nodesShapesBox","_nodesShapesBox2","_nodesShapesCircle","_nodesShapesCircle2","_nodesShapesCircularImage","_nodesShapesCircularImage2","_nodesShapesDatabase","_nodesShapesDatabase2","_nodesShapesDiamond","_nodesShapesDiamond2","_nodesShapesDot","_nodesShapesDot2","_nodesShapesEllipse","_nodesShapesEllipse2","_nodesShapesIcon","_nodesShapesIcon2","_nodesShapesImage","_nodesShapesImage2","_nodesShapesSquare","_nodesShapesSquare2","_nodesShapesStar","_nodesShapesStar2","_nodesShapesText","_nodesShapesText2","_nodesShapesTriangle","_nodesShapesTriangle2","_nodesShapesTriangleDown","_nodesShapesTriangleDown2","Node","imagelist","grouplist","globalOptions","baseSize","baseFontSize","predefinedPosition","labelModule","currentShape","groupObj","imageObj","load","distanceToBorder","sizeDiff","fontDiff","updateBoundingBox","resize","parentOptions","newOptions","parsedColor","_slicedToArray","sliceIterator","_arr","_n","_e","_s","Symbol","Label","pointToSelf","fontOptions","yLine","nodeOptions","labelDirty","baseline","viewFontSize","calculateLabelSize","_drawBackground","_drawText","lineMargin","fontSize","_getColor2","_getColor","_getColor22","fontColor","_setAlignment2","_setAlignment","_setAlignment22","lineCount","strokeText","_processLabel","measureText","newOptionsArray","_inherits","subClass","superClass","__proto__","_get","_x","_x2","_x3","_again","receiver","desc","getOwnPropertyDescriptor","getPrototypeOf","_utilNodeBase","_utilNodeBase2","Box","_NodeBase","textSize","getTextSize","selectionLineWidth","roundRect","enableShadow","disableShadow","save","enableBorderDashes","disableBorderDashes","restore","NodeBase","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","setLineDash","dashes","_utilCircleImageBase","_utilCircleImageBase2","Circle","_CircleImageBase","diameter","_drawRawCircle","CircleImageBase","labelOffset","imageLoaded","ratio","networkScaleInv","globalAlpha","drawImage","labelDimensions","CircularImage","_swapToImageResizeWhenImageLoaded","_resizeImage","clip","_drawImageAtPosition","_drawImageLabel","_distanceToBorder","Database","database","_utilShapeBase","_utilShapeBase2","Diamond","_ShapeBase","_resizeShape","_drawShape","ShapeBase","sizeMultiplier","Dot","Ellipse","ellipse","Icon","_icon","iconTextSpacing","Image","Square","Star","Text","Triangle","TriangleDown","_componentsEdge","_componentsEdge2","EdgesHandler","edgesListeners","arrows","scaleFactor","hoverWidth","selectionWidth","selfReferenceSize","smooth","forceDirection","roundness","emitChange","edgeData","edgeOptions","reconnectEdges","markAllEdgesAsDirty","updateEdgeType","oldEdgesData","edgesData","oldEdge","disconnect","showInternalIds","connect","cleanup","edgeType","colorDirty","_edgesCubicBezierEdge","_edgesCubicBezierEdge2","_edgesBezierEdgeDynamic","_edgesBezierEdgeDynamic2","_edgesBezierEdgeStatic","_edgesBezierEdgeStatic2","_edgesStraightEdge","_edgesStraightEdge2","Edge","baseWidth","connected","_setInteractionWidths","changeInType","attachEdge","detachEdge","widthDiff","via","drawLine","drawArrows","drawLabel","viaNode","drawArrowHead","node1","node2","getPoint","translate","_rotateForLabelAlignment","_pointOnCircle","xFrom","yFrom","xTo","yTo","xObj","yObj","getDistanceToEdge","angleInDegrees","rotate","percentage","colorsDefined","_x4","_x5","_utilCubicBezierEdgeBase","_utilCubicBezierEdgeBase2","CubicBezierEdge","_CubicBezierEdgeBase","_getViaCoordinates2","_getViaCoordinates","_getViaCoordinates22","via1","via2","bezierCurveTo","x1","y1","x2","y2","nearNode","_findBorderPositionBezier","x3","y3","_ref","_ref2","_getDistanceToBezierEdge","_ref3","_ref32","vec","_BezierEdgeBase2","_BezierEdgeBase3","CubicBezierEdgeBase","_BezierEdgeBase","minDistance","lastX","lastY","_getDistanceToLine","_EdgeBase2","_EdgeBase3","BezierEdgeBase","_EdgeBase","distanceToPoint","difference","EdgeBase","getColor","getLineWidth","_drawDashedLine","_drawLine","_line","_getCircleData2","_getCircleData","_getCircleData22","_circle","pattern","lineDashOffset","_getCircleData3","_getCircleData32","dashedLine","_getCircleData4","_getCircleData42","_findBorderPosition","_findBorderPositionCircle","_getCircleData5","_getCircleData52","colorOptions","grd","createLinearGradient","fromColor","toColor","addColorStop","_getDistanceToEdge","_getCircleData6","_getCircleData62","px","py","something","u","arrowPos","guideOffset","findBorderPosition","guidePos","arrow","_angle","_getCircleData7","_getCircleData72","_length","_utilBezierEdgeBase","_utilBezierEdgeBase2","BezierEdgeDynamic","_boundFunction","positionBezierNode","setupSupportNode","parentEdgeId","quadraticCurveTo","_x6","BezierEdgeStatic","xVia","yVia","pi","originalAngle","myAngle","_utilEdgeBase","_utilEdgeBase2","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","_componentsPhysicsBarnesHutSolver","_componentsPhysicsBarnesHutSolver2","_componentsPhysicsRepulsionSolver","_componentsPhysicsRepulsionSolver2","_componentsPhysicsHierarchicalRepulsionSolver","_componentsPhysicsHierarchicalRepulsionSolver2","_componentsPhysicsSpringSolver","_componentsPhysicsSpringSolver2","_componentsPhysicsHierarchicalSpringSolver","_componentsPhysicsHierarchicalSpringSolver2","_componentsPhysicsCentralGravitySolver","_componentsPhysicsCentralGravitySolver2","_componentsPhysicsFA2BasedRepulsionSolver","_componentsPhysicsFA2BasedRepulsionSolver2","_componentsPhysicsFA2BasedCentralGravitySolver","_componentsPhysicsFA2BasedCentralGravitySolver2","PhysicsEngine","physicsBody","physicsNodeIndices","physicsEdgeIndices","forces","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","theta","gravitationalConstant","centralGravity","springLength","springConstant","damping","avoidOverlap","forceAtlas2Based","repulsion","nodeDistance","hierarchicalRepulsion","maxVelocity","minVelocity","stabilization","iterations","updateInterval","onlyDynamicEdges","timestep","initPhysics","nodesSolver","edgesSolver","gravitySolver","modelOptions","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","calculateForces","moveNodes","revert","_evaluateStepQuality","nodeIds","positions","vx","vy","dpos","reference","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","totalVelocity","solve","targetIterations","_freezeNodes","_stabilizationBatch","_finalizeStabilization","_restoreFrozenNodes","BarnesHutSolver","barnesHutTree","randomSeed","thetaInversed","overlapAvoidanceFactor","nodeCount","_formBarnesHutTree","_getForceContribution","NW","NE","SW","SE","parentBranch","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","_placeInRegion","region","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","node3","_calculateSpringForce","springForce","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","_BarnesHutSolver2","_BarnesHutSolver3","ForceAtlas2BasedRepulsionSolver","_BarnesHutSolver","degree","_CentralGravitySolver2","_CentralGravitySolver3","ForceAtlas2BasedCentralGravitySolver","_CentralGravitySolver","_componentsNodesCluster","_componentsNodesCluster2","ClusterEngine","clusteredNodes","hubsize","_getHubSize","_checkOptions","nodesToCluster","refreshData","joinCondition","childNodesObj","childEdgesObj","clonedOptions","_cloneOptions","hiddenByCluster","_cluster","edgeCount","clusters","usedNodes","visibleEdges","gatheringSuccessful","childNodeId","_getConnectedId","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","amountOfConnections","clusterEdgeProperties","childNode","otherNodeId","childKeys","createEdges","_edge","newEdge","clusteringEdgeReplacingId","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","containedNodes","containedEdges","_createClusterEdges","clusterNodeId","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherCluster","transferEdge","replacedEdge","nodesArray","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","_Node2","_Node3","Cluster","_Node","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","hideEdgesOnDrag","hideNodesOnDrag","_determineBrowserMethod","_resizeNodes","_requestRedraw","_startRendering","cancelAnimationFrame","_renderStep","_drawEdges","_drawNodes","controlNodesActive","_drawControlNodes","alwaysShow","topLeft","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","Canvas","resizeTimer","resizeFunction","cameraState","hammerFrame","_cleanUp","previousWidth","viewCenter","distanceFromCenter","tabIndex","_getCameraState","_prepareValue","emitEvent","oldWidth","oldHeight","_setCameraState","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","specificNodes","zoomLevel","initialZoom","positionDefined","_getRange","numberOfNodes","yDistance","xZoomLevel","yZoomLevel","_findCenter","animationOptions","nodePosition","lockedOnNode","animateView","locked","_transitionRedraw","_lockedRedraw","finished","_componentsNavigationHandler","_componentsNavigationHandler2","_componentsPopup","_componentsPopup2","InteractionHandler","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","keyboard","speed","bindToWindow","navigationButtons","tooltipDelay","zoomView","pinched","checkSelectionChanges","_generateClickEvent","previouslySelectedEdgeCount","_getSelectedEdgeCount","previouslySelectedNodeCount","_getSelectedNodeCount","previousSelection","selectAdditionalOnPoint","selectOnPoint","selectedEdgesCount","selectedNodesCount","currentSelection","_determineIfDifferent2","_determineIfDifferent","nodesChanges","edgesChanges","nodeSelected","selectObject","selectionObj","xFixed","yFixed","scaleOld","preScaleDragPointer","scaleFrac","tx","ty","postScaleDragPointer","popupVisible","_checkHidePopup","setPosition","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","isOverlappingWith","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","unbindFromRedraw","Popup","doShow","SelectionHandler","hoverObj","selectConnectedEdges","hoverConnectedEdges","updateSelection","selectionChanged","deselectObject","emptySelection","DOM","highlightEdges","_selectConnectedEdges","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","_getAllEdgesOverlappingWith","clusterSize","_addToHover","hoverChanged","blurObject","_hoverConnectedEdges","edgeIds","idArray","RangeError","LayoutEngine","initialRandomSeed","optionsBackup","improvedLayout","hierarchical","levelSeparation","sortMethod","hierarchicalLevels","setupHierarchicalLayout","layoutNetwork","prevHierarchicalState","adaptAllOptions","MAX_LEVELS","levels","clusterThreshold","startLength","before","clusterBridges","after","_declusterAll","info","kamadaKawai","clustersPresent","definedLevel","undefinedLevel","nodeSpacing","_determineLevelsByHubsize","_determineLevelsDirected","distribution","_getDistribution","_placeNodesByHierarchy","positionedNodes","_placeBranchNodes","hubSize","_setLevelByHubsize","minLevel","_setLevelDirected","parentId","parentLevel","childNodeLevel","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","addNode","addEdge","editEdge","deleteNode","deleteEdge","controlNodeStyle","_restore","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","selectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","edgeBeingEditedId","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","_performEditEdge","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","_this7","_componentsAlgorithmsFloydWarshallJs","_componentsAlgorithmsFloydWarshallJs2","KamadaKawai","edgeStrength","distanceSolver","edgesArray","ignoreClusters","D_matrix","getDistances","_createL_matrix","_createK_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode2","_getHighestEnergyNode","_getHighestEnergyNode22","_moveNode","_getEnergy2","_getEnergy","_getEnergy22","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","_getEnergy3","_getEnergy32","x_m","y_m","iIdx","x_i","y_i","denominator","K_matrix","L_matrix","d2E_dx2","d2E_dxdy","d2E_dy2","FloydWarshall","k","CanvasRenderingContext2D","square","s2","ir","triangleDown","star","diamond","r2d","kappa","ox","oy","xe","ye","xm","ym","wEllipse","hEllipse","ymb","yeb","xt","yt","xi","yi","xl","yl","xr","yr","patternLength","slope","distRemaining","patternIndex","dashLength","parseDOT","parseGraph","first","nextPreview","isAlphaNumeric","regexAlphaNumeric","setValue","graphs","attr","getToken","tokenType","TOKENTYPE","NULL","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","message","maxLength","forEach2","elem1","elem2","setProp","convertAttr","mapping","visProp","visPropI","graphData","dotNode","graphNode","NODE_ATTR_MAPPING","convertEdge","dotEdge","graphEdge","EDGE_ATTR_MAPPING","subEdge","fontsize","fontcolor","labelfontcolor","fontname","fillcolor","labeltooltip","{","}","[","]",";","=",",","->","--","gephiJSON","inheritColor","gEdges","gNodes","gEdge","gNode","imageBroken","url","imageToCache","brokenUrl","imageToLoadBrokenUrlOn","onerror","_addImageToCache","imageToRedrawWith","cachedImage","img","onload","_redrawWithImage","_tryloadBrokenUrl","edit","del","back","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,cAEA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,KACbK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,GAAIQ,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAASL,EAAQD,EAASM,GAK9BN,EAAQe,KAAOT,EAAoB,GACnCN,EAAQgB,QAAUV,EAAoB,GAGtCN,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Vy2B,SAAU,gBACV4O,eAAgB,uDAChBC,gBAAiB,6EACjBC,oBAAqB,kFACrBC,gBAAiB,wCACjBC,mBAAoB,0CACpBC,iBAAkB;EAEpBt+H,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY"} \ No newline at end of file +{"version":3,"sources":["vis.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","util","DOMutil","DataSet","DataView","Queue","Graph3d","graph3d","Camera","Filter","Point2d","Point3d","Slider","StepNumber","Timeline","Graph2d","timeline","Core","DateUtil","Range","stack","TimeStep","components","items","Item","BackgroundItem","BoxItem","PointItem","RangeItem","BackgroundGroup","Component","CurrentTime","CustomTime","DataAxis","DataScale","GraphGroup","Group","ItemSet","Legend","LineGraph","TimeAxis","Network","network","Images","dotparser","gephiParser","allOptions","convertDot","input","DOTToGraph","convertGephi","options","parseGephi","moment","Hammer","keycharm","uuid","isNumber","object","Number","recursiveDOMDelete","DOMobject","hasChildNodes","firstChild","removeChild","giveRange","min","max","total","value","scale","Math","isString","String","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","randomUUID","v4","assignAllKeys","obj","prop","hasOwnProperty","fillIfDefined","a","b","allowDeletion","arguments","length","undefined","protoExtend","i","other","extend","selectiveExtend","props","Array","isArray","Error","selectiveDeepExtend","TypeError","constructor","Object","deepExtend","selectiveNotDeepExtend","indexOf","push","equalArray","len","convert","type","Boolean","valueOf","isMoment","toDate","getType","toISOString","copyAndExtendArray","arr","newValue","newArr","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteTop","top","addClassName","className","classes","split","join","removeClassName","index","splice","forEach","callback","toArray","array","updateProperty","key","throttle","fn","wait","timeout","needExecution","throttled","setTimeout","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","target","srcElement","nodeType","parentNode","hasParent","parent","e","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","shorthandRegex","replace","r","g","result","parseInt","overrideOpacity","color","opacity","rgb","substr","RGBToHex","red","green","blue","toString","slice","parseColor","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","RGBToHSV","minRGB","maxRGB","d","hue","saturation","cssUtil","cssText","styles","style","trim","parts","keys","addCssText","currentStyles","newStyles","removeCssText","removeStyles","HSVToRGB","floor","f","q","t","isOk","test","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","insertSort","compare","k","j","mergeOptions","mergeTarget","globalOptions","enabled","binarySearchCustom","orderedItems","comparator","field","field2","maxIterations","iteration","low","high","middle","item","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","global","utils_hooks__hooks","hookCallback","apply","setHookCallback","prototype","res","hasOwnProp","create_utc__createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","_pf","valid__isValid","_isValid","flags","_d","getTime","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","isUndefined","copyConfig","to","from","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","Locale","normalizeLocale","toLowerCase","chooseLocale","names","next","loadLocale","name","oldLocale","locales","globalLocale","_abbr","code","locale_locales__getSetGlobalLocale","values","data","locale_locales__getLocale","defineLocale","abbr","set","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","isFunction","Function","makeGetSet","keepTime","get_set__set","get_set__get","mom","isValid","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","token","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","RegExp","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","year","month","UTC","getUTCDate","localeMonths","_months","MONTHS_IN_FORMAT","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","date","getSetMonth","getDaysInMonth","monthsShortRegex","_monthsParseExact","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","monthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","sort","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","_overflowWeeks","WEEK","_overflowWeekday","WEEKDAY","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecateSimple","deprecations","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","string","extendedIsoRegex","basicIsoRegex","isoDates","isoTimes","tzRegex","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","M","ms","getFullYear","setFullYear","createUTCDate","getUTCFullYear","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","localWeekday","weekOffset","dayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","defaults","currentDateArray","nowValue","now","_useUTC","getUTCMonth","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","weekdayOverflow","GG","W","E","local__createLocal","_week","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","hour","meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","day","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","offset","separator","utcOffset","offsetFromString","matcher","matches","chunk","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","round","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","matchShortOffset","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","matchOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","moment_calendar__calendar","time","formats","sod","startOf","calendar","localInput","endOf","isBetween","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","delta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","toJSON","moment_valid__isValid","parsingFlags","invalidAt","creationData","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","isoWeek","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","localeWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","isFormat","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","_minWeekdaysParse","_shortWeekdaysParse","_fullWeekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","getSetDayOfYear","hFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","source","lists__get","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","defaultMonthsShortRegex","defaultMonthsRegex","parseTwoDigitYear","getSetYear","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","defaultLocaleWeek","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","get","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","firstDayOfWeek","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment","webpackPolyfill","paths","children","webpackContext","req","resolve","buf","ii","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","n","rnds","random","rng","_rng","globalVar","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","_seedBytes","prepareElements","JSONcontainer","elementType","redundant","used","cleanupElements","resetElements","getSVGElement","svgContainer","shift","document","createElementNS","appendChild","getDOMElement","DOMContainer","insertBefore","createElement","drawPoint","x","groupTemplate","labelObj","point","setAttributeNS","size","label","xOffset","yOffset","content","textContent","drawBar","width","height","rect","_options","_fieldId","fieldId","_type","_subscribers","setOptions","queue","_queue","destroy","on","subscribers","subscribe","off","filter","unsubscribe","_trigger","params","senderId","concat","subscriber","addedIds","me","_addItem","update","updatedIds","oldData","updatedData","addOrUpdate","oldItem","_updateItem","ids","firstType","returnType","allowedValues","itemIds","itemId","_getItem","order","_sort","_filterFields","resultant","getIds","getDataSet","mappedItems","filteredItem","itemFields","av","bv","remove","removedId","removedIds","_remove","clear","maxField","itemField","minField","distinct","fieldType","exists","types","raw","converted","JSON","stringify","delay","Infinity","_timeout","_extended","_flushIfNeeded","flush","methods","original","method","context","entry","clearTimeout","_ids","_onEvent","setData","refresh","oldIds","newIds","added","removed","viewOptions","getArguments","defaultFilter","dataSet","updated","container","SyntaxError","containerElement","margin","defaultXCenter","defaultYCenter","xLabel","yLabel","zLabel","passValueFn","xValueLabel","yValueLabel","zValueLabel","filterLabel","legendLabel","STYLE","DOT","showPerspective","showGrid","keepAspectRatio","showShadow","showGrayBottom","showTooltip","verticalRatio","animationInterval","animationPreload","camera","setArmRotation","setArmLength","eye","dataTable","dataPoints","colX","colY","colZ","colValue","colFilter","xMin","xStep","xMax","yMin","yStep","yMax","zMin","zStep","zMax","valueMin","valueMax","xBarWidth","yBarWidth","axisColor","gridColor","dataColor","fill","stroke","strokeWidth","dotSizeRatio","getMouseX","clientX","targetTouches","getMouseY","clientY","Emitter","_setScale","z","xCenter","yCenter","zCenter","setArmLocation","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","getCameraLocation","cy","cz","sinTx","sin","getCameraRotation","cosTx","cos","sinTy","cosTy","sinTz","cosTz","dx","dy","dz","bx","by","ex","ey","ez","getArmLength","xcenter","frame","canvas","clientWidth","ycenter","_setBackgroundColor","backgroundColor","borderColor","borderWidth","borderStyle","BAR","BARCOLOR","BARSIZE","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","_getStyleNumber","styleName","_determineColumnIndexes","getNumberOfColumns","getNumberOfRows","counter","column","getDistinctValues","distinctValues","getColumnRange","minMax","_dataInitialize","rawData","_onChange","dataFilter","setOnLoadCallback","redraw","withBars","defaultXBarWidth","dataX","defaultYBarWidth","dataY","xRange","defaultXMin","defaultXMax","defaultXStep","yRange","defaultYMin","defaultYMax","defaultYStep","zRange","defaultZMin","defaultZMax","defaultZStep","valueRange","defaultValueMin","defaultValueMax","_getDataPoints","sortNumber","dataMatrix","xIndex","yIndex","trans","screen","bottom","pointRight","pointTop","pointCross","position","noCanvas","fontWeight","padding","innerHTML","onmousedown","_onMouseDown","ontouchstart","_onTouchStart","onmousewheel","_onWheel","ontooltip","_onTooltip","onkeydown","setSize","_resizeCanvas","clientHeight","animationStart","slider","play","animationStop","stop","_resizeCenter","setCameraPosition","horizontal","vertical","distance","getCameraPosition","getArmRotation","_readData","_redrawFilter","animationAutoStart","cameraPosition","styleNumber","tooltip","showAnimationControls","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGrid","_redrawDataLine","_redrawDataBar","_redrawDataDot","_redrawInfo","_redrawLegend","ctx","getContext","clearRect","widthMin","widthMax","dotSize","right","lineWidth","font","ymin","ymax","_hsv2rgb","strokeStyle","beginPath","moveTo","lineTo","strokeRect","fillStyle","closePath","gridLineLen","step","start","getCurrent","end","textAlign","textBaseline","fillText","visible","setValues","setPlayInterval","onchange","getIndex","selectValue","setOnChangeCallback","lineStyle","getLabel","getSelectedValue","prettyStep","text","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armAngle","H","S","V","R","G","B","C","Hi","X","cross","topSideVisible","zAvg","lineJoin","lineCap","transBottom","dist","sortDepth","aDiff","bDiff","crossproduct","crossProduct","_getStrokeWidth","radius","arc","PI","surface","corners","xWidth","yWidth","surfaces","center","avg","transCenter","leftButtonDown","_onMouseUp","which","button","touchDown","startMouseX","startMouseY","startStart","startEnd","startArmRotation","cursor","onmousemove","_onMouseMove","onmouseup","diffX","diffY","horizontalNew","verticalNew","snapAngle","snapValue","parameters","emit","boundingRect","mouseX","mouseY","tooltipTimeout","_hideTooltip","dataPoint","_dataPointFromXY","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","wheelDelta","detail","oldLength","newLength","_insideTriangle","triangle","bs","cs","distMax","closestDataPoint","closestDist","triangle1","triangle2","distX","distY","sqrt","line","dot","dom","borderRadius","boxShadow","borderLeft","contentWidth","offsetWidth","contentHeight","offsetHeight","lineHeight","dotWidth","dotHeight","mixin","_callbacks","once","self","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","sub","sum","armLocation","armRotation","armLength","cameraLocation","cameraRotation","calculateCameraOrientation","rot","graph","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getColumn","getValues","getValue","dataView","progress","prev","bar","MozBorderRadius","slide","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","setIndex","playNext","interval","clearInterval","getPlayInterval","setPlayLoop","doLoop","onChange","indexToLeft","startClientX","startSlideX","leftToIndex","_start","_end","_step","precision","_current","setRange","setStep","calculatePrettyStep","log10","log","LN10","step1","step2","step5","toPrecision","getStep","groups","forthArgument","defaultOptions","autoResize","throttleRedraw","orientation","axis","maxHeight","minHeight","_create","body","domProps","emitter","bind","hiddenDates","getScale","timeAxis","toScreen","_toScreen","toGlobalScreen","_toGlobalScreen","toTime","_toTime","toGlobalTime","_toGlobalTime","range","timeAxis2","currentTime","itemSet","itemsData","groupsData","getEventProperties","oncontextmenu","fitDone","getItemRange","setWindow","animation","fit","setGroups","setItems","_redraw","Configurator","Validator","printStyle","configureOptions","_createConfigurator","markDirty","refreshItems","errorFound","validate","selection","getSelection","setSelection","newDataSet","focus","itemData","_this","getDataRange","minItem","maxItem","factor","lhs","rhs","getStart","getEnd","show","repositionX","getWidthLeft","getWidthRight","dataset","centerContainer","itemFromTarget","group","groupFromTarget","customTime","customTimeFromTarget","snap","snappedTime","what","foreground","labelSet","groupId","pageX","srcEvent","pageY","propagating","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_firstTarget","hammer","events","propagatedHandler","_handled","stopped","stopPropagation","srcStop","firstTarget","elemHammer","_handlers","Manager","PropagatingHammer","o","assign","wrapper","pointerType","isFirst","handler","eventType","hammers","idx","exportName","setTimeoutContext","bindFn","invokeArrayArg","arg","each","iterator","message","deprecationMessage","inherit","child","properties","childP","baseP","_super","boolOrFn","TYPE_FUNCTION","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","inStr","str","find","inArray","src","findByKey","uniqueArray","results","prefixed","property","prefix","camelProp","VENDOR_PREFIXES","uniqueId","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","manager","inputTarget","domHandler","ev","enable","init","createInputInstance","Type","inputClass","SUPPORT_POINTER_EVENTS","PointerEventInput","SUPPORT_ONLY_TOUCH","TouchInput","SUPPORT_TOUCH","TouchMouseInput","MouseInput","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","INPUT_START","isFinal","INPUT_END","INPUT_CANCEL","session","computeInputData","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","angle","getAngle","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","rotation","getRotation","maxPointers","computeIntervalInputData","offsetDelta","prevDelta","velocity","velocityX","velocityY","last","lastInterval","COMPUTE_INTERVAL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","PROPS_XY","atan2","PROPS_CLIENT_XY","evEl","MOUSE_ELEMENT_EVENTS","evWin","MOUSE_WINDOW_EVENTS","allow","pressed","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","store","pointerEvents","SingleTouchInput","evTarget","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","INPUT_MOVE","identifier","changedTargetTouches","touch","mouse","TouchAction","cleanTouchActions","actions","TOUCH_ACTION_NONE","hasPanX","TOUCH_ACTION_PAN_X","hasPanY","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_AUTO","Recognizer","state","STATE_POSSIBLE","simultaneous","requireFail","stateStr","STATE_CANCELLED","STATE_ENDED","STATE_CHANGED","STATE_BEGAN","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","recognizers","preset","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","TEST_ELEMENT","nextKey","dest","merge","MOBILE_REGEX","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM",2,3,4,5,"MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_INPUT_MAP","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","compute","getTouchAction","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_RECOGNIZED","STATE_FAILED","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","process","reset","attrTest","optionPointers","isRecognized","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","force","curRecognizer","existing","Tap","Pan","Swipe","Pinch","Rotate","Press","freeGlobal","deltaDifference","scaleOffset","startToFront","endToFront","moveable","zoomable","zoomMin","zoomMax","animationTimer","_onDragStart","_onDrag","_onDragEnd","_onMouseWheel","_onTouch","_onPinch","validateDirection","getPointer","byUser","finalStart","finalEnd","_cancelAnimation","initStart","initEnd","easingName","easingFunction","initTime","anyChanged","dragging","ease","done","_applyRange","updateHiddenDates","newStart","newEnd","getRange","conversion","totalHidden","previousDelta","_isInsideRange","allowDragging","getHiddenDurationBetween","diffRange","safeStart","snapAwayFromHidden","safeEnd","startDate","endDate","zoomKey","pointer","pointerDate","_pointerToDate","zoom","centerDate","hiddenDuration","hiddenDurationBefore","getHiddenDurationBefore","hiddenDurationAfter","move","onTouch","onRelease","offTouch","offRelease","_isResized","resized","_previousWidth","_previousHeight","convertHiddenOptions","repeat","dateItem","totalRange","pixelTime","runUntil","dayOffset","removeDuplicates","startHidden","isHidden","endHidden","rangeStart","rangeEnd","hidden","safeDates","printDates","stepOverHiddenDates","timeStep","previousTime","stepInHidden","currentValue","current","switchedYear","switchedMonth","switchedDay","correctTimeForHidden","totalDuration","partialDuration","accumulatedHiddenDuration","getAccumulatedHiddenDuration","newTime","timeOffset","requiredDuration","previousPoint","correctionEnabled","hammerUtil","Activator","onMouseWheel","isActive","backgroundVertical","backgroundHorizontal","leftContainer","rightContainer","shadowTop","shadowBottom","shadowTopLeft","shadowBottomLeft","shadowTopRight","shadowBottomRight","initialDrawDone","_redrawTimer","scrollTop","scrollTopMin","customTimes","redrawCount","drawPoints","onRender","clickToUse","activator","_initAutoResize","component","configurator","configure","appliedOptions","setModuleOptions","_origRedraw","active","_stopAutoResize","setCustomTime","getCustomTime","setCustomTimeTitle","title","setCustomTitle","addCustomTime","timestamp","some","removeCustomTime","getVisibleItems","getWindow","borderRootHeight","borderRootWidth","autoHeight","containerHeight","centerWidth","_updateScrollTop","visibilityTop","visibilityBottom","visibility","MAX_REDRAW","repaint","setCurrentTime","getCurrentTime","_startAutoResize","_onResize","lastWidth","lastHeight","watchTimer","setInterval","initialScrollTop","oldScrollTop","_getScrollTop","newScrollTop","_setScrollTop","align","groupOrderSwap","fromGroup","toGroup","targetOrder","groupOrder","selectable","multiselect","itemsAlwaysDraggable","editable","updateTime","updateGroup","groupEditable","onAdd","onUpdate","onMove","onRemove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup","itemOptions","itemListeners","_onAdd","_onUpdate","_onRemove","groupListeners","_onAddGroups","_onUpdateGroups","_onRemoveGroups","groupIds","stackDirty","touchParams","groupTouchParams","UNGROUPED","BACKGROUND","box","_updateUngrouped","backgroundGroup","_onSelectItem","_onMultiSelectItem","_onAddItem","groupHammer","_onGroupDragStart","_onGroupDrag","_onGroupDragEnd","addCallback","dirty","displayed","hide","unselect","select","rawVisibleItems","visibleItems","_deselect","_orderGroups","visibleInterval","zoomed","lastVisibleInterval","restack","firstGroup","_firstGroup","firstMargin","nonFirstMargin","groupMargin","groupResized","firstGroupIndex","firstGroupId","ungrouped","_getGroupId","getLabelSet","oldItemsData","getItems","_order","getGroups","removeItem","_getType","selected","_removeItem","groupData","groupOptions","oldGroupId","oldSubGroupId","subgroup","oldGroup","_constructByEndArray","endArray","dragLeftItem","dragRightItem","itemProps","_getGroupIndex","initialX","dragLeft","_cloneItemData","dragRight","selectedItem","baseGroupIndex","itemsToDrag","groupIndex","groupOffset","ctrlKey","metaKey","_onDragStartAddItem","xAbs","newItem","offsetLeft","updateGroupAllowed","newGroupBase","initial","updateTimeAllowed","initialStart","initialEnd","newOffset","_moveToGroup","originalOrder","movingUp","targetGroupTop","draggedGroupHeight","targetGroupHeight","targetGroup","draggedGroup","newOrder","origOrder","draggedId","numGroups","curPos","orgOffset","slippedPosition","switchGroup","shouldBeGroup","switchGroupId","shiftKey","oldSelection","newSelection","newItemData","itemGroup","lastSelectedGroup","multiselectPerGroup","_getItemRange","_item","itemSetFromTarget","minimumStep","autoScale","FORMAT","minorLabels","majorLabels","setMoment","setFormat","setMinimumStep","roundToMinor","hasNext","setScale","setAutoScale","stepYear","stepMonth","stepDay","stepHour","stepMinute","stepSecond","stepMillisecond","isMajor","getLabelMinor","getLabelMajor","getClassName","even","today","currentWeek","currentMonth","currentYear","subgroups","subgroupIndex","subgroupOrderer","subgroupOrder","byStart","byEnd","checkRangedItems","inner","marker","Element","getLabelWidth","markerHeight","lastMarkerHeight","_calculateSubGroupHeights","limitSize","customOrderedItems","_updateVisibleItems","nostack","_calculateHeight","offsetTop","repositionY","resetSubgroups","setParent","orderSubgroups","_checkIfVisible","sortArray","sortField","itemIndex","removeFromDataSet","startArray","orderByStart","orderByEnd","oldVisibleItems","visibleItemsLookup","lowerBound","upperBound","searchFunction","_checkIfVisibleWithReference","initialPosByStart","_traceVisible","initialPosByEnd","initialPos","breakCondition","isVisible","EPSILON","aTime","bTime","iMax","collidingItem","jj","collision","newTop","baseClassName","_updateContents","_updateTitle","_updateDataAttributes","_updateStyle","getComputedStyle","maxWidth","_repaintDeleteButton","_repaintDragLeft","_repaintDragRight","contentLeft","parentWidth","boxWidth","groupChanged","deleteButton","template","_contentToString","removeAttribute","dataAttributes","attributes","setAttribute","outerHTML","itemSetHeight","marginLeft","onTop","itemSubgroup","totalHeight","newHeight","lines","majorTexts","minorTexts","lineTop","showMinorLabels","showMajorLabels","maxMinorChars","parentChanged","_calculateCharSize","minorLabelHeight","minorCharHeight","majorLabelHeight","majorCharHeight","minorLineHeight","minorLineWidth","majorLineHeight","majorLineWidth","foregroundNextSibling","nextSibling","backgroundNextSibling","_repaintLabels","timeLabelsize","minorCharWidth","xNext","nextIsMajor","prevWidth","labelMinor","xFirstMajorLabel","MAX","showMinorGrid","_repaintMinorText","_repaintMajorText","_repaintMajorLine","_repaintMinorLine","warnedForOverflow","leftTime","leftText","widthText","majorCharWidth","pop","createTextNode","childNodes","nodeValue","measureCharMinor","measureCharMajor","overlay","_onTapOverlay","onClick","_hasParent","deactivate","escListener","activate","display","unbind","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","bindAll","getKey","newBindings","eventParams","drag","warned","substring","showCurrentTime","currentTimeTimer","_interopRequireDefault","__esModule","default","_classCallCheck","instance","Constructor","defineProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","protoProps","staticProps","_ColorPicker","_ColorPicker2","parentModule","defaultContainer","pixelRatio","changedOptions","allowCreation","initialized","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","_removePopup","_clean","_handleObject","_makeItem","_makeHeader","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","_push","_showPopupIfNeeded","path","_arguments","_this2","_len","_key","_ret2","div","objectLabel","selectedValue","_update","_makeLabel","err","popupString","popupValue","oninput","_setupPopup","_this3","html","hideTimeout","deleteTimeout","_this4","correspondingElement","checkbox","checked","_this5","defaultColor","_showColorPicker","_this6","insertTo","setColor","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","draw","physics","solver","enabledPath","enabledValue","error","_makeColorField","_makeDropdown","_makeRange","_constructOptions","optionsObj","getOptions","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_bindHammer","_setSize","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_hide","_updatePicker","alert","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","setTransform","putImageData","circle","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","_setOpacity","_setBrightness","brightnessLabel","opacityLabel","cancelButton","applyButton","_apply","saveButton","_save","loadButton","_loadLast","pinch","_moveSelector","sat","hfac","sfac","fillRect","getImageData","centerY","centerX","newLeft","referenceOptions","subObject","usedOptions","check","__any__","getSuggestion","__type__","checkFields","referenceOption","refOptionObj","optionType","refOptionType","print","printLocation","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","boolean","any","function","null","groupsDraggable","linegraph","initialLoad","getLegend","isGroupVisible","yAxisLeft","yAxisRight","legendLeft","legendRight","screenToValue","yAxisOrientation","defaultGroup","sampling","graphHeight","shaded","barChart","sideBySide","interpolation","parametrization","dataAxis","legend","abortedGraphUpdate","updateSVGheight","updateSVGheightOnResize","forceGraphUpdate","lastStart","svgElements","groupsUsingDefaultStyles","svg","framework","Bars","Lines","Points","_removeGroup","_updateAllGroupData","removeGroup","_updateGroup","addGroup","groupsContent","groupCounts","extended","orginalY","_updateGraph","rangePerPixelInv","_getSortedGroupIds","grouplist","zIndex","bz","groupRanges","changeCalled","minDate","maxDate","_getRelevantData","_applySampling","_convertXcoordinates","_getYRanges","_updateYAxis","below","excludeFromStacking","_stack","_convertYcoordinates","calcPath","subGroupId","drawShading","subData","subPrevPoint","subNextPoint","dateComparator","first","dataContainer","increment","amountOfPoints","xDistance","pointsPerPixel","sampledData","combinedDataLeft","combinedDataRight","getYRange","getStackedYRange","minVal","maxVal","yAxisLeftUsed","yAxisRightUsed","minLeft","minRight","maxLeft","maxRight","ignore","_toggleAxisVisiblity","drawIcons","master","masterAxis","lineOffset","tempGroups","axisUsed","datapoints","screen_x","screen_y","svgHeight","convertValue","setZeroPosition","linegraphOptions","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","alignZeros","linegraphSVG","DOMelements","labels","conversionFactor","minWidth","stepPixels","zeroCrossing","amountOfSteps","iconsRemoved","amountOfGroups","lineContainer","graphOptions","_redrawGroupIcons","iconHeight","iconOffset","groupArray","_cleanupIcons","activeGroups","_redrawLabels","_redrawTitle","customRange","autoScaleEnd","autoScaleStart","followScale","maxLabelSize","getLines","major","_redrawLabel","_redrawLine","titleWidth","titleCharHeight","characterHeight","largestWidth","textMinor","textMajor","textTitle","measureCharTitle","titleCharWidth","zeroAlign","formattingFunction","majorSteps","minorSteps","customLines","minorStepIdx","magnitudefactor","determineScale","rounded","setCharHeight","setHeight","minimumStepValue","orderOfMagnitude","solutionFound","stepSize","is_major","getFirstMajor","majorStep","formatValue","bottomOffset","oldStepIdx","oldStart","oldEnd","increaseMagnitude","decreaseMagnitude","otherZero","otherStep","newRange","myOriginalZero","majorOffset","zeroOffset","pixels","usingDefaultStyle","zeroPosition","drawIcon","icon","Bargraph","fillHeight","outline","barWidth","originalWidth","bar1Height","bar2Height","processedGroupData","coreDistance","drawData","combinedData","intersections","barPoints","_getDataIntersections","heightOffset","_getSafeDrawData","amount","resolved","accumulatedNegative","accumulatedPositive","pointData","groupLabel","_getStackedYRange","xpos","getGroupTemplate","callbackResult","getCallback","Line","_catmullRom","_linear","fillPath","pathArray","subPathArray","dFill","zero","serializePath","inverse","_catmullRomUniform","p0","bp1","bp2","normalization","d1","d2","d3","A","N","d3powA","d2powA","d3pow2A","d2pow2A","d1pow2A","d1powA","side","iconSize","iconSpacing","excludeFromLegend","textArea","scrollableHeight","drawLegendIcons","paddingTop","nodes","nodeIndices","edges","edgeIndices","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseMove","onContext","functions","createNode","createEdge","view","bindEventListeners","images","_modulesGroups2","_modulesCanvas2","selectionHandler","_modulesSelectionHandler2","interactionHandler","_modulesInteractionHandler2","_modulesView2","renderer","_modulesCanvasRenderer2","_modulesPhysicsEngine2","layoutEngine","_modulesLayoutEngine2","clustering","_modulesClustering2","manipulation","_modulesManipulationSystem2","nodesHandler","_modulesNodesHandler2","edgesHandler","_modulesEdgesHandler2","_modulesKamadaKawaiJs2","_modulesGroups","_modulesNodesHandler","_modulesEdgesHandler","_modulesPhysicsEngine","_modulesClustering","_modulesCanvasRenderer","_modulesCanvas","_modulesView","_modulesInteractionHandler","_modulesSelectionHandler","_modulesLayoutEngine","_modulesManipulationSystem","_sharedConfigurator","_sharedConfigurator2","_sharedValidator","_sharedValidator2","_optionsJs","_modulesKamadaKawaiJs","layout","interaction","networkOptions","_updateVisibleIndices","nodeId","edgeId","_updateValueRange","unselectAll","dotData","gephi","gephiData","valueTotal","setValueRange","canvasToDOM","DOMtoCanvas","findNode","isCluster","openCluster","cluster","getNodesInCluster","clusterByConnection","clusterByHubsize","clusterOutliers","getSeed","enableEditMode","disableEditMode","addNodeMode","editNode","editNodeMode","addEdgeMode","editEdgeMode","deleteSelected","getPositions","storePositions","moveNode","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","startSimulation","stopSimulation","stabilize","getSelectedNodes","getSelectedEdges","getNodeAt","getEdgeAt","edge","selectNodes","selectEdges","getViewPosition","releaseNode","getOptionsFromConfigurator","Groups","defaultIndex","groupsArray","defaultGroups","useDefaultGroups","optionFields","groupName","groupname","_componentsNode","_componentsNode2","_componentsSharedLabel","_componentsSharedLabel2","NodesHandler","nodesListeners","borderWidthSelected","brokenImage","fixed","face","strokeColor","image","labelHighlightBold","level","mass","scaling","maxVisible","drawThreshold","customScalingFunction","shadow","shape","shapeProperties","borderDashes","useImageSize","useBorderWithImage","parseOptions","updateShape","updateLabelModule","_reset","doNotEmit","oldNodesData","newNodes","positionInitially","changedData","dataChanged","constructorClass","clearPositions","dataArray","boundingBox","nodeList","nodeObj","toId","fromId","edgeList","_sharedLabel","_sharedLabel2","_nodesShapesBox","_nodesShapesBox2","_nodesShapesCircle","_nodesShapesCircle2","_nodesShapesCircularImage","_nodesShapesCircularImage2","_nodesShapesDatabase","_nodesShapesDatabase2","_nodesShapesDiamond","_nodesShapesDiamond2","_nodesShapesDot","_nodesShapesDot2","_nodesShapesEllipse","_nodesShapesEllipse2","_nodesShapesIcon","_nodesShapesIcon2","_nodesShapesImage","_nodesShapesImage2","_nodesShapesSquare","_nodesShapesSquare2","_nodesShapesStar","_nodesShapesStar2","_nodesShapesText","_nodesShapesText2","_nodesShapesTriangle","_nodesShapesTriangle2","_nodesShapesTriangleDown","_nodesShapesTriangleDown2","Node","imagelist","baseSize","baseFontSize","predefinedPosition","labelModule","currentShape","groupObj","imageObj","load","distanceToBorder","sizeDiff","fontDiff","updateBoundingBox","resize","parentOptions","newOptions","parsedColor","_slicedToArray","sliceIterator","_arr","_n","_e","_s","Symbol","Label","pointToSelf","fontOptions","yLine","nodeOptions","labelDirty","baseline","viewFontSize","calculateLabelSize","_drawBackground","_drawText","lineMargin","fontSize","_getColor2","_getColor","_getColor22","fontColor","_setAlignment2","_setAlignment","_setAlignment22","lineCount","strokeText","_processLabel","measureText","newOptionsArray","_inherits","subClass","superClass","setPrototypeOf","__proto__","_get","_x","_x2","_x3","_again","receiver","desc","getOwnPropertyDescriptor","getPrototypeOf","_utilNodeBase","_utilNodeBase2","Box","_NodeBase","textSize","getTextSize","selectionLineWidth","roundRect","enableShadow","disableShadow","save","enableBorderDashes","disableBorderDashes","restore","NodeBase","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","setLineDash","dashes","_utilCircleImageBase","_utilCircleImageBase2","Circle","_CircleImageBase","diameter","_drawRawCircle","CircleImageBase","labelOffset","imageLoaded","ratio","neutralborderWidth","globalAlpha","can2","ctx2","drawImage","iterations","labelDimensions","CircularImage","_swapToImageResizeWhenImageLoaded","_resizeImage","clip","_drawImageAtPosition","_drawImageLabel","Database","database","_distanceToBorder","_utilShapeBase","_utilShapeBase2","Diamond","_ShapeBase","_resizeShape","_drawShape","ShapeBase","sizeMultiplier","Dot","Ellipse","ellipse","Icon","_icon","iconTextSpacing","Image","Square","Star","Text","Triangle","TriangleDown","_componentsEdge","_componentsEdge2","EdgesHandler","edgesListeners","arrows","scaleFactor","arrowStrikethrough","hoverWidth","selectionWidth","selfReferenceSize","smooth","forceDirection","roundness","emitChange","edgeData","edgeOptions","reconnectEdges","markAllEdgesAsDirty","updateEdgeType","oldEdgesData","edgesData","oldEdge","disconnect","showInternalIds","connect","cleanup","edgeType","colorDirty","_edgesCubicBezierEdge","_edgesCubicBezierEdge2","_edgesBezierEdgeDynamic","_edgesBezierEdgeDynamic2","_edgesBezierEdgeStatic","_edgesBezierEdgeStatic2","_edgesStraightEdge","_edgesStraightEdge2","Edge","baseWidth","connected","_setInteractionWidths","changeInType","attachEdge","detachEdge","widthDiff","viaNode","getViaNode","arrowData","fromPoint","toPoint","getArrowData","core","drawLine","drawArrows","drawLabel","drawArrowHead","node1","node2","getPoint","translate","_rotateForLabelAlignment","_pointOnCircle","xFrom","yFrom","xTo","yTo","xObj","yObj","getDistanceToEdge","angleInDegrees","rotate","percentage","colorsDefined","_x4","_x5","_utilCubicBezierEdgeBase","_utilCubicBezierEdgeBase2","CubicBezierEdge","_CubicBezierEdgeBase","viaNodes","via1","via2","bezierCurveTo","x1","y1","x2","y2","_getViaCoordinates","nearNode","_findBorderPositionBezier","x3","y3","_ref","_ref2","_getDistanceToBezierEdge","_ref3","_ref32","vec","_BezierEdgeBase2","_BezierEdgeBase3","CubicBezierEdgeBase","_BezierEdgeBase","minDistance","lastX","lastY","_getDistanceToLine","_EdgeBase2","_EdgeBase3","BezierEdgeBase","_EdgeBase","distanceToPoint","difference","via","EdgeBase","getColor","getLineWidth","_drawDashedLine","_drawLine","_line","_getCircleData2","_getCircleData","_getCircleData22","_circle","pattern","lineDashOffset","_getCircleData3","_getCircleData32","dashedLine","_getCircleData4","_getCircleData42","_findBorderPosition","_findBorderPositionCircle","_getCircleData5","_getCircleData52","colorOptions","grd","createLinearGradient","fromColor","toColor","addColorStop","_getDistanceToEdge","_getCircleData6","_getCircleData62","px","py","something","u","arrowPoint","guideOffset","findBorderPosition","guidePos","_getCircleData7","_getCircleData72","xi","yi","arrowCore","arrow","_utilBezierEdgeBase","_utilBezierEdgeBase2","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","parentEdgeId","quadraticCurveTo","_x6","BezierEdgeStatic","xVia","yVia","pi","originalAngle","myAngle","_utilEdgeBase","_utilEdgeBase2","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","_componentsPhysicsBarnesHutSolver","_componentsPhysicsBarnesHutSolver2","_componentsPhysicsRepulsionSolver","_componentsPhysicsRepulsionSolver2","_componentsPhysicsHierarchicalRepulsionSolver","_componentsPhysicsHierarchicalRepulsionSolver2","_componentsPhysicsSpringSolver","_componentsPhysicsSpringSolver2","_componentsPhysicsHierarchicalSpringSolver","_componentsPhysicsHierarchicalSpringSolver2","_componentsPhysicsCentralGravitySolver","_componentsPhysicsCentralGravitySolver2","_componentsPhysicsFA2BasedRepulsionSolver","_componentsPhysicsFA2BasedRepulsionSolver2","_componentsPhysicsFA2BasedCentralGravitySolver","_componentsPhysicsFA2BasedCentralGravitySolver2","PhysicsEngine","physicsBody","physicsNodeIndices","physicsEdgeIndices","forces","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","theta","gravitationalConstant","centralGravity","springLength","springConstant","damping","avoidOverlap","forceAtlas2Based","repulsion","nodeDistance","hierarchicalRepulsion","maxVelocity","minVelocity","stabilization","updateInterval","onlyDynamicEdges","timestep","layoutFailed","initPhysics","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","modelOptions","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","calculateForces","moveNodes","revert","_evaluateStepQuality","nodeIds","positions","vx","vy","dpos","reference","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","totalVelocity","solve","targetIterations","_freezeNodes","_stabilizationBatch","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","BarnesHutSolver","barnesHutTree","randomSeed","thetaInversed","overlapAvoidanceFactor","nodeCount","_formBarnesHutTree","_getForceContribution","NW","NE","SW","SE","parentBranch","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","_placeInRegion","region","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","node3","_calculateSpringForce","springForce","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","_BarnesHutSolver2","_BarnesHutSolver3","ForceAtlas2BasedRepulsionSolver","_BarnesHutSolver","degree","_CentralGravitySolver2","_CentralGravitySolver3","ForceAtlas2BasedCentralGravitySolver","_CentralGravitySolver","_NetworkUtil","_NetworkUtil2","_componentsNodesCluster","_componentsNodesCluster2","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","refreshData","joinCondition","childNodesObj","childEdgesObj","clonedOptions","cloneOptions","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","gatheringSuccessful","childNodeId","_getConnectedId","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","clusterEdgeProperties","childNode","otherNodeId","childKeys","createEdges","_edge","newEdge","clusteringEdgeReplacingId","_backupEdgeOptions","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","containedNodes","containedEdges","_createClusterEdges","originalOptions","clusterNodeId","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherCluster","transferEdge","replacedEdge","_restoreEdge","nodesArray","reverse","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","NetworkUtil","allNodes","specificNodes","amountOfConnections","_Node2","_Node3","Cluster","_Node","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","hideEdgesOnDrag","hideNodesOnDrag","_determineBrowserMethod","_resizeNodes","_requestRedraw","_startRendering","cancelAnimationFrame","_renderStep","_drawEdges","_drawNodes","alwaysShow","topLeft","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","Canvas","resizeTimer","resizeFunction","cameraState","hammerFrame","_cleanUp","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","_setCameraState","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","initialZoom","zoomLevel","positionDefined","numberOfNodes","yDistance","xZoomLevel","yZoomLevel","findCenter","animationOptions","nodePosition","lockedOnNode","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","_componentsNavigationHandler","_componentsNavigationHandler2","_componentsPopup","_componentsPopup2","InteractionHandler","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","keyboard","speed","bindToWindow","navigationButtons","tooltipDelay","zoomView","pinched","checkSelectionChanges","_generateClickEvent","previouslySelectedEdgeCount","_getSelectedEdgeCount","previouslySelectedNodeCount","_getSelectedNodeCount","previousSelection","selectAdditionalOnPoint","selectOnPoint","selectedEdgesCount","selectedNodesCount","currentSelection","_determineIfDifferent2","_determineIfDifferent","nodesChanged","edgesChanged","nodeSelected","selectObject","selectionObj","xFixed","yFixed","scaleOld","preScaleDragPointer","scaleFrac","tx","ty","postScaleDragPointer","popupVisible","_checkHidePopup","setPosition","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","isOverlappingWith","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","unbindFromRedraw","Popup","doShow","SelectionHandler","hoverObj","selectConnectedEdges","hoverConnectedEdges","updateSelection","selectionChanged","deselectObject","emptySelection","DOM","highlightEdges","_selectConnectedEdges","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","_getAllEdgesOverlappingWith","_unselectConnectedEdges","clusterSize","_addToHover","hoverChanged","blurObject","_hoverConnectedEdges","edgeIds","idArray","RangeError","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","hierarchical","levelSeparation","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","prevHierarchicalState","adaptAllOptionsForHierarchicalLayout","MAX_LEVELS","clusterThreshold","startLength","before","clusterBridges","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","definedPositions","undefinedLevel","hierarchicalLevels","lastNodeOnLevel","hierarchicalChildrenReference","hierarchicalParentReference","hierarchicalTrees","treeIndex","distributionOrdering","distributionIndex","distributionOrderingPresence","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftTree","_getPositionForHierarchy","_setPositionForHierarchy","getTreeSize","treeWidths","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","_getSpaceAroundNode2","_getSpaceAroundNode","_getSpaceAroundNode22","minSpaceNode","maxSpaceNode","getMaxLevel","getCollisionLevel","maxLevel1","maxLevel2","hasSameParent","parents1","parents2","shiftElementsCloser","levels","centerParents","levelNodes","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","_getBranchBoundary","_getBranchBoundary2","max1","_getBranchBoundary3","_getBranchBoundary32","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","otherNode","getFx","getDFx","getGuess","guess","guessMap","dfx","moveBranch","branchNodes","_getBranchBoundary4","_getBranchBoundary42","minSpaceBranch","maxSpaceBranch","branchOffset","_getSpaceAroundNode3","_getSpaceAroundNode32","newPosition","minimizeEdgeLengthBottomUp","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","minPos","maxPos","_getSpaceAroundNode4","_getSpaceAroundNode42","positionedNodes","nodeArray","_indexArrayToNodes","_sortNodeArray","handledNodeCount","_validataPositionAndContinue","parentLevel","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","hubSize","levelDownstream","nodeA","nodeB","_crawlNetwork","minLevel","customCallback","levelByDirection","levelA","_setMinLevelToZero","fillInRelations","startingNodeId","_this7","crawler","tree","childA","childB","_this8","iterateParents","_parent","findParent","_parent2","foundParent","doNotUpdate","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","addNode","addEdge","editEdge","deleteNode","deleteEdge","controlNodeStyle","_restore","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","selectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","edgeBeingEditedId","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","_performEditEdge","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","_componentsAlgorithmsFloydWarshallJs","_componentsAlgorithmsFloydWarshallJs2","KamadaKawai","edgeStrength","distanceSolver","edgesArray","ignoreClusters","D_matrix","getDistances","_createL_matrix","_createK_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode2","_getHighestEnergyNode","_getHighestEnergyNode22","_moveNode","_getEnergy2","_getEnergy","_getEnergy22","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","_getEnergy3","_getEnergy32","x_m","y_m","iIdx","x_i","y_i","denominator","K_matrix","L_matrix","d2E_dx2","d2E_dxdy","d2E_dy2","FloydWarshall","CanvasRenderingContext2D","square","s2","ir","triangleDown","star","diamond","r2d","kappa","ox","oy","xe","ye","xm","ym","wEllipse","hEllipse","ymb","yeb","xt","yt","xl","yl","xr","yr","patternLength","slope","distRemaining","patternIndex","dashLength","parseDOT","parseGraph","nextPreview","isAlphaNumeric","regexAlphaNumeric","setValue","graphs","attr","getToken","tokenType","TOKENTYPE","NULL","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","maxLength","forEach2","elem1","elem2","setProp","convertAttr","mapping","visProp","visPropI","graphData","dotNode","graphNode","NODE_ATTR_MAPPING","convertEdge","dotEdge","graphEdge","EDGE_ATTR_MAPPING","subEdge","fontsize","fontcolor","labelfontcolor","fontname","fillcolor","labeltooltip","{","}","[","]",";","=",",","->","--","gephiJSON","inheritColor","gEdges","gNodes","gEdge","gNode","imageBroken","url","imageToCache","brokenUrl","imageToLoadBrokenUrlOn","onerror","_addImageToCache","imageToRedrawWith","cachedImage","img","onload","_redrawWithImage","_tryloadBrokenUrl","edit","del","back","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,cAEA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,KACbK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAAS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vI,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY","file":"vis.map"} \ No newline at end of file diff --git a/dist/vis.min.css b/dist/vis.min.css index 529a6b06..d7e4286c 100644 --- a/dist/vis.min.css +++ b/dist/vis.min.css @@ -1 +1 @@ -.vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.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}div.vis-configuration{position:relative;display:block;float:left;font-size:9pt}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:90pt;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:75pt}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;height:13px;padding:1px;margin:0;pointer-events:none}.vis-panel,.vis-timeline{padding:0;box-sizing:border-box}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-range::-moz-range-thumb{border:none;height:1pc;width:1pc;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:1pc;width:1pc;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:9pt;margin-top:-9pt}.vis-timeline{position:relative;border:1px solid #bfbfbf;margin:0}.vis-panel{position:absolute;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-itemset,.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.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{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;box-sizing:border-box;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-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;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;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;overflow:hidden;box-sizing:border-box;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:9pt;-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-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);pointer-events:none}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-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{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;position:absolute;vertical-align:middle}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}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 .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}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}.vis-panel,.vis-timeline{padding:0;box-sizing:border-box}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-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-configuration.vis-config-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-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}.vis-timeline{position:relative;border:1px solid #bfbfbf;margin:0}.vis-panel{position:absolute;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-itemset,.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.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{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;box-sizing:border-box;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-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;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;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-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.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;overflow:hidden;box-sizing:border-box;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}div.vis-network div.vis-close,div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.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 );padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;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);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{float:left;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-left:10px;padding:0 8px;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{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;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);pointer-events:none}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-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;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{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;position:absolute;vertical-align:middle}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}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/dist/vis.min.js b/dist/vis.min.js index 2339cc5a..b919c9af 100644 --- a/dist/vis.min.js +++ b/dist/vis.min.js @@ -4,11 +4,11 @@ * * A dynamic, browser-based visualization library. * - * @version 4.8.1-SNAPSHOT - * @date 2015-08-28 + * @version 4.15.1-SNAPSHOT + * @date 2016-02-23 * * @license - * Copyright (C) 2011-2015 Almende B.V, http://almende.com + * Copyright (C) 2011-2016 Almende B.V, http://almende.com * * Vis.js is dual licensed under both * @@ -22,23 +22,24 @@ * * Vis.js may be distributed under either license. */ -"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function e(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Graph3d=i(11),e.graph3d={Camera:i(15),Filter:i(16),Point2d:i(14),Point3d:i(13),Slider:i(17),StepNumber:i(18)},e.Timeline=i(19),e.Graph2d=i(49),e.timeline={DateUtil:i(27),DataStep:i(52),Range:i(24),stack:i(32),TimeStep:i(30),components:{items:{Item:i(34),BackgroundItem:i(38),BoxItem:i(36),PointItem:i(37),RangeItem:i(33)},Component:i(26),CurrentTime:i(44),CustomTime:i(42),DataAxis:i(51),GraphGroup:i(53),Group:i(31),BackgroundGroup:i(35),ItemSet:i(29),Legend:i(57),LineGraph:i(50),TimeAxis:i(39)}},e.Network=i(59),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(110)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(2),e.Hammer=i(20),e.keycharm=i(41)},function(t,e,i){var o=i(2),n=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,o){if(e==t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)},e.isString=function(t){return t instanceof String||"string"==typeof t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var i=s.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return n.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!=typeof t[i]&&(t[i]=e)},e.fillIfDefined=function(t,i){var o=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];for(var n in t)void 0!==i[n]&&("object"!=typeof i[n]?void 0!==i[n]&&null!==i[n]||void 0===t[n]||o!==!0?t[n]=i[n]:delete t[n]:"object"==typeof t[n]&&e.fillIfDefined(t[n],i[n],o))},e.protoExtend=function(t,e){for(var i=1;ii;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var n;if(void 0===t)return void 0;if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(o.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])):o(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return o(t);if(t instanceof Date)return o(t.valueOf());if(o.isMoment(t))return o(t);if(e.isString(t))return n=s.exec(t),o(n?Number(n[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(o.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){n=s.exec(t);var r;return r=n?new Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+r+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}};var s=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e=typeof t;return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var r={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=r.split(t.style.cssText),n=r.split(i),s=e.extend(o,n);t.style.cssText=r.join(s)},e.removeCssText=function(t,e){var i=r.split(t.style.cssText),o=r.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=r.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==typeof i){for(var o=Object.create(i),n=0;n=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],u=e(l);if(0==u)return h;-1==u?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o){for(var n,s,r,a,h=1e4,d=0,l=0,u=t.length-1;u>=l&&h>d;){if(a=Math.floor(.5*(u+l)),n=t[Math.max(0,a-1)][i],s=t[a][i],r=t[Math.min(t.length-1,a+1)][i],s==e)return a;if(e>n&&s>e)return"before"==o?Math.max(0,a-1):a;if(e>s&&r>e)return"before"==o?a:Math.min(t.length-1,a+1);e>s?l=a+1:u=a-1,d++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return zi.apply(null,arguments)}function i(t){zi=t}function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in Ai)o=Ai[i],n=e[o],"undefined"!=typeof n&&(t[o]=n);return t}function f(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),Bi===!1&&(Bi=!0,e.updateOffset(this),Bi=!1)}function m(t){return t instanceof f||null!=t&&null!=t._isAMomentObject}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function g(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=v(e)),i}function y(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&g(t[o])!==g(e[o]))&&r++;return r+s}function b(){}function w(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,i,o,n,s=0;s0;){if(o=x(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&y(n,i,!0)>=e-1)break;e--}s++}return null}function x(e){var i=null;if(!Ri[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=Li._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),k(i)}catch(o){}return Ri[e]}function k(t,e){var i;return t&&(i="undefined"==typeof e?M(t):O(t,e),i&&(Li=i)),Li._abbr}function O(t,e){return null!==e?(e.abbr=t,Ri[t]=Ri[t]||new b,Ri[t].set(e),k(t),Ri[t]):(delete Ri[t],null)}function M(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Li;if(!o(t)){if(e=x(t))return e;t=[t]}return _(t)}function D(t,e){var i=t.toLowerCase();Fi[i]=Fi[i+"s"]=Fi[e]=t}function C(t){return"string"==typeof t?Fi[t]||Fi[t.toLowerCase()]:void 0}function T(t){var e,i,o={};for(i in t)r(t,i)&&(e=C(i),e&&(o[e]=t[i]));return o}function E(t,i){return function(o){return null!=o?(P(this,t,o),e.updateOffset(this,i),this):S(this,t)}}function S(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function P(t,e,i){return t._d["set"+(t._isUTC?"UTC":"")+e](i)}function I(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=C(t),"function"==typeof this[t])return this[t](e);return this}function N(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function z(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(Yi[t]=n),e&&(Yi[e[0]]=function(){return N(n.apply(this,arguments),e[1],e[2])}),i&&(Yi[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function A(t){var e,i,o=t.match(ji);for(e=0,i=o.length;i>e;e++)Yi[o[e]]?o[e]=Yi[o[e]]:o[e]=L(o[e]);return function(n){var s="";for(e=0;i>e;e++)s+=o[e]instanceof Function?o[e].call(n,t):o[e];return s}}function B(t,e){return t.isValid()?(e=R(e,t.localeData()),Wi[e]=Wi[e]||A(e),Wi[e](t)):t.localeData().invalidDate()}function R(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(Hi.lastIndex=0;o>=0&&Hi.test(t);)t=t.replace(Hi,i),Hi.lastIndex=0,o-=1;return t}function F(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function j(t,e,i){no[t]=F(e)?e:function(t){return t&&i?i:e}}function H(t,e){return r(no,t)?no[t](e._strict,e._locale):new RegExp(W(t))}function W(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=g(t)}),i=0;io;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function K(t,e){var i;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t)}function J(t){return null!=t?(K(this,t),e.updateOffset(this,!0),this):S(this,"Month")}function Q(){return V(this.year(),this.month())}function $(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[ao]<0||i[ao]>11?ao:i[ho]<1||i[ho]>V(i[ro],i[ao])?ho:i[lo]<0||i[lo]>24||24===i[lo]&&(0!==i[uo]||0!==i[co]||0!==i[po])?lo:i[uo]<0||i[uo]>59?uo:i[co]<0||i[co]>59?co:i[po]<0||i[po]>999?po:-1,l(t)._overflowDayOfYear&&(ro>e||e>ho)&&(e=ho),l(t).overflow=e),t}function tt(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function et(t,e){var i=!0;return a(function(){return i&&(tt(t+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function it(t,e){vo[t]||(tt(e),vo[t]=!0)}function ot(t){var e,i,o=t._i,n=go.exec(o);if(n){for(l(t).iso=!0,e=0,i=yo.length;i>e;e++)if(yo[e][1].exec(o)){t._f=yo[e][0];break}for(e=0,i=bo.length;i>e;e++)if(bo[e][1].exec(o)){t._f+=(n[6]||" ")+bo[e][0];break}o.match(eo)&&(t._f+="Z"),xt(t)}else t._isValid=!1}function nt(t){var i=wo.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(ot(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function st(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 1970>t&&a.setFullYear(t),a}function rt(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function at(t){return ht(t)?366:365}function ht(t){return t%4===0&&t%100!==0||t%400===0}function dt(){return ht(this.year())}function lt(t,e,i){var o,n=i-e,s=i-t.day();return s>n&&(s-=7),n-7>s&&(s+=7),o=St(t).add(s,"d"),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function ut(t){return lt(t,this._week.dow,this._week.doy).week}function ct(){return this._week.dow}function pt(){return this._week.doy}function ft(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function mt(t){var e=lt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function vt(t,e,i,o,n){var s,r=6+n-o,a=rt(t,0,1+r),h=a.getUTCDay();return n>h&&(h+=7),i=null!=i?1*i:n,s=1+r+7*(e-1)-h+i,{year:s>0?t:t-1,dayOfYear:s>0?s:at(t-1)+s}}function gt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function yt(t,e,i){return null!=t?t:null!=e?e:i}function bt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function wt(t){var e,i,o,n,s=[];if(!t._d){for(o=bt(t),t._w&&null==t._a[ho]&&null==t._a[ao]&&_t(t),t._dayOfYear&&(n=yt(t._a[ro],o[ro]),t._dayOfYear>at(n)&&(l(t)._overflowDayOfYear=!0),i=rt(n,0,t._dayOfYear),t._a[ao]=i.getUTCMonth(),t._a[ho]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[lo]&&0===t._a[uo]&&0===t._a[co]&&0===t._a[po]&&(t._nextDay=!0,t._a[lo]=0),t._d=(t._useUTC?rt:st).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[lo]=24)}}function _t(t){var e,i,o,n,s,r,a;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=yt(e.GG,t._a[ro],lt(St(),1,4).year),o=yt(e.W,1),n=yt(e.E,1)):(s=t._locale._week.dow,r=t._locale._week.doy,i=yt(e.gg,t._a[ro],lt(St(),s,r).year),o=yt(e.w,1),null!=e.d?(n=e.d,s>n&&++o):n=null!=e.e?e.e+s:s),a=vt(i,o,n,r,s),t._a[ro]=a.year,t._dayOfYear=a.dayOfYear}function xt(t){if(t._f===e.ISO_8601)return void ot(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=R(t._f,t._locale).match(ji)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Yi[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),U(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[lo]<=12&&t._a[lo]>0&&(l(t).bigHour=void 0),t._a[lo]=kt(t._locale,t._a[lo],t._meridiem),wt(t),$(t)}function kt(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Ot(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function Mt(t){if(!t._d){var e=T(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],wt(t)}}function Dt(t){var e=new f($(Ct(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ct(t){var e=t._i,i=t._f;return t._locale=t._locale||M(t._l),null===e||void 0===i&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new f($(e)):(o(i)?Ot(t):i?xt(t):n(e)?t._d=e:Tt(t),t))}function Tt(t){var i=t._i;void 0===i?t._d=new Date:n(i)?t._d=new Date(+i):"string"==typeof i?nt(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),wt(t)):"object"==typeof i?Mt(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Et(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,Dt(s)}function St(t,e,i,o){return Et(t,e,i,o,!1)}function Pt(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return St();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+N(~~(t/60),2)+e+N(~~t%60,2)})}function Bt(t){var e=(t||"").match(eo)||[],i=e[e.length-1]||[],o=(i+"").match(Mo)||["-",0,0],n=+(60*o[1])+g(o[2]);return"+"===o[0]?n:-n}function Rt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(m(t)||n(t)?+t:+St(t))-+o,o._d.setTime(+o._d+s),e.updateOffset(o,!1),o):St(t).local()}function Ft(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function jt(t,i){var o,n=this._offset||0;return null!=t?("string"==typeof t&&(t=Bt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=Ft(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?ie(this,Jt(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:Ft(this)}function Ht(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Wt(t){return this.utcOffset(0,t)}function Yt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ft(this),"m")),this}function Gt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Bt(this._i)),this}function Ut(t){return t=t?St(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Vt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(p(t,this),t=Ct(t),t._a){var e=t._isUTC?h(t._a):St(t._a);this._isDSTShifted=this.isValid()&&y(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Xt(){return!this._isUTC}function Zt(){return this._isUTC}function Kt(){return this._isUTC&&0===this._offset}function Jt(t,e){var i,o,n,s=t,a=null;return Lt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=Do.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:g(a[ho])*i,h:g(a[lo])*i,m:g(a[uo])*i,s:g(a[co])*i,ms:g(a[po])*i}):(a=Co.exec(t))?(i="-"===a[1]?-1:1,s={y:Qt(a[2],i),M:Qt(a[3],i),d:Qt(a[4],i),h:Qt(a[5],i),m:Qt(a[6],i),s:Qt(a[7],i),w:Qt(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=te(St(s.from),St(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new zt(s),Lt(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function Qt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function $t(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function te(t,e){var i;return e=Rt(e,t),t.isBefore(e)?i=$t(t,e):(i=$t(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function ee(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(it(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Jt(i,o),ie(this,n,t),this}}function ie(t,i,o,n){var s=i._milliseconds,r=i._days,a=i._months;n=null==n?!0:n,s&&t._d.setTime(+t._d+s*o),r&&P(t,"Date",S(t,"Date")+r*o),a&&K(t,S(t,"Month")+a*o),n&&e.updateOffset(t,r||a)}function oe(t,e){var i=t||St(),o=Rt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse";return this.format(e&&e[s]||this.localeData().calendar(s,this,St(i)))}function ne(){return new f(this)}function se(t,e){var i;return e=C("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:St(t),+this>+t):(i=m(t)?+t:+St(t),i<+this.clone().startOf(e))}function re(t,e){var i;return e=C("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:St(t),+t>+this):(i=m(t)?+t:+St(t),+this.clone().endOf(e)e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)}function ue(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ce(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(i=St([2e3,1]).day(e),o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(o.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function We(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Be(t,this.localeData()),this.add(t-e,"d")):e}function Ye(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ge(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Ue(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ve(t,e){return e._meridiemParse}function qe(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xe(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Ze(t,e){e[po]=g(1e3*("0."+t))}function Ke(){return this._isUTC?"UTC":""}function Je(){return this._isUTC?"Coordinated Universal Time":""}function Qe(t){return St(1e3*t)}function $e(){return St.apply(null,arguments).parseZone()}function ti(t,e,i){var o=this._calendar[t];return"function"==typeof o?o.call(e,i):o}function ei(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function ii(){return this._invalidDate}function oi(t){return this._ordinal.replace("%d",t)}function ni(t){return t}function si(t,e,i,o){var n=this._relativeTime[i];return"function"==typeof n?n(t,e,i,o):n.replace(/%d/i,t)}function ri(t,e){var i=this._relativeTime[t>0?"future":"past"];return"function"==typeof i?i(e):i.replace(/%s/i,e)}function ai(t){var e,i;for(i in t)e=t[i],"function"==typeof e?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hi(t,e,i,o){var n=M(),s=h().set(o,e);return n[i](s,t)}function di(t,e,i,o,n){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return hi(t,e,i,n);var s,r=[];for(s=0;o>s;s++)r[s]=hi(t,s,i,n);return r}function li(t,e){return di(t,e,"months",12,"month")}function ui(t,e){return di(t,e,"monthsShort",12,"month")}function ci(t,e){return di(t,e,"weekdays",7,"day")}function pi(t,e){return di(t,e,"weekdaysShort",7,"day")}function fi(t,e){return di(t,e,"weekdaysMin",7,"day")}function mi(){var t=this._data;return this._milliseconds=Ko(this._milliseconds),this._days=Ko(this._days),this._months=Ko(this._months),t.milliseconds=Ko(t.milliseconds),t.seconds=Ko(t.seconds),t.minutes=Ko(t.minutes),t.hours=Ko(t.hours),t.months=Ko(t.months),t.years=Ko(t.years),this}function vi(t,e,i,o){var n=Jt(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function gi(t,e){return vi(this,t,e,1)}function yi(t,e){return vi(this,t,e,-1)}function bi(t){return 0>t?Math.floor(t):Math.ceil(t)}function wi(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*bi(xi(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=v(s/1e3),h.seconds=t%60,e=v(t/60),h.minutes=e%60,i=v(e/60),h.hours=i%24,r+=v(i/24),n=v(_i(r)),a+=n,r-=bi(xi(n)),o=v(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function _i(t){return 4800*t/146097}function xi(t){return 146097*t/4800}function ki(t){var e,i,o=this._milliseconds;if(t=C(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+_i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(xi(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Oi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12)}function Mi(t){return function(){return this.as(t)}}function Di(t){return t=C(t),this[t+"s"]()}function Ci(t){return function(){return this._data[t]}}function Ti(){return v(this.days()/7)}function Ei(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function Si(t,e,i){var o=Jt(t).abs(),n=pn(o.as("s")),s=pn(o.as("m")),r=pn(o.as("h")),a=pn(o.as("d")),h=pn(o.as("M")),d=pn(o.as("y")),l=n0,l[4]=i,Ei.apply(null,l)}function Pi(t,e){return void 0===fn[t]?!1:void 0===e?fn[t]:(fn[t]=e,!0)}function Ii(t){var e=this.localeData(),i=Si(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Ni(){var t,e,i,o=mn(this._milliseconds)/1e3,n=mn(this._days),s=mn(this._months);t=v(o/60),e=v(t/60),o%=60,t%=60,i=v(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||u?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var zi,Li,Ai=e.momentProperties=[],Bi=!1,Ri={},Fi={},ji=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Hi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wi={},Yi={},Gi=/\d/,Ui=/\d\d/,Vi=/\d{3}/,qi=/\d{4}/,Xi=/[+-]?\d{6}/,Zi=/\d\d?/,Ki=/\d{1,3}/,Ji=/\d{1,4}/,Qi=/[+-]?\d{1,6}/,$i=/\d+/,to=/[+-]?\d+/,eo=/Z|[+-]\d\d:?\d\d/gi,io=/[+-]?\d+(\.\d{1,3})?/,oo=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,no={},so={},ro=0,ao=1,ho=2,lo=3,uo=4,co=5,po=6;z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),z("MMMM",0,0,function(t){return this.localeData().months(this,t)}),D("month","M"),j("M",Zi),j("MM",Zi,Ui),j("MMM",oo),j("MMMM",oo),Y(["M","MM"],function(t,e){e[ao]=g(t)-1}),Y(["MMM","MMMM"],function(t,e,i,o){var n=i._locale.monthsParse(t,o,i._strict);null!=n?e[ao]=n:l(i).invalidMonth=t});var fo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),mo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),vo={};e.suppressDeprecationWarnings=!1;var go=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],bo=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],wo=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=et("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),D("year","y"),j("Y",to),j("YY",Zi,Ui),j("YYYY",Ji,qi),j("YYYYY",Qi,Xi),j("YYYYYY",Qi,Xi),Y(["YYYYY","YYYYYY"],ro),Y("YYYY",function(t,i){i[ro]=2===t.length?e.parseTwoDigitYear(t):g(t)}),Y("YY",function(t,i){i[ro]=e.parseTwoDigitYear(t)}),e.parseTwoDigitYear=function(t){return g(t)+(g(t)>68?1900:2e3)};var _o=E("FullYear",!1);z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),D("week","w"),D("isoWeek","W"),j("w",Zi),j("ww",Zi,Ui),j("W",Zi),j("WW",Zi,Ui),G(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=g(t)});var xo={dow:0,doy:6};z("DDD",["DDDD",3],"DDDo","dayOfYear"),D("dayOfYear","DDD"),j("DDD",Ki),j("DDDD",Vi),Y(["DDD","DDDD"],function(t,e,i){i._dayOfYear=g(t)}),e.ISO_8601=function(){};var ko=et("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=St.apply(null,arguments);return this>t?this:t}),Oo=et("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=St.apply(null,arguments);return t>this?this:t});At("Z",":"),At("ZZ",""),j("Z",eo),j("ZZ",eo),Y(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Bt(t)});var Mo=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Do=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Co=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Jt.fn=zt.prototype;var To=ee(1,"add"),Eo=ee(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var So=et("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Se("gggg","weekYear"),Se("ggggg","weekYear"),Se("GGGG","isoWeekYear"),Se("GGGGG","isoWeekYear"),D("weekYear","gg"),D("isoWeekYear","GG"),j("G",to),j("g",to),j("GG",Zi,Ui),j("gg",Zi,Ui),j("GGGG",Ji,qi),j("gggg",Ji,qi),j("GGGGG",Qi,Xi),j("ggggg",Qi,Xi),G(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=g(t)}),G(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),z("Q",0,0,"quarter"),D("quarter","Q"),j("Q",Gi),Y("Q",function(t,e){e[ao]=3*(g(t)-1)}),z("D",["DD",2],"Do","date"),D("date","D"),j("D",Zi),j("DD",Zi,Ui),j("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Y(["D","DD"],ho),Y("Do",function(t,e){e[ho]=g(t.match(Zi)[0],10)});var Po=E("Date",!0);z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),D("day","d"),D("weekday","e"),D("isoWeekday","E"),j("d",Zi),j("e",Zi),j("E",Zi),j("dd",oo),j("ddd",oo),j("dddd",oo),G(["dd","ddd","dddd"],function(t,e,i){var o=i._locale.weekdaysParse(t);null!=o?e.d=o:l(i).invalidWeekday=t}),G(["d","e","E"],function(t,e,i,o){e[o]=g(t)});var Io="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),No="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zo="Su_Mo_Tu_We_Th_Fr_Sa".split("_");z("H",["HH",2],0,"hour"),z("h",["hh",2],0,function(){return this.hours()%12||12}),Ue("a",!0),Ue("A",!1),D("hour","h"),j("a",Ve),j("A",Ve),j("H",Zi),j("h",Zi),j("HH",Zi,Ui),j("hh",Zi,Ui),Y(["H","HH"],lo),Y(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Y(["h","hh"],function(t,e,i){e[lo]=g(t),l(i).bigHour=!0});var Lo=/[ap]\.?m?\.?/i,Ao=E("Hours",!0);z("m",["mm",2],0,"minute"),D("minute","m"),j("m",Zi),j("mm",Zi,Ui),Y(["m","mm"],uo);var Bo=E("Minutes",!1);z("s",["ss",2],0,"second"),D("second","s"),j("s",Zi),j("ss",Zi,Ui),Y(["s","ss"],co);var Ro=E("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),D("millisecond","ms"),j("S",Ki,Gi),j("SS",Ki,Ui),j("SSS",Ki,Vi);var Fo;for(Fo="SSSS";Fo.length<=9;Fo+="S")j(Fo,$i);for(Fo="S";Fo.length<=9;Fo+="S")Y(Fo,Ze);var jo=E("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var Ho=f.prototype;Ho.add=To,Ho.calendar=oe,Ho.clone=ne,Ho.diff=de,Ho.endOf=_e,Ho.format=pe,Ho.from=fe,Ho.fromNow=me,Ho.to=ve,Ho.toNow=ge,Ho.get=I,Ho.invalidAt=Ee,Ho.isAfter=se,Ho.isBefore=re,Ho.isBetween=ae,Ho.isSame=he,Ho.isValid=Ce,Ho.lang=So,Ho.locale=ye,Ho.localeData=be,Ho.max=Oo,Ho.min=ko,Ho.parsingFlags=Te,Ho.set=I,Ho.startOf=we,Ho.subtract=Eo,Ho.toArray=Me,Ho.toObject=De,Ho.toDate=Oe,Ho.toISOString=ce,Ho.toJSON=ce,Ho.toString=ue,Ho.unix=ke,Ho.valueOf=xe,Ho.year=_o,Ho.isLeapYear=dt,Ho.weekYear=Ie,Ho.isoWeekYear=Ne,Ho.quarter=Ho.quarters=Ae,Ho.month=J,Ho.daysInMonth=Q,Ho.week=Ho.weeks=ft,Ho.isoWeek=Ho.isoWeeks=mt,Ho.weeksInYear=Le,Ho.isoWeeksInYear=ze,Ho.date=Po,Ho.day=Ho.days=We,Ho.weekday=Ye,Ho.isoWeekday=Ge,Ho.dayOfYear=gt,Ho.hour=Ho.hours=Ao,Ho.minute=Ho.minutes=Bo,Ho.second=Ho.seconds=Ro,Ho.millisecond=Ho.milliseconds=jo,Ho.utcOffset=jt,Ho.utc=Wt,Ho.local=Yt,Ho.parseZone=Gt,Ho.hasAlignedHourOffset=Ut,Ho.isDST=Vt,Ho.isDSTShifted=qt,Ho.isLocal=Xt,Ho.isUtcOffset=Zt,Ho.isUtc=Kt,Ho.isUTC=Kt,Ho.zoneAbbr=Ke,Ho.zoneName=Je,Ho.dates=et("dates accessor is deprecated. Use date instead.",Po),Ho.months=et("months accessor is deprecated. Use month instead",J),Ho.years=et("years accessor is deprecated. Use year instead",_o),Ho.zone=et("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ht);var Wo=Ho,Yo={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Go={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Uo="Invalid date",Vo="%d",qo=/\d{1,2}/,Xo={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Zo=b.prototype;Zo._calendar=Yo,Zo.calendar=ti,Zo._longDateFormat=Go,Zo.longDateFormat=ei,Zo._invalidDate=Uo,Zo.invalidDate=ii,Zo._ordinal=Vo,Zo.ordinal=oi,Zo._ordinalParse=qo,Zo.preparse=ni,Zo.postformat=ni,Zo._relativeTime=Xo,Zo.relativeTime=si,Zo.pastFuture=ri,Zo.set=ai,Zo.months=q,Zo._months=fo,Zo.monthsShort=X,Zo._monthsShort=mo,Zo.monthsParse=Z,Zo.week=ut,Zo._week=xo,Zo.firstDayOfYear=pt,Zo.firstDayOfWeek=ct,Zo.weekdays=Re,Zo._weekdays=Io,Zo.weekdaysMin=je,Zo._weekdaysMin=zo,Zo.weekdaysShort=Fe,Zo._weekdaysShort=No,Zo.weekdaysParse=He,Zo.isPM=qe,Zo._meridiemParse=Lo,Zo.meridiem=Xe,k("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===g(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=et("moment.lang is deprecated. Use moment.locale instead.",k),e.langData=et("moment.langData is deprecated. Use moment.localeData instead.",M);var Ko=Math.abs,Jo=Mi("ms"),Qo=Mi("s"),$o=Mi("m"),tn=Mi("h"),en=Mi("d"),on=Mi("w"),nn=Mi("M"),sn=Mi("y"),rn=Ci("milliseconds"),an=Ci("seconds"),hn=Ci("minutes"),dn=Ci("hours"),ln=Ci("days"),un=Ci("months"),cn=Ci("years"),pn=Math.round,fn={s:45,m:45,h:22,d:26,M:11},mn=Math.abs,vn=zt.prototype;vn.abs=mi,vn.add=gi,vn.subtract=yi,vn.as=ki,vn.asMilliseconds=Jo,vn.asSeconds=Qo,vn.asMinutes=$o,vn.asHours=tn,vn.asDays=en,vn.asWeeks=on,vn.asMonths=nn,vn.asYears=sn,vn.valueOf=Oi,vn._bubble=wi,vn.get=Di,vn.milliseconds=rn,vn.seconds=an,vn.minutes=hn,vn.hours=dn,vn.days=ln,vn.weeks=Ti,vn.months=un,vn.years=cn,vn.humanize=Ii,vn.toISOString=Ni,vn.toString=Ni,vn.toJSON=Ni,vn.locale=ye,vn.localeData=be,vn.toIsoString=et("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ni),vn.lang=So,z("X",0,0,"unix"),z("x",0,0,"valueOf"),j("x",to),j("X",io),Y("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,i){i._d=new Date(g(t))}),e.version="2.10.6",i(St),e.fn=Wo,e.min=It,e.max=Nt,e.utc=h,e.unix=Qe,e.months=li,e.isDate=n,e.locale=k,e.invalid=c,e.duration=Jt,e.isMoment=m,e.weekdays=ci,e.parseZone=$e,e.localeData=M,e.isDuration=Lt,e.monthsShort=ui,e.weekdaysMin=fi,e.defineLocale=O,e.weekdaysShort=pi,e.normalizeUnits=C,e.relativeTimeThreshold=Pi;var gn=e;return gn})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=u[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;6>p;p++)s[n+p]=c[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;256>c;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.style&&a.setAttributeNS(null,"style",o.style),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i in this._options.type)if(this._options.type.hasOwnProperty(i)){var o=this._options.type[i];"Date"==o||"ISODate"==o||"ASPDate"==o?this._type[i]="Date":this._type[i]=o}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n=i(1),s=i(9);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=s.extend(this,{replace:["add","update","remove"]})),"object"==typeof t.queue&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0;ns;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],n=[],s=this,r=s._fieldId,a=function(t){var e=t[r];s._data[e]?(e=s._updateItem(t),o.push(e),n.push(t)):(e=s._addItem(t),i.push(e))};if(Array.isArray(t))for(var h=0,d=t.length;d>h;h++)a(t[h]);else{if(!(t instanceof Object))throw new Error("Unknown dataType");a(t)}return i.length&&this._trigger("add",{items:i},e),o.length&&this._trigger("update",{items:o,data:n},e),i.concat(o)},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,u,c,p=o&&o.type||this._options.type,f=o&&o.filter,m=[];if(void 0!=e)d=s._getItem(e,p),f&&!f(d)&&(d=null);else if(void 0!=i)for(u=0,c=i.length;c>u;u++)d=s._getItem(i[u],p),(!f||f(d))&&m.push(d);else for(l in this._data)this._data.hasOwnProperty(l)&&(d=s._getItem(l,p),(!f||f(d))&&m.push(d));if(o&&o.order&&void 0==e&&this._sort(m,o.order),o&&o.fields){var v=o.fields;if(void 0!=e)d=this._filterFields(d,v);else for(u=0,c=m.length;c>u;u++)m[u]=this._filterFields(m[u],v)}if("Object"==a){var g={};for(u=0;ue;e++)l[e]=s[e][this._fieldId]}else for(o in r)r.hasOwnProperty(o)&&(n=this._getItem(o,d),a(n)&&l.push(n[this._fieldId]));else if(h){s=[];for(o in r)r.hasOwnProperty(o)&&s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)l[e]=s[e][this._fieldId]}else for(o in r)r.hasOwnProperty(o)&&(n=r[o],l.push(n[this._fieldId]));return l},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n=e&&e.filter,s=e&&e.type||this._options.type,r=this._data;if(e&&e.order)for(var a=this.get(e),h=0,d=a.length;d>h;h++)i=a[h],o=i[this._fieldId],t(i,o);else for(o in r)r.hasOwnProperty(o)&&(i=this._getItem(o,s),(!n||n(i))&&t(i,o))},o.prototype.map=function(t,e){var i,o=e&&e.filter,n=e&&e.type||this._options.type,s=[],r=this._data;for(var a in r)r.hasOwnProperty(a)&&(i=this._getItem(a,n),(!o||o(i))&&s.push(t(i,a)));return e&&e.order&&this._sort(s,e.order),s},o.prototype._filterFields=function(t,e){if(!t)return t;var i={};if(Array.isArray(e))for(var o in t)t.hasOwnProperty(o)&&-1!=e.indexOf(o)&&(i[o]=t[o]);else for(var o in t)t.hasOwnProperty(o)&&e.hasOwnProperty(o)&&(i[e[o]]=t[o]);return i},o.prototype._sort=function(t,e){if(n.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t),null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(n.isNumber(t)||n.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e=this._data,i=null,o=null;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],r=s[t];null!=r&&(!i||r>o)&&(i=s,o=r)}return i},o.prototype.min=function(t){var e=this._data,i=null,o=null;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],r=s[t];null!=r&&(!i||o>r)&&(i=s,o=r)}return i},o.prototype.distinct=function(t){var e,i=this._data,o=[],s=this._options.type&&this._options.type[t]||null,r=0;for(var a in i)if(i.hasOwnProperty(a)){var h=i[a],d=h[t],l=!1;for(e=0;r>e;e++)if(o[e]==d){l=!0;break}l||void 0===d||(o[r]=d,r++)}if(s)for(e=0;ethis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o;if(this._data){this._data.off&&this._data.off("*",this.listener),e=[];for(var n in this._ids)this._ids.hasOwnProperty(n)&&e.push(n);this._ids={},this.length=0,this._trigger("remove",{items:e})}if(this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),i=0,o=e.length;o>i;i++)n=e[i],this._ids[n]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){for(var t,e=this._data.getIds({filter:this._options&&this._options.filter}),i={},o=[],n=[],s=0;so;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(u.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],c.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],c.push(s))}this.length+=l.length-c.length,l.length&&this._trigger("add",{items:l},i),u.length&&this._trigger("update",{items:u, -data:d},i),c.length&&this._trigger("remove",{items:c},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var n=function(t){return t};this.xValueLabel=n,this.yValueLabel=n,this.zValueLabel=n,this.filterLabel="time",this.legendLabel="value",this.style=o.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new c,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new l(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.create(),this.setOptions(i),e&&this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(12),a=i(8),h=i(10),d=i(1),l=i(13),u=i(14),c=i(15),p=i(16),f=i(17),m=i(18);r(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==o.STYLE.DOTCOLOR&&this.style!==o.STYLE.DOTSIZE&&this.style!==o.STYLE.BARCOLOR&&this.style!==o.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},o.prototype.getNumberOfRows=function(t){return t.length},o.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},o.prototype.getDistinctValues=function(t,e){for(var i=[],o=0;ot[o][e]&&(i.min=t[o][e]),i.maxt;t++){var f=(t-c)/(p-c),v=240*f,g=this._hsv2rgb(v,1,1);u.strokeStyle=g,u.beginPath(),u.moveTo(h,r+t),u.lineTo(a,r+t),u.stroke()}u.strokeStyle=this.axisColor,u.strokeRect(h,r,i,s)}if(this.style===o.STYLE.DOTSIZE&&(u.strokeStyle=this.axisColor,u.fillStyle=this.dataColor.fill,u.beginPath(),u.moveTo(h,r),u.lineTo(a,r),u.lineTo(a-i+e,d),u.lineTo(h,d),u.closePath(),u.fill(),u.stroke()),this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){var y=5,b=new m(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()0?this.yMin:this.yMax,n=this._convert3Dto2D(new l(_,r,this.zMin)),Math.cos(2*w)>0?(v.textAlign="center",v.textBaseline="top",n.y+=b):Math.sin(2*w)<0?(v.textAlign="right",v.textBaseline="middle"):(v.textAlign="left",v.textBaseline="middle"),v.fillStyle=this.axisColor,v.fillText(" "+this.xValueLabel(i.getCurrent())+" ",n.x,n.y),i.next()}for(v.lineWidth=1,o=void 0===this.defaultYStep,i=new m(this.yMin,this.yMax,this.yStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,n=this._convert3Dto2D(new l(s,i.getCurrent(),this.zMin)),Math.cos(2*w)<0?(v.textAlign="center",v.textBaseline="top",n.y+=b):Math.sin(2*w)>0?(v.textAlign="right",v.textBaseline="middle"):(v.textAlign="left",v.textBaseline="middle"),v.fillStyle=this.axisColor,v.fillText(" "+this.yValueLabel(i.getCurrent())+" ",n.x,n.y),i.next();for(v.lineWidth=1,o=void 0===this.defaultZStep,i=new m(this.zMin,this.zMax,this.zStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=Math.sin(w)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new l(s,r,i.getCurrent())),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(t.x,t.y),v.lineTo(t.x-b,t.y),v.stroke(),v.textAlign="right",v.textBaseline="middle",v.fillStyle=this.axisColor,v.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();v.lineWidth=1,t=this._convert3Dto2D(new l(s,r,this.zMin)),e=this._convert3Dto2D(new l(s,r,this.zMax)),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(t.x,t.y),v.lineTo(e.x,e.y),v.stroke(),v.lineWidth=1,c=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(c.x,c.y),v.lineTo(p.x,p.y),v.stroke(),c=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(c.x,c.y),v.lineTo(p.x,p.y),v.stroke(),v.lineWidth=1,t=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(t.x,t.y),v.lineTo(e.x,e.y),v.stroke(),t=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),v.strokeStyle=this.axisColor,v.beginPath(),v.moveTo(t.x,t.y),v.lineTo(e.x,e.y),v.stroke();var x=this.xLabel;x.length>0&&(u=.1/this.scale.y,s=(this.xMin+this.xMax)/2,r=Math.cos(w)>0?this.yMin-u:this.yMax+u,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*w)>0?(v.textAlign="center",v.textBaseline="top"):Math.sin(2*w)<0?(v.textAlign="right",v.textBaseline="middle"):(v.textAlign="left",v.textBaseline="middle"),v.fillStyle=this.axisColor,v.fillText(x,n.x,n.y));var k=this.yLabel;k.length>0&&(d=.1/this.scale.x,s=Math.sin(w)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*w)<0?(v.textAlign="center",v.textBaseline="top"):Math.sin(2*w)>0?(v.textAlign="right",v.textBaseline="middle"):(v.textAlign="left",v.textBaseline="middle"),v.fillStyle=this.axisColor,v.fillText(k,n.x,n.y));var O=this.zLabel;O.length>0&&(h=30,s=Math.cos(w)>0?this.xMin:this.xMax,r=Math.sin(w)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,n=this._convert3Dto2D(new l(s,r,a)),v.textAlign="right",v.textBaseline="middle",v.fillStyle=this.axisColor,v.fillText(O,n.x-h,n.y))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._redrawDataGrid=function(){var t,e,i,n,s,r,a,h,d,u,c,p,f=this.frame.canvas,m=f.getContext("2d");if(m.lineJoin="round",m.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else r=!0;r?(p=(t.point.z+e.point.z+i.point.z+n.point.z)/4,d=240*(1-(p-this.zMin)*this.scale.z/this.verticalRatio),u=1,this.showShadow?(c=Math.min(1+x.x/k/2,1),a=this._hsv2rgb(d,u,c),h=a):(c=1,a=this._hsv2rgb(d,u,c),h=this.axisColor)):(a="gray",h=this.axisColor),m.lineWidth=this._getStrokeWidth(t),m.fillStyle=a,m.strokeStyle=h,m.beginPath(),m.moveTo(t.screen.x,t.screen.y),m.lineTo(e.screen.x,e.screen.y),m.lineTo(n.screen.x,n.screen.y),m.lineTo(i.screen.x,i.screen.y),m.closePath(),m.fill(),m.stroke()}}else for(s=0;sc&&(c=0);var p,f,m;this.style===o.STYLE.DOTCOLOR?(p=240*(1-(d.point.value-this.valueMin)*this.scale.value),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)):this.style===o.STYLE.DOTSIZE?(f=this.dataColor.fill,m=this.dataColor.stroke):(p=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)),i.lineWidth=this._getStrokeWidth(d),i.strokeStyle=m,i.fillStyle=f,i.beginPath(),i.arc(d.screen.x,d.screen.y,c,0,2*Math.PI,!0),i.fill(),i.stroke()}}},o.prototype._redrawDataBar=function(){var t,e,i,n,s=this.frame.canvas,r=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],o.lineWidth=this._getStrokeWidth(t),o.lineJoin="round",o.lineCap="round",o.strokeStyle=this.dataColor.stroke,o.beginPath(),o.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var c=d[l],p=c.corners,f=[p[0].screen,p[1].screen,p[2].screen],m=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,m))return s}}else for(i=0;ib)&&n>b&&(a=b,r=s)}}return r},o.prototype._showTooltip=function(t){var e,i,o;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,o=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",o=document.createElement("div"),o.style.position="absolute",o.style.height="0",o.style.width="0",o.style.border="5px solid #4d4d4d",o.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:o}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
x:"+t.point.x+"
y:"+t.point.y+"
z:"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=o},function(t,e){function i(t){return t?o(t):void 0}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;no;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var o=new i;return o.x=t.x-e.x,o.y=t.y-e.y,o.z=t.z-e.z,o},i.add=function(t,e){var o=new i;return o.x=t.x+e.x,o.y=t.y+e.y,o.z=t.z+e.z,o},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var o=new i;return o.x=t.y*e.z-t.z*e.y,o.y=t.z*e.x-t.x*e.z,o.z=t.x*e.y-t.y*e.x,o},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function o(){this.armLocation=new n,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new n,this.cameraRotation=new n(.5*Math.PI,0,0),this.calculateCameraOrientation()}var n=i(13);o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),(void 0!==t||void 0!==e)&&this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(10);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){return void 0===this.index?void 0:this.values[this.index]},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(to&&(o=0),o>this.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.setRange=function(t,e,i,o){this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){function o(t,e,i,d){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof r||i instanceof a)&&i instanceof Object){var c=d;d=i,i=c}var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,throttleRedraw:0,orientation:{axis:"bottom",item:"bottom"},moment:n,width:null,height:null,maxHeight:null,minHeight:null},this.options=s.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return f.timeAxis.step.scale},getStep:function(){return f.timeAxis.step.step},toScreen:f._toScreen.bind(f),toGlobalScreen:f._toGlobalScreen.bind(f),toTime:f._toTime.bind(f),toGlobalTime:f._toGlobalTime.bind(f)}},this.range=new h(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new l(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new u(this.body),this.components.push(this.currentTime),this.itemSet=new p(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){f.emit("click",f.getEventProperties(t))}),this.on("doubletap",function(t){f.emit("doubleClick",f.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){f.emit("contextmenu",f.getEventProperties(t))},d&&this.setOptions(d),i&&this.setGroups(i),e?this.setItems(e):this._redraw()}var n=(i(12),i(20),i(2)),s=i(1),r=i(8),a=i(10),h=i(24),d=i(28),l=i(39),u=i(44),c=i(42),p=i(29),f=i(45),m=i(47)["default"],v=i(47).printStyle,g=i(48).allOptions,y=i(48).configureOptions;o.prototype=new d,o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){var e=m.validate(t,g);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",v),d.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var i=this.itemsData;if(i){var o=this.getSelection();this.setItems(null),this.setItems(i),this.setSelection(o)}}},o.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof r||t instanceof a?t:new r(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){if(void 0==this.options.start||void 0==this.options.end)var o=this.getItemRange();var n=void 0!=this.options.start?this.options.start:o.min,s=void 0!=this.options.end?this.options.end:o.max;this.setWindow(n,s,{animation:!1})}else this.fit({animation:!1})},o.prototype.setGroups=function(t){var e;e=t?t instanceof r||t instanceof a?t:new r(t):null,this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||n>e)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},o.prototype.fit=function(t){var e=t&&void 0!==t.animation?t.animation:!0,i=this.getItemRange();this.range.setRange(i.min,i.max,e)},o.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=e.min,o=e.max,n=null,r=null;if(null!=i&&null!=o){var a,h,d,l,u;!function(){var e=function(t){return s.convert(t.data.start,"Date").valueOf()},c=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return s.convert(e,"Date").valueOf()};a=o-i,0>=a&&(a=10),h=a/t.props.center.width,s.forEach(t.itemSet.items,function(t){t.show();var s=e(t),a=c(t),d=new Date(s-(t.getWidthLeft()+10)*h),l=new Date(a+(t.getWidthRight()+10)*h);i>d&&(i=d,n=t),l>o&&(o=l,r=t)}.bind(t)),n&&r&&(d=n.getWidthLeft()+10,l=r.getWidthRight()+10,u=t.props.center.width-d-l,u>0&&(i=e(n)-d*a/u,o=c(r)+l*a/u))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=s.convert(i.start,"Date").valueOf(),n=s.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=o)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=c.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),p=this._toTime(o),f=d?d(p,l,u):p,m=s.getTarget(t),v=null;return null!=r?v="item":null!=h?v="custom-time":s.hasParent(m,this.timeAxis.dom.foreground)?v="axis":this.timeAxis2&&s.hasParent(m,this.timeAxis2.dom.foreground)?v="axis":s.hasParent(m,this.itemSet.dom.labelSet)?v="group-label":s.hasParent(m,this.currentTime.bar)?v="current-time":s.hasParent(m,this.dom.center)&&(v="background"),{event:t,item:r?r.id:null,group:a?a.groupId:null,what:v,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:p,snappedTime:f}},t.exports=o},function(t,e,i){if("undefined"!=typeof window){var o=i(21),n=window.Hammer||i(22);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0},e.firstTarget=t;for(var o=t;o&&!i;){var n=o.hammer&&o.hammer._handlers[e.type];if(n)for(var s=0;s0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(f(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o-1}function _(t){return t.trim().split(/\s+/g)}function x(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function M(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=z(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=L(o);e.timeStamp=gt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=R(a,h),I(i,e),e.offsetDirection=B(e.deltaX,e.deltaY),e.scale=r?H(r.pointers,o):1,e.rotation=r?j(r.pointers,o):0,N(i,e);var d=t.element;b(e.srcEvent.target,d)&&(d=e.srcEvent.target),e.target=d}function I(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};(e.eventType===Tt||s.eventType===St)&&(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function N(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Pt&&(h>Ct||r.velocity===a)){var d=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,u=A(h,d,l);o=u.x,n=u.y,i=vt(u.x)>vt(u.y)?u.x:u.y,s=B(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function z(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:mt(i/e),y:mt(o/e)}}function A(t,e,i){return{x:e/t||0,y:i/t||0}}function B(t,e){return t===e?It:vt(t)>=vt(e)?t>0?Nt:zt:e>0?Lt:At}function R(t,e,i){i||(i=jt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=jt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function j(t,e){return F(e[1],e[0],Ht)-F(t[1],t[0],Ht)}function H(t,e){return R(e[0],e[1],Ht)/R(t[0],t[1],Ht)}function W(){this.evEl=Yt,this.evWin=Gt,this.allow=!0,this.pressed=!1,T.apply(this,arguments)}function Y(){this.evEl=qt,this.evWin=Xt,T.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function G(){this.evTarget=Kt,this.evWin=Jt,this.started=!1,T.apply(this,arguments)}function U(t,e){var i=k(t.touches),o=k(t.changedTouches);return e&(St|Pt)&&(i=O(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=$t,this.targetIds={},T.apply(this,arguments)}function q(t,e){var i=k(t.touches),o=this.targetIds;if(e&(Tt|Et)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=k(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return b(t.target,h)}),e===Tt)for(n=0;na&&(e.push(t),a=e.length-1):n&(St|Pt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Zt={touchstart:Tt,touchmove:Et,touchend:St,touchcancel:Pt},Kt="touchstart",Jt="touchstart touchmove touchend touchcancel";p(G,T,{handler:function(t){var e=Zt[t.type];if(e===Tt&&(this.started=!0),this.started){var i=U.call(this,t,e);e&(St|Pt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:kt,srcEvent:t})}}});var Qt={touchstart:Tt,touchmove:Et,touchend:St,touchcancel:Pt},$t="touchstart touchmove touchend touchcancel";p(V,T,{handler:function(t){var e=Qt[t.type],i=q.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:kt,srcEvent:t})}}),p(X,T,{handler:function(t,e,i){ -var o=i.pointerType==kt,n=i.pointerType==Mt;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(St|Pt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var te=M(pt.style,"touchAction"),ee=te!==a,ie="compute",oe="auto",ne="manipulation",se="none",re="pan-x",ae="pan-y";Z.prototype={set:function(t){t==ie&&(t=this.compute()),ee&&(this.manager.element.style[te]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){m(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),K(t.join(" "))},preventDefaults:function(t){if(!ee){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=w(o,se),s=w(o,ae),r=w(o,re);return n||s&&i&Bt||r&&i&Rt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var he=1,de=2,le=4,ue=8,ce=ue,pe=16,fe=32;J.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=tt(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=tt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=tt(t,this),-1===x(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=tt(t,this);var e=x(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(i.options.event+(e?Q(o):""),t)}var i=this,o=this.state;ue>o&&e(!0),e(),o>=ue&&e(!0)},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=fe)},canEmit:function(){for(var t=0;ts?Nt:zt,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?It:0>r?Lt:At,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return et.prototype.attrTest.call(this,t)&&(this.state&de||!(this.state&de)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=$(t.direction);e&&this.manager.emit(this.options.event+e,t),this._super.emit.call(this,t)}}),p(ot,et,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&de)},emit:function(t){if(this._super.emit.call(this,t),1!==t.scale){var e=t.scale<1?"in":"out";this.manager.emit(this.options.event+e,t)}}}),p(nt,J,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(St|Pt)&&!n)this.reset();else if(t.eventType&Tt)this.reset(),this._timer=h(function(){this.state=ce,this.tryEmit()},e.time,this);else if(t.eventType&St)return ce;return fe},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ce&&(t&&t.eventType&St?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),p(st,et,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&de)}}),p(rt,et,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Bt|Rt,pointers:1},getTouchAction:function(){return it.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Bt|Rt)?e=t.velocity:i&Bt?e=t.velocityX:i&Rt&&(e=t.velocityY),this._super.attrTest.call(this,t)&&i&t.direction&&t.distance>this.options.threshold&&vt(e)>this.options.velocity&&t.eventType&St},emit:function(t){var e=$(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),p(at,J,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ne]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanceu,c=r||null===n?n:h+(n-h)*i,v=r||null===s?s:l+(s-l)*i;g=a._applyRange(c,v),d.updateHiddenDates(a.options.moment,a.body,a.options.hiddenDates),m=m||g,g&&a.body.emitter.emit("rangechange",{start:new Date(a.start),end:new Date(a.end),byUser:o}),r?m&&a.body.emitter.emit("rangechanged",{start:new Date(a.start),end:new Date(a.end),byUser:o}):a.animationTimer=setTimeout(b,20)}};return v()}var g=this._applyRange(n,s);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),g){var y={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",y),this.body.emitter.emit("rangechanged",y)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==a&&a>o&&(i=a-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&a>o&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height,a=-i/r*o,h=this.props.touch.start+a,l=this.props.touch.end+a,u=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),c=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(u!=h||c!=l)return this.deltaDifference+=i,this.props.touch.start=u,this.props.touch.end=c,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l),this.body.emitter.emit("rangechange",{start:new Date(this.start),end:new Date(this.end),byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=s({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=s(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.options.moment,this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),r=o-n,a=i-n+(this.props.touch.start-(i-n))*e,h=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=0>=1-e,this.endToFront=0>=e-1;var l=d.snapAwayFromHidden(this.body.hiddenDates,a,1-e,!0),u=d.snapAwayFromHidden(this.body.hiddenDates,h,e-1,!0);(l!=a||u!=h)&&(this.props.touch.start=l,this.props.touch.end=u,this.scaleOffset=1-t.scale,a=l,h=u),this.setRange(a,h,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX,i=e-r.getAbsoluteLeft(this.body.dom.centerContainer),o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=i>0?!1:!0,this.endToFront=-i>0?!1:!0;var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);(h!=r||l!=a)&&(r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e,i){i(20);e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&!o&&(e(t),o=!0,setTimeout(function(){o=!1},0))},t.on("hammer.input",e.inputHandler)};var o=!1;e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&!n&&(e(t),n=!0,setTimeout(function(){n=!1},0))},t.on("hammer.input",e.inputHandler)};var n=!1;e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch},function(t,e){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,e,i){if(e.hiddenDates=[],i&&1==Array.isArray(i)){for(var o=0;o=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var v=e.isHidden(i.range.start,i.hiddenDates),g=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==v.hidden&&(y=1==i.range.startToFront?v.startDate-1:v.endDate+1),1==g.hidden&&(b=1==i.range.endToFront?g.startDate-1:g.endDate+1),(1==v.hidden||1==g.hidden)&&i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n=i(12),s=i(20),r=i(25),a=i(1),h=(i(8),i(10),i(24),i(29),i(39)),d=i(40),l=i(27),u=i(42);n(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t)}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new s(this.dom.root),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:30}),this.listeners={};var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(o.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),r.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),r.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","throttleRedraw"];if(a.selectiveExtend(e,this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"==typeof t.orientation&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new h(this.body);i.setOptions=function(t){var e=t?a.extend({},t):{};e.orientation="top",h.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&l.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new d(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var n=a.deepExtend({},this.options);this.components.forEach(function(t){a.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._origRedraw||(this._origRedraw=this._redraw.bind(this)),this._redraw=a.throttle(this._origRedraw,this.options.throttleRedraw),this._redraw()},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?a.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,a.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){ -var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=a.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){var t=!1,e=this.options,i=this.props,o=this.dom;if(o){l.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(a.addClassName(o.root,"vis-top"),a.removeClassName(o.root,"vis-bottom")):(a.removeClassName(o.root,"vis-top"),a.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=a.option.asSize(e.maxHeight,""),o.root.style.minHeight=a.option.asSize(e.minHeight,""),o.root.style.width=a.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var r=Math.max(i.left.height,i.center.height,i.right.height),h=i.top.height+r+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=a.option.asSize(e.height,h+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var d=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=d,i.leftContainer.height=d,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var c=this.props.scrollTop;"top"!=e.orientation.item&&(c+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=c+"px",o.left.style.left="0",o.left.style.top=c+"px",o.right.style.left="0",o.right.style.top=c+"px";var p=0==this.props.scrollTop?"hidden":"",f=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";if(o.shadowTop.style.visibility=p,o.shadowBottom.style.visibility=f,o.shadowTopLeft.style.visibility=p,o.shadowBottomLeft.style.visibility=f,o.shadowTopRight.style.visibility=p,o.shadowBottomRight.style.visibility=f,this.components.forEach(function(e){t=e.redraw()||t}),t){var m=3;this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange(),e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end),o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=s.option.asSize,o=this.options,n=o.orientation.item,r=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",r=this._orderGroups()||r;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0),this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,u=this._firstGroup(),c={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,m=t.axis+t.item.vertical;return this.groups[g].redraw(e,p,l),s.forEach(this.groups,function(t){var i=t==u?c:p,o=t.redraw(e,i,l);r=o||r,f+=t.height}),f=Math.max(f,m),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.dom.axis.style.left="0",r=this._isResized()||r},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[v];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[v];this.groups[g];if(this.groupsData){if(i){i.hide(),delete this.groups[v];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new l(s,r,this),this.groups[v]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(s.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;s.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(s.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;s.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?g:this.groupsData?t.group:v},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("change",{queue:!0}))},o.prototype._order=function(){s.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==v||t==g)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);s.extend(n,{height:null}),o=new l(t,i,e),e.groups[t]=o;for(var r in e.items)if(e.items.hasOwnProperty(r)){var a=e.items[r];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!s.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+r)return}else{var a=e.height;if(n+a-r>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var u=this.groupsData.getIds({order:this.options.groupOrder});if(!s.equalArray(u,this.groupTouchParams.originalOrder))for(var h=this.groupsData,c=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(c.length,u.length),m=0,v=0,g=0;f>m;){for(;f>m+v&&f>m+g&&u[m+v]==c[m+g];)m++;if(m+v>=f)break;if(u[m+v]!=p)if(c[m+g]!=p){var y=u.indexOf(c[m+g]),b=h.get(u[m+v]),w=h.get(c[m+g]);this.options.groupOrderSwap(b,w,h),h.update(b),h.update(w);var _=u[m+v];u[m+v]=c[m+g],u[y]=_,m++}else g=1;else v=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=s.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!s.equalArray(n,e.groupTouchParams.originalOrder))for(var r=e.groupTouchParams.originalOrder,a=Math.min(r.length,n.length),h=0;a>h;){for(;a>h&&n[h]==r[h];)h++;if(h>=a)break;var d=n.indexOf(r[h]),l=o.get(n[h]),u=o.get(r[h]);e.options.groupOrderSwap(l,u,o),groupsData.update(l),groupsData.update(u);var c=n[h];n[h]=r[h],n[d]=c,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(t.stopPropagation(),o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{var r=s.getAbsoluteLeft(this.dom.frame),a=t.center.x-r,h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var c=this.body.util.toTime(a+this.props.width/5);u.end=i?i(c,d,l):c}u[this.itemsData._fieldId]=s.randomUUID();var p=this.groupFromTarget(t);p&&(u.group=p.groupId),this.options.onAdd(u,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){i.push(e.id);var s=o._getItemRange(this.itemsData.get(i,this.itemOptions));i=[];for(var r in this.items)if(this.items.hasOwnProperty(r)){var a=this.items[r],h=a.data.start,d=void 0!==a.data.end?a.data.end:h;h>=s.min&&d<=s.max&&!(a instanceof m)&&i.push(a.id)}}else{var l=i.indexOf(e.id);-1==l?i.push(e.id):i.splice(l,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),u=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+u+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var c=a.year();return"vis-year"+c+n(a)+t(c);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(32);i(33);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),u=this.dom.foreground;this.top=u.offsetTop,this.left=u.offsetLeft,this.width=u.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var c=0,p=this.visibleItems.length;p>c;c++){var f=this.visibleItems[c];f.repositionY(e)}return o},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;this.resetSubgroups();var o=this;if(i.length>0){var s=i[0].top,r=i[0].top+i[0].height;if(n.forEach(i,function(t){s=Math.min(s,t.top),r=Math.max(r,t.top+t.height),void 0!==t.data.subgroup&&(o.subgroups[t.data.subgroup].height=Math.max(o.subgroups[t.data.subgroup].height,t.height),o.subgroups[t.data.subgroup].visible=!0)}),s>t.axis){var a=s-t.axis;r-=a,n.forEach(i,function(t){t.top-=a})}e=r+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){var r=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(var a=null,h=0,d=t.length;d>h;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){var o,n,s;for(o=0,n=t.length;n>o;o++)if(void 0!==t[o].data.subgroup){s=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].indexe.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(20),i(34));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);(void 0===t||t===!0)&&(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.dom.content.style.left="0";break;case"right":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(20),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(34);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,format:r.FORMAT,moment:h,timeAxis:null},this.options=n.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n=i(1),s=i(26),r=i(30),a=i(27),h=i(2);o.prototype=new s,o.prototype.setOptions=function(t){t&&(n.selectiveExtend(["showMinorLabels","showMajorLabels","hiddenDates","timeAxis","moment"],this.options,t),n.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof h.locale?h.locale(t.locale):h.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"), -this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=n.convert(this.body.range.start,"Number"),i=n.convert(this.body.range.end,"Number"),o=this.body.util.toTime(7*(this.props.minorCharWidth||10)).valueOf(),s=o-a.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);s-=this.body.util.toTime(0).valueOf();var h=new r(new Date(e),new Date(i),s,this.body.hiddenDates);h.setMoment(this.options.moment),this.options.format&&h.setFormat(this.options.format),this.options.timeAxis&&h.setScale(this.options.timeAxis),this.step=h;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var l,u,c,p,f,m,v,g,y,b=void 0,w=0;for(h.start(),u=h.getCurrent(),p=this.body.util.toScreen(u);h.hasNext()&&1e3>w;){w++,f=h.isMajor(),y=h.getClassName(),g=h.getLabelMinor(),l=u,c=p,h.next(),u=h.getCurrent(),p=this.body.util.toScreen(u),m=p-c;var _=(g.length+1)*this.props.minorCharWidth0&&(void 0==b&&(b=c),this._repaintMajorText(c,h.getLabelMajor(),t,y)),v=this._repaintMajorLine(c,m,t,y)):_?v=this._repaintMinorLine(c,m,t,y):v&&(v.style.width=parseInt(v.style.width)+m+"px")}if(this.options.showMajorLabels){var x=this.body.util.toTime(0),k=h.getLabelMajor(x),O=k.length*(this.props.majorCharWidth||10)+10;(void 0==b||b>O)&&this._repaintMajorText(0,k,t,y)}n.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",n.style.left=t-s.minorLineWidth/2+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-minor "+o,n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",n.style.left=t-s.majorLineWidth/2+"px",n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-major "+o,n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth},t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(41),r=i(12),a=i(20),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;122>=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;no&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push(),this.colorPicker.insertTo(this.container)}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),s=1;o>s;s++)n[s-1]=e[s];return n.forEach(function(t){r.appendChild(t)}),i.domElements.push(r),{v:i.domElements.length}}();if("object"==typeof r)return r.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*u?(a.min=Math.ceil(e*u),l=a.min,d="range increased"):n>e/u&&(a.min=Math.ceil(e/u),l=a.min,d="range increased"),e*u>s&&1!==s&&(a.max=Math.ceil(e*u),l=a.max,d="range increased"),a.value=e}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var p=this;a.onchange=function(){c.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var f=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,f,a,c);""!==d&&this.popupHistory[m]!==l&&(this.popupHistory[m]=l,this._setupPopup(d,m))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var f=l/this.r,m=a.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=p,m.s=f;var v=a.HSVToRGB(m.h,m.s,m.v);v.a=this.color.a,this.color=v,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),h):n.distance<=d?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),h):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),h),r=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],r=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&n===!0){var p=t.findInOptions(e,i[u],s.copyAndExtendArray(o,u));r>p.distance&&(a=p.closestMatch,h=p.path,r=p.distance,l=p.indexMatch)}else-1!==u.toLowerCase().indexOf(d)&&(l=u),c=t.levenshteinDistance(e,u),r>c&&(a=u,h=s.copyArray(o),r=c)}return{closestMatch:a,path:h,distance:r,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var s=0;sr?r:t,e=null==e?r:r>e?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(o),a=c.customTimeFromTarget(t),h=s.getTarget(t),d=null;s.hasParent(h,this.timeAxis.dom.foreground)?d="axis":this.timeAxis2&&s.hasParent(h,this.timeAxis2.dom.foreground)?d="axis":s.hasParent(h,this.linegraph.yAxisLeft.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.yAxisRight.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.legendLeft.dom.frame)?d="legend":s.hasParent(h,this.linegraph.legendRight.dom.frame)?d="legend":null!=a?d="custom-time":s.hasParent(h,this.currentTime.bar)?d="current-time":s.hasParent(h,this.dom.center)&&(d="background");var l=[],u=this.linegraph.yAxisLeft,p=this.linegraph.yAxisRight;return u.hidden||l.push(u.screenToValue(n)),p.hidden||l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},t.exports=o},function(t,e,i){function o(t,e){this.id=n.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,icons:!1,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(t){return t},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return t},title:{text:void 0,style:void 0}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},groups:{visibility:{}}},this.options=n.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.COUNTER=0,this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=n.option.asSize(-i.props.width),i.redraw.call(i,!0)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.body.emitter.emit("change")}var n=i(1),s=i(7),r=i(8),a=i(10),h=i(26),d=i(51),l=i(53),u=i(57),c=i(56),p=(i(54),"__ungrouped__");o.prototype=new h,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height&&void 0!==this.body.domProps.centerContainer.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))0){var d=this.body.util.toGlobalTime(-this.body.domProps.root.width),l=this.body.util.toGlobalTime(2*this.body.domProps.root.width),u={};for(this._getRelevantData(a,u,d,l),this._applySampling(a,u),e=0;ep&&console.log("WARNING: there may be an infinite loop in the _updateGraph emitter cycle."),this.COUNTER=0,this.abortedGraphUpdate=!1,e=0;e0)for(r=0;ro){d.push(h);break}d.push(h)}}else for(a=0;ai&&h.x0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=[],l=0;r>l;l+=s)d.push(n[l]);e[t[o]]=d}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getData(o)):h=h.concat(n.getData(o)):i[t[s]]=n.getYRange(o,t[s])); -c.getStackedYRange(a,i,t,"__barStackLeft","left"),c.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,this.yAxisRight.stepPixels=this.yAxisLeft.stepPixels,this.yAxisRight.zeroCrossing=this.yAxisLeft.zeroCrossing,this.yAxisRight.amountOfSteps=this.yAxisLeft.amountOfSteps,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],u=0;ut?-1:1});for(var a=0;a0&&(t=0),this.range.start=t,this.range.end=e},o.prototype.redraw=function(){var t=!1,e=0;this.dom.lineContainer.style.top=this.body.domProps.scrollTop+"px";for(var i in this.groups)this.groups.hasOwnProperty(i)&&(this.groups[i].visible!==!0||void 0!==this.linegraphOptions.visibility[i]&&this.linegraphOptions.visibility[i]!==!0||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height=this.height+"px",this.width=this.options.visible===!0?Number((""+this.options.width).replace("px","")):0;var o=this.props,n=this.dom.frame;n.className="vis-data-axis",this._calculateCharSize();var s=this.options.orientation,r=this.options.showMinorLabels,a=this.options.showMajorLabels;o.minorLabelHeight=r?o.minorCharHeight:0,o.majorLabelHeight=a?o.majorCharHeight:0,o.minorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.minorLinesOffset,o.minorLineHeight=1,o.majorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.majorLinesOffset,o.majorLineHeight=1,"left"===s?(n.style.top="0",n.style.left="0",n.style.bottom="",n.style.width=this.width+"px",n.style.height=this.height+"px",this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top="",n.style.bottom="0",n.style.left="0",n.style.width=this.width+"px",n.style.height=this.height+"px",this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(s)}return t},o.prototype._redrawLabels=function(){var t=!1;s.prepareElements(this.DOMelements.lines),s.prepareElements(this.DOMelements.labels);var e,i=this.options.orientation;if(this.master===!1){var o,n,r,h;-1!==this.zeroCrossing&&this.options.alignZeros===!0?this.range.end>0?(o=this.range.end/this.zeroCrossing,n=this.range.end-this.amountOfSteps*o,r=this.range.end):(o=-1*this.range.start/(this.amountOfSteps-this.zeroCrossing),n=this.range.start,r=this.range.start+o*this.amountOfSteps):(n=this.range.start,r=this.range.end),h=this.stepPixels}else h=this.props.majorCharHeight,n=this.range.start,r=this.range.end;if(this.step=e=new a(n,r,h,this.dom.frame.offsetHeight,this.options[this.options.orientation].range,this.options[this.options.orientation].format,this.master===!1&&this.options.alignZeros),this.master===!0)this.stepPixels=this.dom.frame.offsetHeight/e.marginRange*e.step,this.amountOfSteps=Math.ceil(this.dom.frame.offsetHeight/this.stepPixels);else if(this.options.alignZeros===!0&&-1!==this.zeroCrossing){var d=(e.current-this.zeroCrossing*e.step)/e.step;this.step.shift(d)}this.valueAtBottom=e.marginEnd,this.maxLabelSize=0;for(var l=0,u=0,c=!1;u0&&u!==this.amountOfSteps&&((this.options.showMinorLabels&&c===!1||this.master===!1&&this.options.showMinorLabels===!0)&&this._redrawLabel(l-2,e.getCurrent(),i,"vis-y-axis vis-minor",this.props.minorCharHeight),c&&this.options.showMajorLabels&&this.master===!0||this.options.showMinorLabels===!1&&this.master===!1&&c===!0?(l>=0&&this._redrawLabel(l-2,e.getCurrent(),i,"vis-y-axis vis-major",this.props.majorCharHeight),this._redrawLine(l,i,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth)):this._redrawLine(l,i,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth)),this.master===!0&&0===e.current&&(this.zeroCrossing=u),e.next(),u+=1;this.master===!0&&0===e.current&&(this.zeroCrossing=u),this.conversionFactor=this.stepPixels/e.step;var p=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(p=this.props.titleCharHeight);var f=this.options.icons===!0?Math.max(this.options.iconWidth,p)+this.options.labelOffsetX+15:p+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-f&&this.options.visible===!0?(this.width=this.maxLabelSize+f,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+f),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),t=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),t=!1),t},o.prototype.convertValue=function(t){var e=this.valueAtBottom-t,i=e*this.conversionFactor;return i},o.prototype.screenToValue=function(t){return this.valueAtBottom-t/this.conversionFactor},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSizes&&(h=s);for(var d=!1,l=h;Math.abs(l)<=Math.abs(s);l++){a=Math.pow(10,l);for(var u=0;u=n){d=!0,r=u;break}}if(d===!0)break}this.stepIndex=r,this.scale=a,this.step=a*this.minorSteps[r]},i.prototype.setFirst=function(t){void 0===t&&(t={});var e=void 0===t.min?this._start-2*this.scale*this.minorSteps[this.stepIndex]:t.min,i=void 0===t.max?this._end+this.scale*this.minorSteps[this.stepIndex]:t.max;this.marginEnd=void 0===t.max?this.roundToMinor(i):t.max,this.marginStart=void 0===t.min?this.roundToMinor(e):t.min,this.alignZeros===!0&&(this.marginEnd-this.marginStart)%this.step!=0&&(this.marginEnd+=this.marginEnd%this.step),this.deadSpace=this.roundToMinor(i)-i+this.roundToMinor(e)-e,this.marginRange=this.marginEnd-this.marginStart,this.current=this.marginEnd},i.prototype.roundToMinor=function(t){var e=t-t%(this.scale*this.minorSteps[this.stepIndex]);return t%(this.scale*this.minorSteps[this.stepIndex])>.5*(this.scale*this.minorSteps[this.stepIndex])?e+this.scale*this.minorSteps[this.stepIndex]:e},i.prototype.hasNext=function(){return this.current>=this.marginStart},i.prototype.next=function(){var t=this.current;this.current-=this.step,this.current===t&&(this.current=this._end)},i.prototype.previous=function(){this.current+=this.step,this.marginEnd+=this.step,this.marginRange=this.marginEnd-this.marginStart},i.prototype.getCurrent=function(){var t=Math.abs(this.current)t)for(var e=0;-t>e;e++)this.previous();else if(t>0)for(var e=0;t>e;e++)this.next()},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var s=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation"];this.options=n.selectiveBridgeObject(s,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n=i(1),s=i(7),r=i(54),a=i(56),h=i(55);o.prototype.setItems=function(t){if(null!=t){this.itemsData=t,1==this.options.sort&&this.itemsData.sort(function(t,e){return t.x-e.x});for(var e=0;et[o].y?t[o].y:e,i=i0){t.sort(function(t,e){return t.x===e.x?t.groupIde[s].y?e[s].y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0&&(i=Math.min(i,Math.abs(e[o-1].x-e[o].x))),0===i&&(void 0===t[e[o].x]&&(t[e[o].x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].x].amount+=1)},o.prototype.draw=function(t,e,i){if(null!=t&&t.length>0){var r,a,h=Number(i.svg.style.height.replace("px",""));if(r=n.getSVGElement("path",i.svgElements,i.svg),r.setAttributeNS(null,"class",e.className),void 0!==e.style&&r.setAttributeNS(null,"style",e.style),a=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t),1==e.options.shaded.enabled){var d,l=n.getSVGElement("path",i.svgElements,i.svg);d="top"==e.options.shaded.orientation?"M"+t[0].x+",0 "+a+"L"+t[t.length-1].x+",0":"M"+t[0].x+","+h+" "+a+"L"+t[t.length-1].x+","+h,l.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&l.setAttributeNS(null,"style",e.options.shaded.style),l.setAttributeNS(null,"d",d)}r.setAttributeNS(null,"d","M"+a),1==e.options.drawPoints.enabled&&s.draw(t,e,i)}},o._catmullRomUniform=function(t){for(var e,i,o,n,s,r,a=Math.round(t[0].x)+","+Math.round(t[0].y)+" ",h=1/6,d=t.length,l=0;d-1>l;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={x:(-e.x+6*i.x+o.x)*h,y:(-e.y+6*i.y+o.y)*h},r={x:(i.x+6*o.x-n.x)*h,y:(i.y+6*o.y-n.y)*h},a+="C"+s.x+","+s.y+" "+r.x+","+r.y+" "+o.x+","+o.y+" ";return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);for(var o,n,s,r,a,h,d,l,u,c,p,f,m,v,g,y,b,w,_,x=Math.round(t[0].x)+","+Math.round(t[0].y)+" ",k=t.length,O=0;k-1>O;O++)o=0==O?t[0]:t[O-1],n=t[O],s=t[O+1],r=k>O+2?t[O+2]:s,d=Math.sqrt(Math.pow(o.x-n.x,2)+Math.pow(o.y-n.y,2)),l=Math.sqrt(Math.pow(n.x-s.x,2)+Math.pow(n.y-s.y,2)),u=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),v=Math.pow(u,i),y=Math.pow(u,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),_=Math.pow(d,i),w=Math.pow(d,2*i),c=2*w+3*_*g+b,p=2*y+3*v*g+b,f=3*_*(_+g),f>0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={x:(-b*o.x+c*n.x+w*s.x)*f,y:(-b*o.y+c*n.y+w*s.y)*f},h={x:(y*n.x+p*s.x-b*r.x)*m,y:(y*n.y+p*s.y-b*r.y)*m},0==a.x&&0==a.y&&(a=n),0==h.x&&0==h.y&&(h=s),x+="C"+a.x+","+a.y+" "+h.x+","+h.y+" "+s.x+","+s.y+" ";return x},o._linear=function(t){for(var e="",i=0;it[o].y?t[o].y:e,i=it[o].y?t[o].y:e,i=i0&&(r=Math.min(r,Math.abs(c[l-1].x-a))),h=o._getSafeDrawData(r,d,m);else{var g=l+(p[a].amount-p[a].resolved),y=l-(p[a].resolved+1);g0&&(r=Math.min(r,Math.abs(c[y].x-a))),h=o._getSafeDrawData(r,d,m),p[a].resolved+=1,d.options.stack===!0?c[l].y0&&(i=Math.min(i,Math.abs(e[o-1].x-e[o].x))),0===i&&(void 0===t[e[o].x]&&(t[e[o].x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},o.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.x===e.x?t.groupIde[s].y?e[s].y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=nt?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.prepareElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var i=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[i],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=["color","font","fixed","shadow"];if(B.selectiveNotDeepExtend(o,t,e,i),B.mergeOptions(t,e,"shadow"),void 0!==e.color&&null!==e.color){var n=B.parseColor(e.color);B.fillIfDefined(t.color,n)}else i===!0&&null===e.color&&(t.color=void 0,delete t.color);void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),void 0!==e.font&&a["default"].parseOptions(t.font,e),void 0!==e.scaling&&B.mergeOptions(t.scaling,e.scaling,"label")}}]),t}();e["default"]=R,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),u=l[0],c=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=u,t.textAlign="center",this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=c,t.lineJoin="round");for(var m=0;m0&&t.strokeText(this.lines[m],i,h),t.fillText(this.lines[m],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if("horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=r.overrideOpacity(e,o),i=r.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;n>s;s++){var r=t.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"==typeof e.font&&r.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth;t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.lineWidth=o?a:r,t.lineWidth*=this.networkScaleInv,t.lineWidth=Math.min(this.width,t.lineWidth),t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t),t.restore()}},{key:"_drawImageAtPosition",value:function(t){0!=this.imageObj.width&&(t.globalAlpha=1,this.enableShadow(t),t.drawImage(this.imageObj,this.left,this.top,this.width,this.height),this.disableShadow(t))}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),this._distanceToBorder(e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.width/2,o=this.height/2,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ii.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return e>h}return!1}},{key:"_rotateForLabelAlignment",value:function(t){var e=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(e,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=["id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","selectionWidth","selfReferenceSize","to","title","value","width"];if(v.selectiveDeepExtend(o,t,e,i),v.mergeOptions(t,e,"smooth"),v.mergeOptions(t,e,"shadow"),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=void 0,delete t.dashes),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),v.mergeOptions(t.scaling,e.scaling,"label")):i===!0&&null===e.scaling&&(t.scaling=void 0,delete t.scaling),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var n=e.arrows.toLowerCase();-1!=n.indexOf("to")&&(t.arrows.to.enabled=!0),-1!=n.indexOf("middle")&&(t.arrows.middle.enabled=!0),-1!=n.indexOf("from")&&(t.arrows.from.enabled=!0)}else{if("object"!=typeof e.arrows)throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));v.mergeOptions(t.arrows,e.arrows,"to"),v.mergeOptions(t.arrows,e.arrows,"middle"),v.mergeOptions(t.arrows,e.arrows,"from")}else i===!0&&null===e.arrows&&(t.arrows=void 0,delete t.arrows);if(void 0!==e.color&&null!==e.color)if(v.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var s=!1;void 0!==e.color.color&&(t.color.color=e.color.color,s=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,s=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,s=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&s===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=void 0,delete t.color);void 0!==e.font&&a["default"].parseOptions(t.font,e)}}]),t}();e["default"]=g,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var a=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=r(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=r(e,2),o=i[0],n=i[1],s=t,a=[];a[0]=Math.pow(1-s,3),a[1]=3*s*Math.pow(1-s,2),a[2]=3*Math.pow(s,2)*(1-s),a[3]=Math.pow(s,3);var h=a[0]*this.from.x+a[1]*o.x+a[2]*n.x+a[3]*this.to.x,d=a[0]*this.from.y+a[1]*o.y+a[2]*n.y+a[3]*this.to.y;return{x:h,y:d}}}]),e}(l["default"]);e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;il;l++)u=.1*l,v[0]=Math.pow(1-u,3),v[1]=3*u*Math.pow(1-u,2),v[2]=3*Math.pow(u,2)*(1-u),v[3]=Math.pow(u,3),c=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,c,p,n,s),h=h>d?d:h),f=c,m=p;return h}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=l&&h>d;){var m=.5*(l+u);if(i=this.getPoint(m,a),o=Math.atan2(p.y-i.y,p.x-i.x),n=p.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-p.x,2)+Math.pow(i.y-p.y,2)),r=n-s,Math.abs(r)r?f===!1?l=m:u=m:f===!1?u=m:l=m, -d++}return i.t=m,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;10>d;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,u,c,n,s),a=a>h?h:a),p=u,f=c;return a}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;io.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,u=void 0,c=void 0,p=void 0,f=void 0,m=void 0,v=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),u=this._pointOnCircle(o,n,l,g),c=Math.atan2(t.y-u.y,t.x-u.x),p=t.distanceToBorder(e,c),f=Math.sqrt(Math.pow(u.x-t.x,2)+Math.pow(u.y-t.y,2)),m=p-f,!(Math.abs(m)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return u.t=g,u}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),u=l[0],c=l[1],p=l[2],f=u-s,m=c-r;h=Math.abs(Math.sqrt(f*f+m*m)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:0>d&&(d=0);var l=t+d*r,u=e+d*a,c=l-n,p=u-s;return Math.sqrt(c*c+p*p)}},{key:"drawArrowHead",value:function(t,e,i,o,s){t.strokeStyle=this.getColor(t,o,s),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(o,s);var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0;if("from"===e?(d=this.from,l=this.to,u=.1,c=this.options.arrows.from.scaleFactor):"to"===e?(d=this.to,l=this.from,u=-.1,c=this.options.arrows.to.scaleFactor):(d=this.to,l=this.from,c=this.options.arrows.middle.scaleFactor),d!=l){if("middle"!==e)if(this.options.smooth.enabled===!0){h=this.findBorderPosition(d,t,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,h.t+u)),i);r=Math.atan2(h.y-p.y,h.x-p.x)}else r=Math.atan2(d.y-l.y,d.x-l.x),h=this.findBorderPosition(d,t);else r=Math.atan2(d.y-l.y,d.x-l.x),h=this.getPoint(.6,i);a=(10+5*this.options.width)*c,t.arrow(h.x,h.y,r,a),this.enableShadow(t),t.fill(),this.disableShadow(t),t.stroke()}else{var f=void 0,m=void 0,v=this._getCircleData(t),g=n(v,3),y=g[0],b=g[1],w=g[2];"from"===e?(m=this.findBorderPosition(this.from,t,{x:y,y:b,low:.25,high:.6,direction:-1}),f=-2*m.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(m=this.findBorderPosition(this.from,t,{x:y,y:b,low:.6,high:1,direction:1}),f=-2*m.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(m=this._pointOnCircle(y,b,w,.175),f=3.9269908169872414);var _=(10+5*this.options.width)*c;t.arrow(m.x,m.y,f,_),this.enableShadow(t),t.fill(),this.disableShadow(t),t.stroke()}}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0.5)",t.shadowBlur=this.options.shadow.size,t.shadowOffsetX=this.options.shadow.x,t.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=i*s>n?this.from.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=i*n>s?this.from.y:e));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(t=this.from.x,e=this.from.yMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y1&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:t.stabilizationIterations}),t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;o>s;s++)t=e[i[s]],t.options.mass>0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;o>h;h++){var d=t[e[h]].x,l=t[e[h]].y; -t[e[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var u=Math.abs(r-n)-Math.abs(a-s);u>0?(s-=.5*u,a+=.5*u):(n+=.5*u,r-=.5*u);var c=1e-5,p=Math.max(c,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var h=0;o>h;h++)i=t[e[h]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii&&(s=.5*u>i?1:c*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,c[r.id].x-=o,c[r.id].y-=n,c[a.id].x+=o,c[a.id].y+=n}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var o=0;o0&&Object.keys(c).length>0&&f===!0&&o.push({nodes:u,edges:c})}}}for(var l=0;lo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=e.releaseFunction(a,r);for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];void 0!==u[d]&&(l.x=void 0===u[d].x?o.x:u[d].x,l.y=void 0===u[d].y?o.y:u[d].y)}}else for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];l=n[d],l.x=o.x,l.y=o.y}for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];l.vx=o.vx,l.vy=o.vy,l.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[d]}for(var c=[],p=0;po;)e.push(this.clusteredNodes[t].node),t=this.clusteredNodes[t].clusterId,o++;return e.push(this.body.nodes[t]),e}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:t.fromId!=e?t.fromId:t.fromId}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,o=0,n=0;no&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,i){for(var o=!0;o;){var n=t,s=e,r=i;a=d=h=void 0,o=!1,null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,s);if(void 0!==a){if("value"in a)return a.value;var h=a.get;return void 0===h?void 0:h.call(r)}var d=Object.getPrototypeOf(n);if(null===d)return void 0;t=d,e=s,i=r,o=!0}},a=i(62),h=o(a),d=function(t){function e(t,i,o,s,a){n(this,e),r(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o,s,a),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}return s(e,t),e}(h["default"]);e["default"]=d,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 0===this.renderTimer&&(this.requiresTimeout===!0?this.renderTimer=window.setTimeout(this._renderStep.bind(this),this.simulationInterval):this.renderTimer=window.requestAnimationFrame(this._renderStep.bind(this)))}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e=this.canvas.frame.canvas.getContext("2d");(0===this.canvas.frame.canvas.width||0===this.canvas.frame.canvas.height)&&this.canvas.setSize(),void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;e.clearRect(0,0,i,o),e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),t===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(e),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(e,t),this.controlNodesActive===!0&&this._drawControlNodes(e),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0)for(var r=0;rt.shape.boundingBox.left&&(n=t.shape.boundingBox.left),st.shape.boundingBox.top&&(i=t.shape.boundingBox.top),ot.shape.boundingBox.left&&(n=t.shape.boundingBox.left),st.shape.boundingBox.top&&(i=t.shape.boundingBox.top),o.5*this.body.nodeIndices.length)return void this.fit(i,!1);t=this._getRange(i.nodes);var a=this.body.nodeIndices.length;e=12.662/(a+7.4147)+.0964822;var h=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);e*=h}else{this.body.emitter.emit("_resizeNodes"),t=this._getRange(i.nodes);var d=1.1*Math.abs(t.maxX-t.minX),l=1.1*Math.abs(t.maxY-t.minY),u=this.canvas.frame.canvas.clientWidth/d,c=this.canvas.frame.canvas.clientHeight/l;e=c>=u?u:c}e>1?e=1:0===e&&(e=1);var p=this._findCenter(t),f={position:p,scale:e,animation:i.animation};this.moveTo(f)}},{key:"focus",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=s.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),u=l.nodesChanges,c=l.edgesChanges,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):0>h-n?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0):h===n&&u===!0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):0>a-o?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0):a===o&&c===!0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;nt&&(t=1e-5),t>10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),t>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,o=e/10;0>e&&(o/=1-o),i*=1+o;var n=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,n)}t.preventDefault()}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),o={left:e,top:i,right:e,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,u=[],c=0;c0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],c=0;c0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o0?e===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(t){t instanceof s?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof s?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof s?delete this.selectionObj.nodes[t.id]:delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t];return void 0}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t];return void 0}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptions(e);if(i===!0)return this.body.emitter.emit("refresh"),s.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptions",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={solver:"hierarchicalRepulsion"},this.optionsBackup.physics={solver:"barnesHut"}):"object"==typeof t.physics?(this.optionsBackup.physics={solver:"barnesHut"},void 0!==t.physics.solver&&(this.optionsBackup.physics={solver:t.physics.solver}),t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics={solver:"barnesHut"},t.physics.solver="hierarchicalRepulsion");var e="horizontal";("RL"===this.options.hierarchical.direction||"LR"===this.options.hierarchical.direction)&&(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),void console.info("This network could not be positioned by this version of the improved layout algorithm.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_declusterAll",value:function(){for(var t=!0;t===!0;){t=!1;for(var e=0;e0){var t=void 0,e=void 0,i=!1,o=!1;this.hierarchicalLevels={},this.nodeSpacing=100;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):o=!0);if(o===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");o===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():("directed"===this.options.hierarchical.sortMethod,this._determineLevelsDirected()));var n=this._getDistribution();this._placeNodesByHierarchy(n)}}},{key:"_placeNodesByHierarchy",value:function(t){var e=void 0,i=void 0;this.positionedNodes={};for(var o in t)if(t.hasOwnProperty(o))for(e in t[o].nodes)t[o].nodes.hasOwnProperty(e)&&(i=t[o].nodes[e],"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?(void 0===i.x&&(i.x=t[o].distance),t[o].distance=i.x+this.nodeSpacing):(void 0===i.y&&(i.y=t[o].distance),t[o].distance=i.y+this.nodeSpacing),this.positionedNodes[e]=!0,this._placeBranchNodes(i.edges,i.id,t,o))}},{key:"_getDistribution",value:function(){var t={},e=void 0,i=void 0;for(e in this.body.nodes)if(this.body.nodes.hasOwnProperty(e)){i=this.body.nodes[e];var o=void 0===this.hierarchicalLevels[e]?0:this.hierarchicalLevels[e];"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?(i.y=this.options.hierarchical.levelSeparation*o,i.options.fixed.y=!0):(i.x=this.options.hierarchical.levelSeparation*o,i.options.fixed.x=!0),void 0===t[o]&&(t[o]={amount:0,nodes:{},distance:0}),t[o].amount+=1,t[o].nodes[e]=i}return t}},{key:"_getHubSize",value:function(){var t=0;for(var e in this.body.nodes)if(this.body.nodes.hasOwnProperty(e)){var i=this.body.nodes[e];void 0===this.hierarchicalLevels[e]&&(t=i.edges.length0&&(i=this._getHubSize(),0!==i);)for(t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&(e=this.body.nodes[t],e.edges.length===i&&this._setLevelByHubsize(0,e))}},{key:"_setLevelByHubsize",value:function(t,e){if(void 0===this.hierarchicalLevels[e.id]){var i=void 0;this.hierarchicalLevels[e.id]=t;for(var o=0;oo&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?(void 0===s.x&&(s.x=Math.max(i[a].distance,r.x)),i[a].distance=s.x+this.nodeSpacing,this.positionedNodes[s.id]=!0):(void 0===s.y&&(s.y=Math.max(i[a].distance,r.y)),i[a].distance=s.y+this.nodeSpacing),this.positionedNodes[s.id]=!0,s.edges.length>1&&this._placeBranchNodes(s.edges,s.id,i,a))}}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!0);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);return i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e,this.body.functions.createNode(i)}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},useImageSize:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;in&&h>a;){a+=1;var v=this._getHighestEnergyNode(i),g=s(v,4);for(u=g[0],l=g[1],c=g[2],p=g[3],f=l,m=0;f>r&&d>m;){m+=1,this._moveNode(u,c,p);var y=this._getEnergy(u),b=s(y,3);f=b[0],c=b[1],p=b[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;ho&&(o=c,n=d,r=p,a=f)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=i[t].x,n=i[t].y,s=0,r=0,a=0;ad;d++)for(var s=0;h-1>s;s++)for(var r=s+1;h>r;r++)o[e[s]][e[r]]=Math.min(o[e[s]][e[r]],o[e[s]][e[d]]+o[e[d]][e[r]]),o[e[r]][e[s]]=o[e[s]][e[r]];return o}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=t+i,h=e+o,d=t+i/2,l=e+o/2;this.beginPath(),this.moveTo(t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=t+s,u=e+r,c=t+s/2,p=e+r/2,f=e+(o-r/2),m=e+o;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+d,c+h,u,c,u),this.bezierCurveTo(c-h,u,t,p+d,t,p),this.bezierCurveTo(t,p-d,c-h,e,c,e),this.bezierCurveTo(c+h,e,l,p-d,l,p),this.lineTo(l,f),this.bezierCurveTo(l,f+d,c+h,m,c,m),this.bezierCurveTo(c-h,m,t,f+d,t,f),this.lineTo(t,p)},CanvasRenderingContext2D.prototype.arrow=function(t,e,i,o){var n=t-o*Math.cos(i),s=e-o*Math.sin(i),r=t-.9*o*Math.cos(i),a=e-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),u=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(t,e),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,u),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=0>r?-c:c,t+=c,e+=h*c,u===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return A.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(t,e,i){for(var o=e.split("."),n=t;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function d(t,e){for(var i,o,n=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;o>i;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=a(n.attr,t.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function u(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function c(){for(L=E.NULL,z="";" "===N||" "===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||" "===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||" "===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(L=E.DELIMITER);var i=N+s();if(S[i])return L=E.DELIMITER,z=i,n(),void n();if(S[N])return L=E.DELIMITER,z=N,void n();if(r(N)||"-"===N){for(z+=N,n();r(N);)z+=N,n();return"false"===z?z=!1:"true"===z?z=!0:isNaN(Number(z))||(z=Number(z)),void(L=E.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)z+=N,'"'===N&&n(),n();if('"'!=N)throw _('End of string " expected');return n(),void(L=E.IDENTIFIER)}for(L=E.UNKNOWN;""!=N;)z+=N,n();throw new SyntaxError('Syntax error in part "'+x(z,30)+'"')}function p(){var t={};if(o(),c(),"strict"===z&&(t.strict=!0,c()),("graph"===z||"digraph"===z)&&(t.type=z,c()),L===E.IDENTIFIER&&(t.id=z,c()),"{"!=z)throw _("Angle bracket { expected");if(c(),f(t),"}"!=z)throw _("Angle bracket } expected");if(c(),""!==z)throw _("End of file expected");return c(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==z&&"}"!=z;)m(t),";"===z&&c()}function m(t){var e=v(t);if(e)return void b(t,e);var i=g(t);if(!i){if(L!=E.IDENTIFIER)throw _("Identifier expected");var o=z;if(c(),"="===z){if(c(),L!=E.IDENTIFIER)throw _("Identifier expected");t[o]=z,c()}else y(t,o)}}function v(t){var e=null;if("subgraph"===z&&(e={},e.type="subgraph",c(),L===E.IDENTIFIER&&(e.id=z,c())),"{"===z){if(c(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=z)throw _("Angle bracket } expected");c(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===z?(c(),t.node=w(),"node"):"edge"===z?(c(),t.edge=w(),"edge"):"graph"===z?(c(),t.graph=w(),"graph"):null}function y(t,e){var i={id:e},o=w();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===z||"--"===z;){var i,o=z;c();var n=v(t);if(n)i=n;else{if(L!=E.IDENTIFIER)throw _("Identifier or subgraph expected");i=z,d(t,{id:i}),c()}var s=w(),r=u(t,e,i,o,s);l(t,r),e=i}}function w(){for(var t=null;"["===z;){for(c(),t={};""!==z&&"]"!=z;){if(L!=E.IDENTIFIER)throw _("Attribute name expected");var e=z;if(c(),"="!=z)throw _("Equal sign = expected");if(c(),L!=E.IDENTIFIER)throw _("Attribute value expected");var i=z;h(t,e,i),c(),","==z&&c()}if("]"!=z)throw _("Bracket ] expected");c()}return t}function _(t){return new SyntaxError(t+', got "'+x(z,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",z="",L=E.NULL,A=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=D},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;ai;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var n;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(o.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])):o(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return o(t);if(t instanceof Date)return o(t.valueOf());if(o.isMoment(t))return o(t);if(e.isString(t))return n=s.exec(t),o(n?Number(n[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(o.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return n=s.exec(t),n?new Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){n=s.exec(t);var r;return r=n?new Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+r+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var s=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e=typeof t;return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var r={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=r.split(t.style.cssText),n=r.split(i),s=e.extend(o,n);t.style.cssText=r.join(s)},e.removeCssText=function(t,e){var i=r.split(t.style.cssText),o=r.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=r.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==typeof i){for(var o=Object.create(i),n=0;n0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],u=e(l);if(0==u)return h;-1==u?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o,n){for(var s,r,a,h,d=1e4,l=0,u=0,c=t.length-1,n=void 0!=n?n:function(t,e){return t==e?0:e>t?-1:1};c>=u&&d>l;){if(h=Math.floor(.5*(c+u)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?u=h+1:c=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return qi.apply(null,arguments)}function i(t){qi=t}function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in Zi)o=Zi[i],n=e[o],p(n)||(t[o]=n);return t}function v(t){f(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),Ki===!1&&(Ki=!0,e.updateOffset(this),Ki=!1)}function m(t){return t instanceof v||null!=t&&null!=t._isAMomentObject}function g(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function b(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&y(t[o])!==y(e[o]))&&r++;return r+s}function _(){}function w(t){return t?t.toLowerCase().replace("_","-"):t}function x(t){for(var e,i,o,n,s=0;s0;){if(o=k(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&b(n,i,!0)>=e-1)break;e--}s++}return null}function k(e){var i=null;if(!Ji[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=Xi._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),O(i)}catch(o){}return Ji[e]}function O(t,e){var i;return t&&(i=p(e)?D(t):M(t,e),i&&(Xi=i)),Xi._abbr}function M(t,e){return null!==e?(e.abbr=t,Ji[t]=Ji[t]||new _,Ji[t].set(e),O(t),Ji[t]):(delete Ji[t],null)}function D(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Xi;if(!o(t)){if(e=k(t))return e;t=[t]}return x(t)}function C(t,e){var i=t.toLowerCase();Qi[i]=Qi[i+"s"]=Qi[e]=t}function S(t){return"string"==typeof t?Qi[t]||Qi[t.toLowerCase()]:void 0}function T(t){var e,i,o={};for(i in t)r(t,i)&&(e=S(i),e&&(o[e]=t[i]));return o}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,i){return function(o){return null!=o?(N(this,t,o),e.updateOffset(this,i),this):I(this,t)}}function I(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function N(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function z(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=S(t),E(this[t]))return this[t](e);return this}function L(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function A(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(io[t]=n),e&&(io[e[0]]=function(){return L(n.apply(this,arguments),e[1],e[2])}),i&&(io[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function R(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function F(t){var e,i,o=t.match($i);for(e=0,i=o.length;i>e;e++)io[o[e]]?o[e]=io[o[e]]:o[e]=R(o[e]);return function(n){var s="";for(e=0;i>e;e++)s+=o[e]instanceof Function?o[e].call(n,t):o[e];return s}}function B(t,e){return t.isValid()?(e=j(e,t.localeData()),eo[e]=eo[e]||F(e),eo[e](t)):t.localeData().invalidDate()}function j(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(to.lastIndex=0;o>=0&&to.test(t);)t=t.replace(to,i),to.lastIndex=0,o-=1;return t}function H(t,e,i){wo[t]=E(e)?e:function(t,o){return t&&i?i:e}}function W(t,e){return r(wo,t)?wo[t](e._strict,e._locale):new RegExp(Y(t))}function Y(t){return G(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function G(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function V(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=y(t)}),i=0;io;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function Q(t,e){var i;return t.isValid()?"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),X(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t):t}function $(t){return null!=t?(Q(this,t),e.updateOffset(this,!0),this):I(this,"Month")}function tt(){return X(this.year(),this.month())}function et(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ot.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function it(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ot.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ot(){function t(t,e){return e.length-t.length}var e,i,o=[],n=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(t),n.sort(t),s.sort(t),e=0;12>e;e++)o[e]=G(o[e]),n[e]=G(n[e]),s[e]=G(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")$","i")}function nt(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Oo]<0||i[Oo]>11?Oo:i[Mo]<1||i[Mo]>X(i[ko],i[Oo])?Mo:i[Do]<0||i[Do]>24||24===i[Do]&&(0!==i[Co]||0!==i[So]||0!==i[To])?Do:i[Co]<0||i[Co]>59?Co:i[So]<0||i[So]>59?So:i[To]<0||i[To]>999?To:-1,l(t)._overflowDayOfYear&&(ko>e||e>Mo)&&(e=Mo),l(t)._overflowWeeks&&-1===e&&(e=Eo),l(t)._overflowWeekday&&-1===e&&(e=Po),l(t).overflow=e),t}function st(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function rt(t,e){var i=!0;return a(function(){return i&&(st(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function at(t,e){Ro[t]||(st(e),Ro[t]=!0)}function ht(t){var e,i,o,n,s,r,a=t._i,h=Fo.exec(a)||Bo.exec(a);if(h){for(l(t).iso=!0,e=0,i=Ho.length;i>e;e++)if(Ho[e][1].exec(h[1])){n=Ho[e][0],o=Ho[e][2]!==!1;break}if(null==n)return void(t._isValid=!1);if(h[3]){for(e=0,i=Wo.length;i>e;e++)if(Wo[e][1].exec(h[3])){s=(h[2]||" ")+Wo[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(h[4]){if(!jo.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=n+(s||"")+(r||""),kt(t)}else t._isValid=!1}function dt(t){var i=Yo.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(ht(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function lt(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function ut(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function ct(t){return pt(t)?366:365}function pt(t){return t%4===0&&t%100!==0||t%400===0}function ft(){return pt(this.year())}function vt(t,e,i){var o=7+e-i,n=(7+ut(t,0,o).getUTCDay()-e)%7;return-n+o-1}function mt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=vt(t,o,n),d=1+7*(e-1)+a+h;return 0>=d?(s=t-1,r=ct(s)+d):d>ct(t)?(s=t+1,r=d-ct(t)):(s=t,r=d),{year:s,dayOfYear:r}}function gt(t,e,i){var o,n,s=vt(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>r?(n=t.year()-1,o=r+yt(n,e,i)):r>yt(t.year(),e,i)?(o=r-yt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function yt(t,e,i){var o=vt(t,e,i),n=vt(t+1,e,i);return(ct(t)-o+n)/7}function bt(t,e,i){return null!=t?t:null!=e?e:i}function _t(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function wt(t){var e,i,o,n,s=[];if(!t._d){for(o=_t(t),t._w&&null==t._a[Mo]&&null==t._a[Oo]&&xt(t),t._dayOfYear&&(n=bt(t._a[ko],o[ko]),t._dayOfYear>ct(n)&&(l(t)._overflowDayOfYear=!0),i=ut(n,0,t._dayOfYear),t._a[Oo]=i.getUTCMonth(),t._a[Mo]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Do]&&0===t._a[Co]&&0===t._a[So]&&0===t._a[To]&&(t._nextDay=!0,t._a[Do]=0),t._d=(t._useUTC?ut:lt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Do]=24)}}function xt(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=bt(e.GG,t._a[ko],gt(Pt(),1,4).year),o=bt(e.W,1),n=bt(e.E,1),(1>n||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=bt(e.gg,t._a[ko],gt(Pt(),s,r).year),o=bt(e.w,1),null!=e.d?(n=e.d,(0>n||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),1>o||o>yt(i,s,r)?l(t)._overflowWeeks=!0:null!=h?l(t)._overflowWeekday=!0:(a=mt(i,o,n,s,r),t._a[ko]=a.year,t._dayOfYear=a.dayOfYear)}function kt(t){if(t._f===e.ISO_8601)return void ht(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=j(t._f,t._locale).match($i)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),io[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),q(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[Do]<=12&&t._a[Do]>0&&(l(t).bigHour=void 0),t._a[Do]=Ot(t._locale,t._a[Do],t._meridiem),wt(t),nt(t)}function Ot(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Mt(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function Dt(t){if(!t._d){var e=T(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),wt(t)}}function Ct(t){var e=new v(nt(St(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function St(t){var e=t._i,i=t._f;return t._locale=t._locale||D(t._l),null===e||void 0===i&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new v(nt(e)):(o(i)?Mt(t):i?kt(t):n(e)?t._d=e:Tt(t),u(t)||(t._d=null),t))}function Tt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):n(i)?t._d=new Date(+i):"string"==typeof i?dt(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),wt(t)):"object"==typeof i?Dt(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Et(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,Ct(s)}function Pt(t,e,i,o){return Et(t,e,i,o,!1)}function It(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Pt();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ft(t,e){var i=(e||"").match(t)||[],o=i[i.length-1]||[],n=(o+"").match(Xo)||["-",0,0],s=+(60*n[1])+y(n[2]);return"+"===n[0]?s:-s}function Bt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(m(t)||n(t)?+t:+Pt(t))-+o,o._d.setTime(+o._d+s),e.updateOffset(o,!1),o):Pt(t).local()}function jt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ht(t,i){var o,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Ft(yo,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=jt(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?oe(this,Qt(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:jt(this):null!=t?this:NaN}function Wt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Yt(t){return this.utcOffset(0,t)}function Gt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(jt(this),"m")),this}function Vt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ft(go,this._i)),this}function Ut(t){return this.isValid()?(t=t?Pt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xt(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=St(t),t._a){var e=t._isUTC?h(t._a):Pt(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Zt(){return this.isValid()?!this._isUTC:!1}function Kt(){return this.isValid()?this._isUTC:!1}function Jt(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Qt(t,e){var i,o,n,s=t,a=null;return At(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=Zo.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:y(a[Mo])*i,h:y(a[Do])*i,m:y(a[Co])*i,s:y(a[So])*i,ms:y(a[To])*i}):(a=Ko.exec(t))?(i="-"===a[1]?-1:1,s={y:$t(a[2],i),M:$t(a[3],i),d:$t(a[4],i),h:$t(a[5],i),m:$t(a[6],i),s:$t(a[7],i),w:$t(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=ee(Pt(s.from),Pt(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Lt(s),At(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function $t(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function te(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ee(t,e){var i;return t.isValid()&&e.isValid()?(e=Bt(e,t),t.isBefore(e)?i=te(t,e):(i=te(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ie(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(at(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Qt(i,o),oe(this,n,t),this}}function oe(t,i,o,n){var s=i._milliseconds,r=i._days,a=i._months;t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(+t._d+s*o),r&&N(t,"Date",I(t,"Date")+r*o),a&&Q(t,I(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function ne(t,e){var i=t||Pt(),o=Bt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(E(e[s])?e[s]():e[s]);return this.format(r||this.localeData().calendar(s,this,Pt(i)))}function se(){return new v(this)}function re(t,e){var i=m(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=S(p(e)?"millisecond":e),"millisecond"===e?+this>+i:+i<+this.clone().startOf(e)):!1}function ae(t,e){var i=m(t)?t:Pt(t);return this.isValid()&&i.isValid()?(e=S(p(e)?"millisecond":e),"millisecond"===e?+i>+this:+this.clone().endOf(e)<+i):!1}function he(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)}function de(t,e){var i,o=m(t)?t:Pt(t);return this.isValid()&&o.isValid()?(e=S(e||"millisecond"),"millisecond"===e?+this===+o:(i=+o,+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))):!1}function le(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ue(t,e){ +return this.isSame(t,e)||this.isBefore(t,e)}function ce(t,e,i){var o,n,s,r;return this.isValid()?(o=Bt(t,this),o.isValid()?(n=6e4*(o.utcOffset()-this.utcOffset()),e=S(e),"year"===e||"month"===e||"quarter"===e?(r=pe(this,o),"quarter"===e?r/=3:"year"===e&&(r/=12)):(s=this-o,r="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-n)/864e5:"week"===e?(s-n)/6048e5:s),i?r:g(r)):NaN):NaN}function pe(t,e){var i,o,n=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(n,"months");return 0>e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)}function fe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ve(){var t=this.clone().utc();return 0s&&(e=s),He.call(this,t,e,i,o,n))}function He(t,e,i,o,n){var s=mt(t,e,i,o,n),r=ut(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function We(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ye(t){return gt(t,this._week.dow,this._week.doy).week}function Ge(){return this._week.dow}function Ve(){return this._week.doy}function Ue(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function qe(t){var e=gt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Xe(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Ze(t,e){return o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function Ke(t){return this._weekdaysShort[t.day()]}function Je(t){return this._weekdaysMin[t.day()]}function Qe(t,e,i){var o,n,s;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=Pt([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function $e(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Xe(t,this.localeData()),this.add(t-e,"d")):e}function ti(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function ei(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function ii(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function oi(){return this.hours()%12||12}function ni(t,e){A(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function si(t,e){return e._meridiemParse}function ri(t){return"p"===(t+"").toLowerCase().charAt(0)}function ai(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function hi(t,e){e[To]=y(1e3*("0."+t))}function di(){return this._isUTC?"UTC":""}function li(){return this._isUTC?"Coordinated Universal Time":""}function ui(t){return Pt(1e3*t)}function ci(){return Pt.apply(null,arguments).parseZone()}function pi(t,e,i){var o=this._calendar[t];return E(o)?o.call(e,i):o}function fi(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function vi(){return this._invalidDate}function mi(t){return this._ordinal.replace("%d",t)}function gi(t){return t}function yi(t,e,i,o){var n=this._relativeTime[i];return E(n)?n(t,e,i,o):n.replace(/%d/i,t)}function bi(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)}function _i(t){var e,i;for(i in t)e=t[i],E(e)?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function wi(t,e,i,o){var n=D(),s=h().set(o,e);return n[i](s,t)}function xi(t,e,i,o,n){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return wi(t,e,i,n);var s,r=[];for(s=0;o>s;s++)r[s]=wi(t,s,i,n);return r}function ki(t,e){return xi(t,e,"months",12,"month")}function Oi(t,e){return xi(t,e,"monthsShort",12,"month")}function Mi(t,e){return xi(t,e,"weekdays",7,"day")}function Di(t,e){return xi(t,e,"weekdaysShort",7,"day")}function Ci(t,e){return xi(t,e,"weekdaysMin",7,"day")}function Si(){var t=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),t.milliseconds=wn(t.milliseconds),t.seconds=wn(t.seconds),t.minutes=wn(t.minutes),t.hours=wn(t.hours),t.months=wn(t.months),t.years=wn(t.years),this}function Ti(t,e,i,o){var n=Qt(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Ei(t,e){return Ti(this,t,e,1)}function Pi(t,e){return Ti(this,t,e,-1)}function Ii(t){return 0>t?Math.floor(t):Math.ceil(t)}function Ni(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Ii(Li(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=g(s/1e3),h.seconds=t%60,e=g(t/60),h.minutes=e%60,i=g(e/60),h.hours=i%24,r+=g(i/24),n=g(zi(r)),a+=n,r-=Ii(Li(n)),o=g(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function zi(t){return 4800*t/146097}function Li(t){return 146097*t/4800}function Ai(t){var e,i,o=this._milliseconds;if(t=S(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+zi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Li(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Ri(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Fi(t){return function(){return this.as(t)}}function Bi(t){return t=S(t),this[t+"s"]()}function ji(t){return function(){return this._data[t]}}function Hi(){return g(this.days()/7)}function Wi(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function Yi(t,e,i){var o=Qt(t).abs(),n=Rn(o.as("s")),s=Rn(o.as("m")),r=Rn(o.as("h")),a=Rn(o.as("d")),h=Rn(o.as("M")),d=Rn(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,Wi.apply(null,l)}function Gi(t,e){return void 0===Fn[t]?!1:void 0===e?Fn[t]:(Fn[t]=e,!0)}function Vi(t){var e=this.localeData(),i=Yi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Ui(){var t,e,i,o=Bn(this._milliseconds)/1e3,n=Bn(this._days),s=Bn(this._months);t=g(o/60),e=g(t/60),o%=60,t%=60,i=g(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||u?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var qi,Xi,Zi=e.momentProperties=[],Ki=!1,Ji={},Qi={},$i=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,to=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,eo={},io={},oo=/\d/,no=/\d\d/,so=/\d{3}/,ro=/\d{4}/,ao=/[+-]?\d{6}/,ho=/\d\d?/,lo=/\d\d\d\d?/,uo=/\d\d\d\d\d\d?/,co=/\d{1,3}/,po=/\d{1,4}/,fo=/[+-]?\d{1,6}/,vo=/\d+/,mo=/[+-]?\d+/,go=/Z|[+-]\d\d:?\d\d/gi,yo=/Z|[+-]\d\d(?::?\d\d)?/gi,bo=/[+-]?\d+(\.\d{1,3})?/,_o=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,wo={},xo={},ko=0,Oo=1,Mo=2,Do=3,Co=4,So=5,To=6,Eo=7,Po=8;A("M",["MM",2],"Mo",function(){return this.month()+1}),A("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),A("MMMM",0,0,function(t){return this.localeData().months(this,t)}),C("month","M"),H("M",ho),H("MM",ho,no),H("MMM",function(t,e){return e.monthsShortRegex(t)}),H("MMMM",function(t,e){return e.monthsRegex(t)}),V(["M","MM"],function(t,e){e[Oo]=y(t)-1}),V(["MMM","MMMM"],function(t,e,i,o){var n=i._locale.monthsParse(t,o,i._strict);null!=n?e[Oo]=n:l(i).invalidMonth=t});var Io=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,No="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),zo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lo=_o,Ao=_o,Ro={};e.suppressDeprecationWarnings=!1;var Fo=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Bo=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,jo=/Z|[+-]\d\d(?::?\d\d)?/,Ho=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Wo=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Yo=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=rt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),A("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),A(0,["YY",2],0,function(){return this.year()%100}),A(0,["YYYY",4],0,"year"),A(0,["YYYYY",5],0,"year"),A(0,["YYYYYY",6,!0],0,"year"),C("year","y"),H("Y",mo),H("YY",ho,no),H("YYYY",po,ro),H("YYYYY",fo,ao),H("YYYYYY",fo,ao),V(["YYYYY","YYYYYY"],ko),V("YYYY",function(t,i){i[ko]=2===t.length?e.parseTwoDigitYear(t):y(t)}),V("YY",function(t,i){i[ko]=e.parseTwoDigitYear(t)}),V("Y",function(t,e){e[ko]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var Go=P("FullYear",!1);e.ISO_8601=function(){};var Vo=rt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:c()}),Uo=rt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:c()}),qo=function(){return Date.now?Date.now():+new Date};Rt("Z",":"),Rt("ZZ",""),H("Z",yo),H("ZZ",yo),V(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ft(yo,t)});var Xo=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Zo=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Ko=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Qt.fn=Lt.prototype;var Jo=ie(1,"add"),Qo=ie(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var $o=rt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});A(0,["gg",2],0,function(){return this.weekYear()%100}),A(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Le("gggg","weekYear"),Le("ggggg","weekYear"),Le("GGGG","isoWeekYear"),Le("GGGGG","isoWeekYear"),C("weekYear","gg"),C("isoWeekYear","GG"),H("G",mo),H("g",mo),H("GG",ho,no),H("gg",ho,no),H("GGGG",po,ro),H("gggg",po,ro),H("GGGGG",fo,ao),H("ggggg",fo,ao),U(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=y(t)}),U(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),A("Q",0,"Qo","quarter"),C("quarter","Q"),H("Q",oo),V("Q",function(t,e){e[Oo]=3*(y(t)-1)}),A("w",["ww",2],"wo","week"),A("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),H("w",ho),H("ww",ho,no),H("W",ho),H("WW",ho,no),U(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=y(t)});var tn={dow:0,doy:6};A("D",["DD",2],"Do","date"),C("date","D"),H("D",ho),H("DD",ho,no),H("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),V(["D","DD"],Mo),V("Do",function(t,e){e[Mo]=y(t.match(ho)[0],10)});var en=P("Date",!0);A("d",0,"do","day"),A("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),A("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),A("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),A("e",0,0,"weekday"),A("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),H("d",ho),H("e",ho),H("E",ho),H("dd",_o),H("ddd",_o),H("dddd",_o),U(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:l(i).invalidWeekday=t}),U(["d","e","E"],function(t,e,i,o){e[o]=y(t)});var on="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sn="Su_Mo_Tu_We_Th_Fr_Sa".split("_");A("DDD",["DDDD",3],"DDDo","dayOfYear"),C("dayOfYear","DDD"),H("DDD",co),H("DDDD",so),V(["DDD","DDDD"],function(t,e,i){i._dayOfYear=y(t)}),A("H",["HH",2],0,"hour"),A("h",["hh",2],0,oi),A("hmm",0,0,function(){return""+oi.apply(this)+L(this.minutes(),2)}),A("hmmss",0,0,function(){return""+oi.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),A("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),A("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),ni("a",!0),ni("A",!1),C("hour","h"),H("a",si),H("A",si),H("H",ho),H("h",ho),H("HH",ho,no),H("hh",ho,no),H("hmm",lo),H("hmmss",uo),H("Hmm",lo),H("Hmmss",uo),V(["H","HH"],Do),V(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),V(["h","hh"],function(t,e,i){e[Do]=y(t),l(i).bigHour=!0}),V("hmm",function(t,e,i){var o=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o)),l(i).bigHour=!0}),V("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o,2)),e[So]=y(t.substr(n)),l(i).bigHour=!0}),V("Hmm",function(t,e,i){var o=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o))}),V("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Do]=y(t.substr(0,o)),e[Co]=y(t.substr(o,2)),e[So]=y(t.substr(n))});var rn=/[ap]\.?m?\.?/i,an=P("Hours",!0);A("m",["mm",2],0,"minute"),C("minute","m"),H("m",ho),H("mm",ho,no),V(["m","mm"],Co);var hn=P("Minutes",!1);A("s",["ss",2],0,"second"),C("second","s"),H("s",ho),H("ss",ho,no),V(["s","ss"],So);var dn=P("Seconds",!1);A("S",0,0,function(){return~~(this.millisecond()/100)}),A(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),A(0,["SSS",3],0,"millisecond"),A(0,["SSSS",4],0,function(){return 10*this.millisecond()}),A(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),A(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),A(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),A(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),A(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),C("millisecond","ms"),H("S",co,oo),H("SS",co,no),H("SSS",co,so);var ln;for(ln="SSSS";ln.length<=9;ln+="S")H(ln,vo);for(ln="S";ln.length<=9;ln+="S")V(ln,hi);var un=P("Milliseconds",!1);A("z",0,0,"zoneAbbr"),A("zz",0,0,"zoneName");var cn=v.prototype;cn.add=Jo,cn.calendar=ne,cn.clone=se,cn.diff=ce,cn.endOf=Oe,cn.format=me,cn.from=ge,cn.fromNow=ye,cn.to=be,cn.toNow=_e,cn.get=z,cn.invalidAt=Ne,cn.isAfter=re,cn.isBefore=ae,cn.isBetween=he,cn.isSame=de,cn.isSameOrAfter=le,cn.isSameOrBefore=ue,cn.isValid=Pe,cn.lang=$o,cn.locale=we,cn.localeData=xe,cn.max=Uo,cn.min=Vo,cn.parsingFlags=Ie,cn.set=z,cn.startOf=ke,cn.subtract=Qo,cn.toArray=Se,cn.toObject=Te,cn.toDate=Ce,cn.toISOString=ve,cn.toJSON=Ee,cn.toString=fe,cn.unix=De,cn.valueOf=Me,cn.creationData=ze,cn.year=Go,cn.isLeapYear=ft,cn.weekYear=Ae,cn.isoWeekYear=Re,cn.quarter=cn.quarters=We,cn.month=$,cn.daysInMonth=tt,cn.week=cn.weeks=Ue,cn.isoWeek=cn.isoWeeks=qe,cn.weeksInYear=Be,cn.isoWeeksInYear=Fe,cn.date=en,cn.day=cn.days=$e,cn.weekday=ti,cn.isoWeekday=ei,cn.dayOfYear=ii,cn.hour=cn.hours=an,cn.minute=cn.minutes=hn,cn.second=cn.seconds=dn,cn.millisecond=cn.milliseconds=un,cn.utcOffset=Ht,cn.utc=Yt,cn.local=Gt,cn.parseZone=Vt,cn.hasAlignedHourOffset=Ut,cn.isDST=qt,cn.isDSTShifted=Xt,cn.isLocal=Zt,cn.isUtcOffset=Kt,cn.isUtc=Jt,cn.isUTC=Jt,cn.zoneAbbr=di,cn.zoneName=li,cn.dates=rt("dates accessor is deprecated. Use date instead.",en),cn.months=rt("months accessor is deprecated. Use month instead",$),cn.years=rt("years accessor is deprecated. Use year instead",Go),cn.zone=rt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Wt);var pn=cn,fn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},vn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},mn="Invalid date",gn="%d",yn=/\d{1,2}/,bn={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},_n=_.prototype;_n._calendar=fn,_n.calendar=pi,_n._longDateFormat=vn,_n.longDateFormat=fi,_n._invalidDate=mn,_n.invalidDate=vi,_n._ordinal=gn,_n.ordinal=mi,_n._ordinalParse=yn,_n.preparse=gi,_n.postformat=gi,_n._relativeTime=bn,_n.relativeTime=yi,_n.pastFuture=bi,_n.set=_i,_n.months=Z,_n._months=No,_n.monthsShort=K,_n._monthsShort=zo,_n.monthsParse=J,_n._monthsRegex=Ao,_n.monthsRegex=it,_n._monthsShortRegex=Lo,_n.monthsShortRegex=et,_n.week=Ye,_n._week=tn,_n.firstDayOfYear=Ve,_n.firstDayOfWeek=Ge,_n.weekdays=Ze,_n._weekdays=on,_n.weekdaysMin=Je,_n._weekdaysMin=sn,_n.weekdaysShort=Ke,_n._weekdaysShort=nn,_n.weekdaysParse=Qe,_n.isPM=ri,_n._meridiemParse=rn,_n.meridiem=ai,O("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=rt("moment.lang is deprecated. Use moment.locale instead.",O),e.langData=rt("moment.langData is deprecated. Use moment.localeData instead.",D);var wn=Math.abs,xn=Fi("ms"),kn=Fi("s"),On=Fi("m"),Mn=Fi("h"),Dn=Fi("d"),Cn=Fi("w"),Sn=Fi("M"),Tn=Fi("y"),En=ji("milliseconds"),Pn=ji("seconds"),In=ji("minutes"),Nn=ji("hours"),zn=ji("days"),Ln=ji("months"),An=ji("years"),Rn=Math.round,Fn={s:45,m:45,h:22,d:26,M:11},Bn=Math.abs,jn=Lt.prototype;jn.abs=Si,jn.add=Ei,jn.subtract=Pi,jn.as=Ai,jn.asMilliseconds=xn,jn.asSeconds=kn,jn.asMinutes=On,jn.asHours=Mn,jn.asDays=Dn,jn.asWeeks=Cn,jn.asMonths=Sn,jn.asYears=Tn,jn.valueOf=Ri,jn._bubble=Ni,jn.get=Bi,jn.milliseconds=En,jn.seconds=Pn,jn.minutes=In,jn.hours=Nn,jn.days=zn,jn.weeks=Hi,jn.months=Ln,jn.years=An,jn.humanize=Vi,jn.toISOString=Ui,jn.toString=Ui,jn.toJSON=Ui,jn.locale=we,jn.localeData=xe,jn.toIsoString=rt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ui),jn.lang=$o,A("X",0,0,"unix"),A("x",0,0,"valueOf"),H("x",mo),H("X",bo),V("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),V("x",function(t,e,i){i._d=new Date(y(t))}),e.version="2.11.2",i(Pt),e.fn=pn,e.min=Nt,e.max=zt,e.now=qo,e.utc=h,e.unix=ui,e.months=ki,e.isDate=n,e.locale=O,e.invalid=c,e.duration=Qt,e.isMoment=m,e.weekdays=Mi,e.parseZone=ci,e.localeData=D,e.isDuration=At,e.monthsShort=Oi,e.weekdaysMin=Ci,e.defineLocale=M,e.weekdaysShort=Di,e.normalizeUnits=S,e.relativeTimeThreshold=Gi,e.prototype=pn;var Hn=e;return Hn})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=u[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:v,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-m+(h-g)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>m)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");m=a,g=h,v=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;6>p;p++)s[n+p]=c[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;256>c;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],v=16383&(p[6]<<8|p[7]),m=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n=i(1),s=i(9);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=s.extend(this,{replace:["add","update","remove"]})),"object"==typeof t.queue&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var s=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],s=[],r=[],a=this,h=a._fieldId,d=function(t){var e=t[h];if(a._data[e]){var d=n.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),s.push(d)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var l=0,u=t.length;u>l;l++)t[l]instanceof Object?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(t instanceof Object))throw new Error("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){var c={items:o,oldData:s,data:r};this._trigger("update",c,e)}return i.concat(o)},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,u,c,p,f=o&&o.type||this._options.type,v=o&&o.filter,m=[];if(void 0!=e)d=s._getItem(e,f),d&&v&&!v(d)&&(d=null);else if(void 0!=i)for(c=0,p=i.length;p>c;c++)d=s._getItem(i[c],f),v&&!v(d)||m.push(d);else for(l=Object.keys(this._data),c=0,p=l.length;p>c;c++)u=l[c],d=s._getItem(u,f),v&&!v(d)||m.push(d);if(o&&o.order&&void 0==e&&this._sort(m,o.order),o&&o.fields){var g=o.fields;if(void 0!=e)d=this._filterFields(d,g);else for(c=0,p=m.length;p>c;c++)m[c]=this._filterFields(m[c],g)}if("Object"==a){var y,b={};for(c=0,p=m.length;p>c;c++)y=m[c],b[y.id]=y;return b}return void 0!=e?d:m},o.prototype.getIds=function(t){var e,i,o,n,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=Object.keys(r),u=[];if(a)if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&u.push(n[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=r[o],u.push(n[this._fieldId]);return u},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=Object.keys(h);if(e&&e.order){var l=this.get(e);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],t(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||t(n,s)},o.prototype.map=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(t(s,n));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,o,n={},s=Object.keys(t),r=s.length;if(Array.isArray(e))for(i=0;r>i;i++)o=s[i],-1!=e.indexOf(o)&&(n[o]=t[o]);else for(i=0;r>i;i++)o=s[i],e.hasOwnProperty(o)&&(n[e[o]]=t[o]);return n},o.prototype._sort=function(t,e){if(n.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t), +null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(n.isNumber(t)||n.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(t){var e,i,o,s=this._data,r=Object.keys(s),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){var l=r[e],u=s[l],c=u[t],p=!1;for(i=0;d>i;i++)if(a[i]==c){p=!0;break}p||void 0===c||(a[d]=c,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=n.convert(a[e],h);return a},o.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=n.randomUUID(),t[this._fieldId]=e;var i,o,s={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];s[a]=n.convert(t[a],h)}return this._data[e]=s,this.length++,e},o.prototype._getItem=function(t,e){var i,o,s,r,a=this._data[t];if(!a)return null;var h={},d=Object.keys(a);if(e)for(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=n.convert(o,e[i]);else for(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o=Object.keys(t),s=0,r=o.length;r>s;s++){var a=o[s],h=this._type[a];i[a]=n.convert(t[a],h)}return e},t.exports=o},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var o=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=e.length;n>o;o++)i=e[o],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var t,e,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(e=0,i=o.length;i>e;e++)t=o[e],s[t]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=n.length;i>e;e++)t=n[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.map=function(t,e){var i=[];if(this._data){var o,n=this._options.filter;o=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,i=this._data.map(t,{filter:o,order:e&&e.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,n,s,r,a=e&&e.items,h=this._data,d=[],l=[],u=[],c=[];if(a&&h){switch(t){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(u.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],c.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],c.push(s))}this.length+=l.length-c.length,l.length&&this._trigger("add",{items:l},i),u.length&&this._trigger("update",{items:u,data:d},i),c.length&&this._trigger("remove",{items:c},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var n=function(t){return t};this.xValueLabel=n,this.yValueLabel=n,this.zValueLabel=n,this.filterLabel="time",this.legendLabel="value",this.style=o.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new c,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new l(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.dotSizeRatio=.02,this.create(),this.setOptions(i),e&&this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(12),a=i(8),h=i(10),d=i(1),l=i(13),u=i(14),c=i(15),p=i(16),f=i(17),v=i(18);r(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==o.STYLE.DOTCOLOR&&this.style!==o.STYLE.DOTSIZE&&this.style!==o.STYLE.BARCOLOR&&this.style!==o.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},o.prototype.getNumberOfRows=function(t){return t.length},o.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},o.prototype.getDistinctValues=function(t,e){for(var i=[],o=0;ot[o][e]&&(i.min=t[o][e]),i.maxt;t++){var f=(t-c)/(p-c),m=240*f,g=this._hsv2rgb(m,1,1);u.strokeStyle=g,u.beginPath(),u.moveTo(h,r+t),u.lineTo(a,r+t),u.stroke()}u.strokeStyle=this.axisColor,u.strokeRect(h,r,i,s)}if(this.style===o.STYLE.DOTSIZE&&(u.strokeStyle=this.axisColor,u.fillStyle=this.dataColor.fill,u.beginPath(),u.moveTo(h,r),u.lineTo(a,r),u.lineTo(a-i+e,d),u.lineTo(h,d),u.closePath(),u.fill(),u.stroke()),this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){var y=5,b=new v(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()0?this.yMin:this.yMax,n=this._convert3Dto2D(new l(w,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.xValueLabel(i.getCurrent())+" ",n.x,n.y),i.next()}for(m.lineWidth=1,o=void 0===this.defaultYStep,i=new v(this.yMin,this.yMax,this.yStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,n=this._convert3Dto2D(new l(s,i.getCurrent(),this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.yValueLabel(i.getCurrent())+" ",n.x,n.y),i.next();for(m.lineWidth=1,o=void 0===this.defaultZStep,i=new v(this.zMin,this.zMax,this.zStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new l(s,r,i.getCurrent())),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(t.x-b,t.y),m.stroke(),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();m.lineWidth=1,t=this._convert3Dto2D(new l(s,r,this.zMin)),e=this._convert3Dto2D(new l(s,r,this.zMax)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),m.lineWidth=1,c=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(p.x,p.y),m.stroke(),c=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),p=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(p.x,p.y),m.stroke(),m.lineWidth=1,t=this._convert3Dto2D(new l(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMin,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),t=this._convert3Dto2D(new l(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new l(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke();var x=this.xLabel;x.length>0&&(u=.1/this.scale.y,s=(this.xMin+this.xMax)/2,r=Math.cos(_)>0?this.yMin-u:this.yMax+u,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*_)>0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(x,n.x,n.y));var k=this.yLabel;k.length>0&&(d=.1/this.scale.x,s=Math.sin(_)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,n=this._convert3Dto2D(new l(s,r,this.zMin)),Math.cos(2*_)<0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*_)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(k,n.x,n.y));var O=this.zLabel;O.length>0&&(h=30,s=Math.cos(_)>0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,n=this._convert3Dto2D(new l(s,r,a)),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(O,n.x-h,n.y))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._redrawDataGrid=function(){var t,e,i,n,s,r,a,h,d,u,c,p,f=this.frame.canvas,v=f.getContext("2d");if(v.lineJoin="round",v.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else r=!0;r?(p=(t.point.z+e.point.z+i.point.z+n.point.z)/4,d=240*(1-(p-this.zMin)*this.scale.z/this.verticalRatio),u=1,this.showShadow?(c=Math.min(1+x.x/k/2,1),a=this._hsv2rgb(d,u,c),h=a):(c=1,a=this._hsv2rgb(d,u,c),h=this.axisColor)):(a="gray",h=this.axisColor),v.lineWidth=this._getStrokeWidth(t),v.fillStyle=a,v.strokeStyle=h,v.beginPath(),v.moveTo(t.screen.x,t.screen.y),v.lineTo(e.screen.x,e.screen.y),v.lineTo(n.screen.x,n.screen.y),v.lineTo(i.screen.x,i.screen.y),v.closePath(),v.fill(),v.stroke()}}else for(s=0;sc&&(c=0);var p,f,v;this.style===o.STYLE.DOTCOLOR?(p=240*(1-(d.point.value-this.valueMin)*this.scale.value),f=this._hsv2rgb(p,1,1),v=this._hsv2rgb(p,1,.8)):this.style===o.STYLE.DOTSIZE?(f=this.dataColor.fill,v=this.dataColor.stroke):(p=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(p,1,1),v=this._hsv2rgb(p,1,.8)),i.lineWidth=this._getStrokeWidth(d),i.strokeStyle=v,i.fillStyle=f,i.beginPath(),i.arc(d.screen.x,d.screen.y,c,0,2*Math.PI,!0),i.fill(),i.stroke()}}},o.prototype._redrawDataBar=function(){var t,e,i,n,s=this.frame.canvas,r=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],o.lineWidth=this._getStrokeWidth(t),o.lineJoin="round",o.lineCap="round",o.strokeStyle=this.dataColor.stroke,o.beginPath(),o.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var c=d[l],p=c.corners,f=[p[0].screen,p[1].screen,p[2].screen],v=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,v))return s}}else for(i=0;ib)&&n>b&&(a=b,r=s)}}return r},o.prototype._showTooltip=function(t){var e,i,o;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,o=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",o=document.createElement("div"),o.style.position="absolute",o.style.height="0",o.style.width="0",o.style.border="5px solid #4d4d4d",o.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:o}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
"+this.xLabel+":"+t.point.x+"
"+this.yLabel+":"+t.point.y+"
"+this.zLabel+":"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=o},function(t,e){function i(t){return t?o(t):void 0}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;no;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var o=new i;return o.x=t.x-e.x,o.y=t.y-e.y,o.z=t.z-e.z,o},i.add=function(t,e){var o=new i;return o.x=t.x+e.x,o.y=t.y+e.y,o.z=t.z+e.z,o},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var o=new i;return o.x=t.y*e.z-t.z*e.y,o.y=t.z*e.x-t.x*e.z,o.z=t.x*e.y-t.y*e.x,o},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function o(){this.armLocation=new n,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new n,this.cameraRotation=new n(.5*Math.PI,0,0),this.calculateCameraOrientation()}var n=i(13);o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(10);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){return void 0!==this.index?this.values[this.index]:void 0},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(to&&(o=0),o>this.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.setRange=function(t,e,i,o){this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){function o(t,e,i,d){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof r||i instanceof a)&&i instanceof Object){var c=d;d=i,i=c}var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,throttleRedraw:0,orientation:{axis:"bottom",item:"bottom"},moment:n,width:null,height:null,maxHeight:null,minHeight:null},this.options=s.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return f.timeAxis.step.scale},getStep:function(){return f.timeAxis.step.step},toScreen:f._toScreen.bind(f),toGlobalScreen:f._toGlobalScreen.bind(f),toTime:f._toTime.bind(f),toGlobalTime:f._toGlobalTime.bind(f)}},this.range=new h(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new l(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new u(this.body),this.components.push(this.currentTime),this.itemSet=new p(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){f.emit("click",f.getEventProperties(t))}),this.on("doubletap",function(t){f.emit("doubleClick",f.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){f.emit("contextmenu",f.getEventProperties(t))},this.fitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!f.fitDone)if(f.fitDone=!0,void 0!=f.options.start||void 0!=f.options.end){if(void 0==f.options.start||void 0==f.options.end)var t=f.getItemRange();var e=void 0!=f.options.start?f.options.start:t.min,i=void 0!=f.options.end?f.options.end:t.max;f.setWindow(e,i,{animation:!1})}else f.fit({animation:!1})}),d&&this.setOptions(d),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var n=(i(12),i(20),i(2)),s=i(1),r=i(8),a=i(10),h=i(23),d=i(27),l=i(38),u=i(43),c=i(41),p=i(28),f=i(44),v=i(46)["default"],m=i(46).printStyle,g=i(47).allOptions,y=i(47).configureOptions;o.prototype=new d,o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){var e=v.validate(t,g);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",m),d.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var i=this.itemsData;if(i){var o=this.getSelection();this.setItems(null),this.setItems(i),this.setSelection(o)}}},o.prototype.setItems=function(t){var e;e=t?t instanceof r||t instanceof a?t:new r(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},o.prototype.setGroups=function(t){var e;e=t?t instanceof r||t instanceof a?t:new r(t):null,this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||n>e)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},o.prototype.fit=function(t){var e=t&&void 0!==t.animation?t.animation:!0,i=this.getItemRange();this.range.setRange(i.min,i.max,e)},o.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,r=null;if(null!=i&&null!=o){var a,h,d,l,u;!function(){var e=function(t){return s.convert(t.data.start,"Date").valueOf()},c=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return s.convert(e,"Date").valueOf()};a=o-i,0>=a&&(a=10),h=a/t.props.center.width,s.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var s=e(t),a=c(t),d=s-(t.getWidthLeft()+10)*h,l=a+(t.getWidthRight()+10)*h;i>d&&(i=d,n=t),l>o&&(o=l,r=t)}.bind(t)),n&&r&&(d=n.getWidthLeft()+10,l=r.getWidthRight()+10,u=t.props.center.width-d-l,u>0&&(i=e(n)-d*a/u,o=c(r)+l*a/u))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=s.convert(i.start,"Date").valueOf(),n=s.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=c.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),p=this._toTime(o),f=d?d(p,l,u):p,v=s.getTarget(t),m=null;return null!=r?m="item":null!=h?m="custom-time":s.hasParent(v,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&s.hasParent(v,this.timeAxis2.dom.foreground)?m="axis":s.hasParent(v,this.itemSet.dom.labelSet)?m="group-label":s.hasParent(v,this.currentTime.bar)?m="current-time":s.hasParent(v,this.dom.center)&&(m="background"),{event:t,item:r?r.id:null,group:a?a.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:p,snappedTime:f}},t.exports=o},function(t,e,i){if("undefined"!=typeof window){var o=i(21),n=window.Hammer||i(22);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation;"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ut(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==ft?t.apply(e?e[0]||a:a,e):t}function v(t,e){return t===a?e:t}function m(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function O(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=z(o);e.timeStamp=gt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=R(a,h),P(i,e),e.offsetDirection=A(e.deltaX,e.deltaY);var d=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=mt(d.x)>mt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?B(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==It||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Nt&&(h>Tt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=L(h,d,l);o=u.x,n=u.y,i=mt(u.x)>mt(u.y)?u.x:u.y,s=A(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:vt(i/e),y:vt(o/e)}}function L(t,e,i){return{x:e/t||0,y:i/t||0}}function A(t,e){return t===e?zt:mt(t)>=mt(e)?0>t?Lt:At:0>e?Rt:Ft}function R(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function B(t,e){return F(e[1],e[0],Yt)+F(t[1],t[0],Yt)}function j(t,e){return R(e[0],e[1],Yt)/R(t[0],t[1],Yt)}function H(){this.evEl=Vt,this.evWin=Ut,this.allow=!0,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=Zt,this.evWin=Kt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Qt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(It|Nt)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=ee,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Pt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;na&&(e.push(t),a=e.length-1):n&(It|Nt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Jt={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},Qt="touchstart",$t="touchstart touchmove touchend touchcancel";c(Y,C,{handler:function(t){var e=Jt[t.type];if(e===Et&&(this.started=!0),this.started){var i=G.call(this,t,e);e&(It|Nt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}});var te={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},ee="touchstart touchmove touchend touchcancel";c(V,C,{handler:function(t){var e=te[t.type],i=U.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}),c(q,C,{handler:function(t,e,i){var o=i.pointerType==Mt,n=i.pointerType==Ct;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(It|Nt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=O(pt.style,"touchAction"),oe=ie!==a,ne="compute",se="auto",re="manipulation",ae="none",he="pan-x",de="pan-y";X.prototype={set:function(t){t==ne&&(t=this.compute()),oe&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){f(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){if(!oe){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=b(o,ae),s=b(o,de),r=b(o,he);if(n){var a=1===t.pointers.length,h=t.distance<2,d=t.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&Bt||r&&i&jt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ue=2,ce=4,pe=8,fe=pe,ve=16,me=32;K.prototype={defaults:{},set:function(t){return ut(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===w(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=$(t,this);var e=w(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;pe>o&&e(i.options.event+J(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=pe&&e(i.options.event+J(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=me)},canEmit:function(){for(var t=0;ts?Lt:At,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?zt:0>r?Rt:Ft,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ue||!(this.state&ue)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ue)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(ot,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(It|Nt)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=fe,this.tryEmit()},e.time,this);else if(t.eventType&It)return fe;return me},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===fe&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),c(nt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ue)}}),c(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Bt|jt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Bt|jt)?e=t.overallVelocity:i&Bt?e=t.overallVelocityX:i&jt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&mt(e)>this.options.velocity&&t.eventType&It},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(rt,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanceu,c=r||null===n?n:h+(n-h)*i,m=r||null===s?s:l+(s-l)*i;g=a._applyRange(c,m),d.updateHiddenDates(a.options.moment,a.body,a.options.hiddenDates),v=v||g,g&&a.body.emitter.emit("rangechange",{start:new Date(a.start),end:new Date(a.end),byUser:o}),r?v&&a.body.emitter.emit("rangechanged",{start:new Date(a.start),end:new Date(a.end),byUser:o}):a.animationTimer=setTimeout(b,20)}};return m()}var g=this._applyRange(n,s);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),g){var y={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",y),this.body.emitter.emit("rangechanged",y)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==a&&a>o&&(i=a-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&a>o&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height,a=-i/r*o,h=this.props.touch.start+a,l=this.props.touch.end+a,u=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),c=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(u!=h||c!=l)return this.deltaDifference+=i,this.props.touch.start=u,this.props.touch.end=c,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var p=new Date(this.start),f=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:f,byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=s({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=s(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),r=o-n,a=i-n+(this.props.touch.start-(i-n))*e,h=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=0>=1-e,this.endToFront=0>=e-1;var l=d.snapAwayFromHidden(this.body.hiddenDates,a,1-e,!0),u=d.snapAwayFromHidden(this.body.hiddenDates,h,e-1,!0);l==a&&u==h||(this.props.touch.start=l,this.props.touch.end=u,this.scaleOffset=1-t.scale,a=l,h=u),this.setRange(a,h,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX,i=e-r.getAbsoluteLeft(this.body.dom.centerContainer),o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);h==r&&l==a||(r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e,i){i(20);e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)},e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)},e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch},function(t,e){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),v=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(v),l.day(v),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var m=e.isHidden(i.range.start,i.hiddenDates),g=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==m.hidden&&(y=1==i.range.startToFront?m.startDate-1:m.endDate+1),1==g.hidden&&(b=1==i.range.endToFront?g.startDate-1:g.endDate+1),1!=m.hidden&&1!=g.hidden||i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n=i(12),s=i(20),r=i(24),a=i(1),h=(i(8),i(10),i(23),i(28),i(38)),d=i(39),l=i(26),u=i(41);n(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t); +}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("_change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new s(this.dom.root),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:30}),this.listeners={};var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(o.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),r.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),r.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","throttleRedraw"];if(a.selectiveExtend(e,this.options,t),this.options.orientation={item:void 0,axis:void 0},"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"==typeof t.orientation&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new h(this.body);i.setOptions=function(t){var e=t?a.extend({},t):{};e.orientation="top",h.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&l.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new d(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var n=a.deepExtend({},this.options);this.components.forEach(function(t){a.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._origRedraw?this._redraw():(this._origRedraw=this._redraw.bind(this),this._redraw=a.throttle(this._origRedraw,this.options.throttleRedraw))},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));return i.length>0?i[0].setCustomTitle(t):void 0},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?a.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,a.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=a.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.container.clientWidth){l.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(a.addClassName(o.root,"vis-top"),a.removeClassName(o.root,"vis-bottom")):(a.removeClassName(o.root,"vis-top"),a.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=a.option.asSize(e.maxHeight,""),o.root.style.minHeight=a.option.asSize(e.minHeight,""),o.root.style.width=a.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var r=Math.max(i.left.height,i.center.height,i.right.height),h=i.top.height+r+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=a.option.asSize(e.height,h+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var d=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=d,i.leftContainer.height=d,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var c=this.props.scrollTop;"top"!=e.orientation.item&&(c+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=c+"px",o.left.style.left="0",o.left.style.top=c+"px",o.right.style.left="0",o.right.style.top=c+"px";var p=0==this.props.scrollTop?"hidden":"",f=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=p,o.shadowBottom.style.visibility=f,o.shadowTopLeft.style.visibility=p,o.shadowBottomLeft.style.visibility=f,o.shadowTopRight.style.visibility=p,o.shadowBottomRight.style.visibility=f,this.components.forEach(function(e){t=e.redraw()||t});var v=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange(),e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end),o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=s.option.asSize,o=this.options,n=o.orientation.item,r=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",r=this._orderGroups()||r;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0),this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,u=this._firstGroup(),c={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,v=t.axis+t.item.vertical;return this.groups[g].redraw(e,p,l),s.forEach(this.groups,function(t){var i=t==u?c:p,o=t.redraw(e,i,l);r=o||r,f+=t.height}),f=Math.max(f,v),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.dom.axis.style.left="0",r=this._isResized()||r},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[m];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[m];this.groups[g];if(this.groupsData){if(i){i.hide(),delete this.groups[m];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new l(s,r,this),this.groups[m]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(s.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;s.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(s.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof r||t instanceof a))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;s.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?g:this.groupsData?t.group:m},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){s.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==m||t==g)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);s.extend(n,{height:null}),o=new l(t,i,e),e.groups[t]=o;for(var r in e.items)if(e.items.hasOwnProperty(r)){var a=e.items[r];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!s.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+r)return}else{var a=e.height;if(n+a-r>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var u=this.groupsData.getIds({order:this.options.groupOrder});if(!s.equalArray(u,this.groupTouchParams.originalOrder))for(var h=this.groupsData,c=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(c.length,u.length),v=0,m=0,g=0;f>v;){for(;f>v+m&&f>v+g&&u[v+m]==c[v+g];)v++;if(v+m>=f)break;if(u[v+m]!=p)if(c[v+g]!=p){var y=u.indexOf(c[v+g]),b=h.get(u[v+m]),_=h.get(c[v+g]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=u[v+m];u[v+m]=c[v+g],u[y]=w,v++}else g=1;else m=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=s.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!s.equalArray(n,e.groupTouchParams.originalOrder))for(var r=e.groupTouchParams.originalOrder,a=Math.min(r.length,n.length),h=0;a>h;){for(;a>h&&n[h]==r[h];)h++;if(h>=a)break;var d=n.indexOf(r[h]),l=o.get(n[h]),u=o.get(r[h]);e.options.groupOrderSwap(l,u,o),groupsData.update(l),groupsData.update(u);var c=n[h];n[h]=r[h],n[d]=c,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{var r=s.getAbsoluteLeft(this.dom.frame),a=t.center.x-r,h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var c=this.body.util.toTime(a+this.props.width/5);u.end=i?i(c,d,l):c}u[this.itemsData._fieldId]=s.randomUUID();var p=this.groupFromTarget(t);p&&(u.group=p.groupId),u=this._cloneItemData(u),this.options.onAdd(u,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,u=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&u<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof v||i.push(d.id)}}}else{var c=i.indexOf(e.id);-1==c?i.push(e.id):i.splice(c,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),u=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+u+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var c=a.year();return"vis-year"+c+n(a)+t(c);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(31);i(32);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),u=this.dom.foreground;this.top=u.offsetTop,this.left=u.offsetLeft,this.width=u.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var c=0,p=this.visibleItems.length;p>c;c++){var f=this.visibleItems[c];f.repositionY(e)}return o},o.prototype._calculateSubGroupHeights=function(){if(Object.keys(this.subgroups).length>0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){var r=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(var a=null,h=0,d=t.length;d>h;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){var o,n,s;for(o=0,n=t.length;n>o;o++)if(void 0!==t[o].data.subgroup){s=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].indexe.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(20),i(33));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.dom.content.style.left="0";break;case"right":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(20),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){ +this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(33);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:r.FORMAT,moment:h,timeAxis:null},this.options=n.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n=i(1),s=i(25),r=i(29),a=i(26),h=i(2);o.prototype=new s,o.prototype.setOptions=function(t){t&&(n.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment"],this.options,t),n.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof h.locale?h.locale(t.locale):h.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=n.convert(this.body.range.start,"Number"),i=n.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),s=o-a.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);s-=this.body.util.toTime(0).valueOf();var h=new r(new Date(e),new Date(i),s,this.body.hiddenDates);h.setMoment(this.options.moment),this.options.format&&h.setFormat(this.options.format),this.options.timeAxis&&h.setScale(this.options.timeAxis),this.step=h;var l=this.dom;l.redundant.lines=l.lines,l.redundant.majorTexts=l.majorTexts,l.redundant.minorTexts=l.minorTexts,l.lines=[],l.majorTexts=[],l.minorTexts=[];var u,c,p,f,v,m,g,y,b,_,w=0,x=void 0,k=0,O=1e3;for(h.start(),c=h.getCurrent(),f=this.body.util.toScreen(c);h.hasNext()&&O>k;){k++,v=h.isMajor(),_=h.getClassName(),b=h.getLabelMinor(),u=c,p=f,h.next(),c=h.getCurrent(),m=h.isMajor(),f=this.body.util.toScreen(c),g=w,w=f-p;var M=w>=.4*g;if(this.options.showMinorLabels&&M){var D=this._repaintMinorText(p,b,t,_);D.style.width=w+"px"}v&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),D=this._repaintMajorText(p,h.getLabelMajor(),t,_)),y=this._repaintMajorLine(p,w,t,_)):M?y=this._repaintMinorLine(p,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(k!==O||d||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+O+" lines."),d=!0),this.options.showMajorLabels){var C=this.body.util.toTime(0),S=h.getLabelMajor(C),T=S.length*(this.props.majorCharWidth||10)+10;(void 0==x||x>T)&&this._repaintMajorText(0,S,t,_)}n.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",n.style.left=t-s.minorLineWidth/2+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-minor "+o,n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",n.style.left=t-s.majorLineWidth/2+"px",n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n.className="vis-grid vis-vertical vis-major "+o,n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var d=!1;t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(40),r=i(12),a=i(20),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;122>=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;no&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),s=1;o>s;s++)n[s-1]=e[s];return n.forEach(function(t){r.appendChild(t)}),i.domElements.push(r),{v:i.domElements.length}}();if("object"==typeof r)return r.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*u?(a.min=Math.ceil(e*u),l=a.min,d="range increased"):n>e/u&&(a.min=Math.ceil(e/u),l=a.min,d="range increased"),e*u>s&&1!==s&&(a.max=Math.ceil(e*u),l=a.max,d="range increased"),a.value=e}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var p=this;a.onchange=function(){c.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var f=this._makeLabel(i[i.length-1],i),v=this._makeItem(i,f,a,c);""!==d&&this.popupHistory[v]!==l&&(this.popupHistory[v]=l,this._setupPopup(d,v))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var f=l/this.r,v=a.RGBToHSV(this.color.r,this.color.g,this.color.b);v.h=p,v.s=f;var m=a.HSVToRGB(v.h,v.s,v.v);m.a=this.color.a,this.color=m,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),h):n.distance<=d?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),h):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),h),r=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],r=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&n===!0){var p=t.findInOptions(e,i[u],s.copyAndExtendArray(o,u));r>p.distance&&(a=p.closestMatch,h=p.path,r=p.distance,l=p.indexMatch)}else-1!==u.toLowerCase().indexOf(d)&&(l=u),c=t.levenshteinDistance(e,u),r>c&&(a=u,h=s.copyArray(o),r=c)}return{closestMatch:a,path:h,distance:r,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var s=0;sr?r:t,e=null==e?r:r>e?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-s.getAbsoluteLeft(this.dom.centerContainer),n=i-s.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(o),a=c.customTimeFromTarget(t),h=s.getTarget(t),d=null;s.hasParent(h,this.timeAxis.dom.foreground)?d="axis":this.timeAxis2&&s.hasParent(h,this.timeAxis2.dom.foreground)?d="axis":s.hasParent(h,this.linegraph.yAxisLeft.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.yAxisRight.dom.frame)?d="data-axis":s.hasParent(h,this.linegraph.legendLeft.dom.frame)?d="legend":s.hasParent(h,this.linegraph.legendRight.dom.frame)?d="legend":null!=a?d="custom-time":s.hasParent(h,this.currentTime.bar)?d="current-time":s.hasParent(h,this.dom.center)&&(d="background");var l=[],u=this.linegraph.yAxisLeft,p=this.linegraph.yAxisRight;return u.hidden||l.push(u.screenToValue(n)),p.hidden||l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new f(this,this.dom.container,y)},t.exports=o},function(t,e,i){function o(t,e){this.id=n.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=n.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){ +i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=n.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var n=i(1),s=i(7),r=i(8),a=i(10),h=i(25),d=i(50),l=i(52),u=i(56),c=i(53),p=i(55),f=i(54),v="__ungrouped__";o.prototype=new h,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new d(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))i?-1:1});for(var o=new Array(t.length),s=0;s0){var h={};for(this._getRelevantData(a,h,n,r),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=p.calcPath(h[a[e]],t)),p.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||f.draw(h[a[e]],t,this.framework);break;case"bar":}}}return s.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var s,r,a,h;if(t.length>0)for(r=0;rt?-1:1},u=Math.max(0,n.binarySearchValue(d,i,"x","before",l)),c=Math.min(d.length,n.binarySearchValue(d,o,"x","after",l)+1);0>=c&&(c=d.length);var p=new Array(c-u);for(a=u;c>a;a++)h=s.itemsData[a],p[a-u]=h;e[t[r]]=p}else e[t[r]]=s.itemsData}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;r>l;l+=s){var u=Math.round(l/s);d[u]=n[l]}e[t[o]]=d.splice(0,Math.round(r/s))}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));c.getStackedYRange(a,i,t,"__barStackLeft","left"),c.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],u=0;ut?-1:1});for(var a=0;a=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=Math.round(Math.log(t)/Math.LN10);this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;0>i&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&o-i>u?(s(),d=!1):d=!0}}},i.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},i.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var s=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=n.selectiveBridgeObject(s,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n=i(1),s=(i(7),i(53)),r=i(55),a=i(54);o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&n.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];n.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),n.mergeOptions(this.options,t,"interpolation"),n.mergeOptions(this.options,t,"drawPoints"),n.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof t.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible?!0:t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var h=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:h,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":r.drawIcon(this,o,n,t,e,i);break;case"points":case"point":a.drawIcon(this,o,n,t,e,i);break;case"bar":s.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},o.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;nl;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,d,l,u,c,p,f,v,m,g,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,O=0;k-1>O;O++)o=0==O?t[0]:t[O-1],n=t[O],s=t[O+1],r=k>O+2?t[O+2]:s,d=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),l=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),u=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),m=Math.pow(u,i),y=Math.pow(u,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),w=Math.pow(d,i),_=Math.pow(d,2*i),c=2*_+3*w*g+b,p=2*y+3*m*g+b,f=3*w*(w+g),f>0&&(f=1/f),v=3*m*(m+g),v>0&&(v=1/v),a={screen_x:(-b*o.screen_x+c*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+c*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*v,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*v},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;it?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var i=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[i],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["color","font","fixed","shadow"];if(R.selectiveNotDeepExtend(n,t,e,i),R.mergeOptions(t,e,"shadow",i,o),void 0!==e.color&&null!==e.color){var s=R.parseColor(e.color);R.fillIfDefined(t.color,s)}else i===!0&&null===e.color&&(t.color=R.bridgeObject(o.color));void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=R.bridgeObject(o.font)),void 0!==e.scaling&&R.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)}}]),t}();e["default"]=F,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),u=l[0],c=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=u,t.textAlign="center",this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=c,t.lineJoin="round");for(var v=0;v0&&t.strokeText(this.lines[v],i,h),t.fillText(this.lines[v],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if("horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=r.overrideOpacity(e,o),i=r.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;n>s;s++){var r=t.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"==typeof e.font&&r.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),h>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore()}},{key:"_drawImageAtPosition",value:function(t){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t);var e=this.imageObj.width/this.width/this.body.view.scale;if(e>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");e*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;e>2&&4>a;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,e*=.5,i*=.5,o*=.5,a+=1;t.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else t.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(t)}}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e); +}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(t,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),t.closePath()}this._drawImageAtPosition(t),this._drawImageLabel(t,e,i,o||n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ii.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return e>h}return!1}},{key:"_rotateForLabelAlignment",value:function(t){var e=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(e,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(m.selectiveDeepExtend(n,t,e,i),m.mergeOptions(t,e,"smooth",i,o),m.mergeOptions(t,e,"shadow",i,o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=Object.create(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),m.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)):i===!0&&null===e.scaling&&(t.scaling=Object.create(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var s=e.arrows.toLowerCase();-1!=s.indexOf("to")&&(t.arrows.to.enabled=!0),-1!=s.indexOf("middle")&&(t.arrows.middle.enabled=!0),-1!=s.indexOf("from")&&(t.arrows.from.enabled=!0)}else{if("object"!=typeof e.arrows)throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));m.mergeOptions(t.arrows,e.arrows,"to",i,o.arrows),m.mergeOptions(t.arrows,e.arrows,"middle",i,o.arrows),m.mergeOptions(t.arrows,e.arrows,"from",i,o.arrows)}else i===!0&&null===e.arrows&&(t.arrows=Object.create(o.arrows));if(void 0!==e.color&&null!==e.color)if(t.color=m.deepExtend({},t.color,!0),m.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var r=!1;void 0!==e.color.color&&(t.color.color=e.color.color,r=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,r=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,r=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&r===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=m.bridgeObject(o.color));void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=m.bridgeObject(o.font))}}]),t}();e["default"]=g,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var a=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=r(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=r(e,2),o=i[0],n=i[1],s=t,a=[];a[0]=Math.pow(1-s,3),a[1]=3*s*Math.pow(1-s,2),a[2]=3*Math.pow(s,2)*(1-s),a[3]=Math.pow(s,3);var h=a[0]*this.fromPoint.x+a[1]*o.x+a[2]*n.x+a[3]*this.toPoint.x,d=a[0]*this.fromPoint.y+a[1]*o.y+a[2]*n.y+a[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(l["default"]);e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;il;l++)u=.1*l,m[0]=Math.pow(1-u,3),m[1]=3*u*Math.pow(1-u,2),m[2]=3*Math.pow(u,2)*(1-u),m[3]=Math.pow(u,3),c=m[0]*t+m[1]*r.x+m[2]*a.x+m[3]*i,p=m[0]*e+m[1]*r.y+m[2]*a.y+m[3]*o,l>0&&(d=this._getDistanceToLine(f,v,c,p,n,s),h=h>d?d:h),f=c,v=p;return h}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=l&&h>d;){var v=.5*(l+u);if(i=this.getPoint(v,a),o=Math.atan2(p.y-i.y,p.x-i.x),n=p.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-p.x,2)+Math.pow(i.y-p.y,2)),r=n-s,Math.abs(r)r?f===!1?l=v:u=v:f===!1?u=v:l=v,d++}return i.t=v,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;10>d;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,u,c,n,s),a=a>h?h:a),p=u,f=c;return a}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;io.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,u=void 0,c=void 0,p=void 0,f=void 0,v=void 0,m=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),u=this._pointOnCircle(o,n,l,g),c=Math.atan2(t.y-u.y,t.x-u.x),p=t.distanceToBorder(e,c),f=Math.sqrt(Math.pow(u.x-t.x,2)+Math.pow(u.y-t.y,2)),v=p-f,!(Math.abs(v)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return u.t=g,u}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),u=l[0],c=l[1],p=l[2],f=u-s,v=c-r;h=Math.abs(Math.sqrt(f*f+v*v)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:0>d&&(d=0);var l=t+d*r,u=e+d*a,c=l-n,p=u-s;return Math.sqrt(c*c+p*p)}},{key:"getArrowData",value:function(t,e,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=this.getLineWidth(o,s);if("from"===e?(h=this.from,d=this.to,l=.1,u=this.options.arrows.from.scaleFactor):"to"===e?(h=this.to,d=this.from,l=-.1,u=this.options.arrows.to.scaleFactor):(h=this.to,d=this.from,u=this.options.arrows.middle.scaleFactor),h!=d)if("middle"!==e)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,t,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-p.y,a.x-p.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var f=this._getCircleData(t),v=n(f,3),m=v[0],g=v[1],y=v[2];"from"===e?(a=this.findBorderPosition(this.from,t,{x:m,y:g,low:.25,high:.6,direction:-1}),r=-2*a.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(a=this.findBorderPosition(this.from,t,{x:m,y:g,low:.6,high:1,direction:1}),r=-2*a.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(m,g,y,.175),r=3.9269908169872414)}var b=15*u+3*c,_=a.x-.9*b*Math.cos(r),w=a.y-.9*b*Math.sin(r),x={x:_,y:w};return{point:a,core:x,angle:r,length:b}}},{key:"drawArrowHead",value:function(t,e,i,o){t.strokeStyle=this.getColor(t,e,i),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(e,i),t.arrow(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(t),t.fill(),this.disableShadow(t)}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor=this.options.shadow.color,t.shadowBlur=this.options.shadow.size,t.shadowOffsetX=this.options.shadow.x,t.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=i*s>n?this.from.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=i*n>s?this.from.y:e));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(t=this.from.x,e=this.from.yMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s, +e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y1||this.startedStabilization===!0)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;o>s;s++)t=e[i[s]],t.options.mass>0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;o>h;h++){var d=t[e[h]].x,l=t[e[h]].y;t[e[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var u=Math.abs(r-n)-Math.abs(a-s);u>0?(s-=.5*u,a+=.5*u):(n+=.5*u,r-=.5*u);var c=1e-5,p=Math.max(c,Math.abs(r-n)),f=.5*p,v=.5*(n+r),m=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-f,maxX:v+f,minY:m-f,maxY:m+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var h=0;o>h;h++)i=t[e[h]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii&&(s=.5*u>i?1:c*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,c[r.id].x-=o,c[r.id].y-=n,c[a.id].x+=o,c[a.id].y+=n}}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var o=0;o0&&Object.keys(p).length>0&&v===!0&&o.push({nodes:c,edges:p})}}}for(var u=0;uo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},h={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];r[d]={x:u.x,y:u.y}}var c=e.releaseFunction(h,r);for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];void 0!==c[d]&&(u.x=void 0===c[d].x?o.x:c[d].x,u.y=void 0===c[d].y?o.y:c[d].y)}}else for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];u=n[d],u.options.fixed.x===!1&&(u.x=o.x),u.options.fixed.y===!1&&(u.y=o.y)}for(var d in n)if(n.hasOwnProperty(d)){var u=this.body.nodes[d];u.vx=o.vx,u.vy=o.vy,u.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[d]}for(var p=[],f=0;fo;)e.push(this.body.nodes[t].id),t=this.clusteredNodes[t].clusterId,o++;return e.push(this.body.nodes[t].id),e.reverse(),e}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:t.fromId!=e?t.fromId:t.fromId}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,o=0,n=0;no&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),n0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 0===this.renderTimer&&(this.requiresTimeout===!0?this.renderTimer=window.setTimeout(this._renderStep.bind(this),this.simulationInterval):this.renderTimer=window.requestAnimationFrame(this._renderStep.bind(this)))}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e=this.canvas.frame.canvas.getContext("2d");0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),t===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(e),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext){var t=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:30}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.options.width:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.options.height:arguments[1];t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),i}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=a["default"].getRange(this.body.nodes,t.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a["default"].getRange(this.body.nodes,t.nodes);var l=1.1*Math.abs(i.maxX-i.minX),u=1.1*Math.abs(i.maxY-i.minY),c=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/u;o=p>=c?c:p}o>1?o=1:0===o&&(o=1);var f=a["default"].findCenter(i),v={position:f,scale:o,animation:t.animation};this.moveTo(v)}},{key:"focus",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){ +return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),u=l.nodesChanged,c=l.edgesChanged,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):u===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0):0>h-n&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a>0&&c===!0?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):0>a-o&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;nt&&(t=1e-5),t>10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),t>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(t){if(this.options.zoomView===!0){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,o=e/10;0>e&&(o/=1-o),i*=1+o;var n=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,n)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),o={left:e,top:i,right:e,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,u=[],c=0;c0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,v=void 0,m=[],c=0;c0&&(this.popupObj=f[m[m.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o0?e===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(t){t instanceof s?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof s?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof s?(delete this.selectionObj.nodes[t.id],this._unselectConnectedEdges(t)):delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t]}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t]}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(i===!0)return this.body.emitter.emit("refresh"),d.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={enabled:void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"==typeof t.physics?(this.optionsBackup.physics.enabled=void 0===t.physics.enabled?!0:t.physics.enabled,this.optionsBackup.physics.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var e="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection +},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,e=0;e0){var t=void 0,e=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0===t.options.x&&void 0===t.options.y&&(o=!1),void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(){for(var e=a(),i=0;i0)for(var n=0;n=l&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,o,n]},l=function w(e){var i=t.hierarchicalLevels[e];if(t.hierarchicalChildrenReference[e]){var o=t.hierarchicalChildrenReference[e];if(o.length>0)for(var n=0;n1)for(var a=0;at.options.hierarchical.nodeSpacing){var c={};c[i.id]=!0;var p={};p[o.id]=!0,h(i,c),h(o,p);var f=u(i,o),v=d(c,f),m=s(v,4),g=(m[0],m[1]),y=(m[2],m[3],d(p,f)),b=s(y,4),_=b[0],w=(b[1],b[2]),x=(b[3],Math.abs(g-_));if(x>t.options.hierarchical.nodeSpacing){var k=g-_+t.options.hierarchical.nodeSpacing;k<-w+t.options.hierarchical.nodeSpacing&&(k=-w+t.options.hierarchical.nodeSpacing),0>k&&(t._shiftBlock(o.id,k),e=!0,n===!0&&t._centerParent(o))}}},v=function(o,n){for(var r=n.id,a=n.edges,l=t.hierarchicalLevels[n.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;fr;r++){var a=g(o,i),h=y(o,i),d=40,l=Math.max(-d,Math.min(d,Math.round(a/h)));if(o-=l,void 0!==s[o])break;s[o]=r}return o},_=function(o){var r=t._getPositionForHierarchy(n);if(void 0===i[n.id]){var a={};a[n.id]=!0,h(n,a),i[n.id]=a}var l=d(i[n.id]),u=s(l,4),c=(u[0],u[1],u[2]),p=u[3],f=o-r,v=0;f>0?v=Math.min(f,p-t.options.hierarchical.nodeSpacing):0>f&&(v=-Math.min(-f,c-t.options.hierarchical.nodeSpacing)),0!=v&&(t._shiftBlock(n.id,v),e=!0)},w=function(i){var o=t._getPositionForHierarchy(n),r=t._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,u=o;l>0?u=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):0>l&&(u=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),u!==o&&(t._setPositionForHierarchy(n,u,void 0,!0),e=!0)},x=b(o,p);_(x),x=b(o,a),w(x)},m=function(i){var o=Object.keys(t.distributionOrdering);o=o.reverse();for(var n=0;i>n;n++){e=!1;for(var s=0;sn&&(e=!1,p(f,o,!0),e===!0);n++);},y=function(){for(var e in t.body.nodes)t.body.nodes.hasOwnProperty(e)&&t._centerParent(t.body.nodes[e])},b=function(){var e=Object.keys(t.distributionOrdering);e=e.reverse();for(var i=0;i0)for(var d=0;dg&&Math.abs(g)0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,e),this._validataPositionAndContinue(s,e,r),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){if(void 0!==this.hierarchicalChildrenReference[t]){for(var i=[],o=0;oe&&void 0===this.positionedNodes[n.id]))return;var r=void 0;r=0===o?this._getPositionForHierarchy(this.body.nodes[t]):this._getPositionForHierarchy(i[o-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(n,r,s),this._validataPositionAndContinue(n,s,r)}for(var a=1e9,h=-1e9,o=0;o0&&(e=this._getHubSize(),0!==e);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===e&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var t=this,e=1e5,i=function(t,e,i){},o=function(o,n,s){var r=t.hierarchicalLevels[o.id];void 0===r&&(t.hierarchicalLevels[o.id]=e);var a=i(h["default"].cloneOptions(o,"node"),h["default"].cloneOptions(n,"node"),h["default"].cloneOptions(s,"edge"));t.hierarchicalLevels[n.id]=t.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var t=this,e=1e4,i=function(i,o,n){var s=t.hierarchicalLevels[i.id];void 0===s&&(t.hierarchicalLevels[i.id]=e),n.toId==o.id?t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]+1:t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var t=1e9;for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(t=Math.min(this.hierarchicalLevels[e],t));for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(this.hierarchicalLevels[e]-=t)}},{key:"_generateMap",value:function(){var t=this,e=function(e,i){if(t.hierarchicalLevels[i.id]>t.hierarchicalLevels[e.id]){var o=e.id,n=i.id;void 0===t.hierarchicalChildrenReference[o]&&(t.hierarchicalChildrenReference[o]=[]),t.hierarchicalChildrenReference[o].push(n),void 0===t.hierarchicalParentReference[n]&&(t.hierarchicalParentReference[n]=[]),t.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(e)}},{key:"_crawlNetwork",value:function(t,e){var i=this;void 0===t&&(t=function(){});var o={},n=0,s=function h(e,n){if(void 0===o[e.id]){void 0===i.hierarchicalTrees[e.id]&&(i.hierarchicalTrees[e.id]=n,i.treeIndex=Math.max(n,i.treeIndex)),o[e.id]=!0;for(var s=void 0,r=0;r1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.sort(function(t,e){return t.x-e.x}):t.sort(function(t,e){return t.y-e.y}))}}]),t}();e["default"]=l,t.exports=e["default"]},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e["default"]=h,t.exports=e["default"]},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{"boolean":o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{"boolean":o},edgeMinimization:{"boolean":o},parentCentralization:{"boolean":o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},interpolation:{"boolean":o},useImageSize:{"boolean":o},useBorderWithImage:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;in&&h>a;){a+=1;var m=this._getHighestEnergyNode(i),g=s(m,4);for(u=g[0],l=g[1],c=g[2],p=g[3],f=l,v=0;f>r&&d>v;){v+=1,this._moveNode(u,c,p);var y=this._getEnergy(u),b=s(y,3);f=b[0],c=b[1],p=b[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;ho&&(o=c,n=d,r=p,a=f)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=i[t].x,n=i[t].y,s=0,r=0,a=0;ad;d++)for(var s=0;h-1>s;s++)for(var r=s+1;h>r;r++)o[e[s]][e[r]]=Math.min(o[e[s]][e[r]],o[e[s]][e[d]]+o[e[d]][e[r]]),o[e[r]][e[s]]=o[e[s]][e[r]];return o}}]),t}();e["default"]=n,t.exports=e["default"]},function(t,e){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=t+i,h=e+o,d=t+i/2,l=e+o/2;this.beginPath(),this.moveTo(t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=t+s,u=e+r,c=t+s/2,p=e+r/2,f=e+(o-r/2),v=e+o;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+d,c+h,u,c,u),this.bezierCurveTo(c-h,u,t,p+d,t,p),this.bezierCurveTo(t,p-d,c-h,e,c,e),this.bezierCurveTo(c+h,e,l,p-d,l,p),this.lineTo(l,f),this.bezierCurveTo(l,f+d,c+h,v,c,v),this.bezierCurveTo(c-h,v,t,f+d,t,f),this.lineTo(t,p)},CanvasRenderingContext2D.prototype.arrow=function(t,e,i,o){var n=t-o*Math.cos(i),s=e-o*Math.sin(i),r=t-.9*o*Math.cos(i),a=e-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),u=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(t,e),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,u),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=0>r?-c:c,t+=c,e+=h*c,u===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return A.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(t,e,i){for(var o=e.split("."),n=t;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function d(t,e){for(var i,o,n=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;o>i;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=a(n.attr,t.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function u(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function c(){for(L=T.NULL,z="";" "===N||" "===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||" "===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||" "===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(L=T.DELIMITER);var i=N+s();if(E[i])return L=T.DELIMITER,z=i,n(),void n();if(E[N])return L=T.DELIMITER,z=N,void n();if(r(N)||"-"===N){for(z+=N,n();r(N);)z+=N,n();return"false"===z?z=!1:"true"===z?z=!0:isNaN(Number(z))||(z=Number(z)),void(L=T.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)z+=N,'"'===N&&n(),n();if('"'!=N)throw w('End of string " expected');return n(),void(L=T.IDENTIFIER)}for(L=T.UNKNOWN;""!=N;)z+=N,n();throw new SyntaxError('Syntax error in part "'+x(z,30)+'"')}function p(){var t={};if(o(),c(),"strict"===z&&(t.strict=!0,c()),"graph"!==z&&"digraph"!==z||(t.type=z,c()),L===T.IDENTIFIER&&(t.id=z,c()),"{"!=z)throw w("Angle bracket { expected");if(c(),f(t),"}"!=z)throw w("Angle bracket } expected");if(c(),""!==z)throw w("End of file expected");return c(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==z&&"}"!=z;)v(t),";"===z&&c()}function v(t){var e=m(t);if(e)return void b(t,e);var i=g(t);if(!i){if(L!=T.IDENTIFIER)throw w("Identifier expected");var o=z;if(c(),"="===z){if(c(),L!=T.IDENTIFIER)throw w("Identifier expected");t[o]=z,c()}else y(t,o)}}function m(t){var e=null;if("subgraph"===z&&(e={},e.type="subgraph",c(),L===T.IDENTIFIER&&(e.id=z,c())),"{"===z){if(c(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=z)throw w("Angle bracket } expected");c(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===z?(c(),t.node=_(),"node"):"edge"===z?(c(),t.edge=_(),"edge"):"graph"===z?(c(),t.graph=_(),"graph"):null}function y(t,e){var i={id:e},o=_();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===z||"--"===z;){var i,o=z;c();var n=m(t);if(n)i=n;else{if(L!=T.IDENTIFIER)throw w("Identifier or subgraph expected");i=z,d(t,{id:i}),c()}var s=_(),r=u(t,e,i,o,s);l(t,r),e=i}}function _(){for(var t=null;"["===z;){for(c(),t={};""!==z&&"]"!=z;){if(L!=T.IDENTIFIER)throw w("Attribute name expected");var e=z;if(c(),"="!=z)throw w("Equal sign = expected");if(c(),L!=T.IDENTIFIER)throw w("Attribute value expected");var i=z;h(t,e,i),c(),","==z&&c()}if("]"!=z)throw w("Bracket ] expected");c()}return t}function w(t){return new SyntaxError(t+', got "'+x(z,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",z="",L=T.NULL,A=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=D},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;aObject | Array Get a single item, multiple items, or all items from the DataSet. - Usage examples can be found in section Getting Data, and the available options are described in section Data Selection. + Usage examples can be found in section Getting Data, and the available options are described in section Data Selection. When no item is found, null is returned when a single item was requested, and and empty Array is returned in case of multiple id's. @@ -598,9 +598,9 @@ function (event, properties, senderId) { update, and remove, properties is always an object containing a property items, which contains an array with the ids of the affected - items. The update event has an extra field data - containing the original data of the updated items, i.e. the gives the - changed fields of the changed items. + items. The update event has an extra field oldData + containing the original data of the updated items, and a field data + containing the changes: the properties of the items that are being updated. @@ -1020,4 +1020,4 @@ var positiveBalance = dataset.get({ - \ No newline at end of file + diff --git a/docs/data/dataview.html b/docs/data/dataview.html index bdbd25a1..9a98f7f2 100644 --- a/docs/data/dataview.html +++ b/docs/data/dataview.html @@ -248,7 +248,7 @@ var data = new vis.DataView(dataset, options) Object | Array Get a single item, multiple items, or all items from the DataView. - Usage examples can be found in section Getting Data, and the available options are described in section Data Selection. + Usage examples can be found in section Getting Data, and the available options are described in section Data Selection. When no item is found, null is returned when a single item was requested, and and empty Array is returned in case of multiple id's. diff --git a/docs/graph2d/index.html b/docs/graph2d/index.html index eb1db203..ed062202 100644 --- a/docs/graph2d/index.html +++ b/docs/graph2d/index.html @@ -246,8 +246,6 @@

Graph2d can load data from an Array, a DataSet (offering 2 way data binding), or a DataView (offering one way data binding). Objects are added to this DataSet by using the add() function. - Data points must have properties x, y, and z, - and can optionally have a property style and filter.

Graph2d can be provided with two types of data:

@@ -436,7 +434,7 @@ var options = { barChart.sideBySide Boolean false - If two datapoints of a barchart overlap, they are drawn over eachother by default. If sideBySide is set to true, they will be drawn side by side. + If two datapoints of a barchart overlap, they are drawn over eachother by default. If sideBySide is set to true, they will be drawn side by side, within the same width as a single bar.. See example 10 for more information. When using groups, see example 11. @@ -447,7 +445,12 @@ var options = { 50 The width of the bars. - + + barChart.minWidth + Number + + The minimum width of the bars in pixels: by default the bars get smaller while zooming out to prevent overlap, this value is the minimum width of the bar. Default behavior (when minWidth is not set) is 10% of the bar width. + dataAxis Object @@ -472,12 +475,11 @@ var options = { Function Insert a custom function on how to format the label. The function will receive a numeric value and has to return a string. Default function is: -
+            
 function (value) {
-  return value;
-}
-            
- which does nothing to it. + return ''+value.toPrecision(3); +}
+ dataAxis.left.range.min @@ -578,7 +580,7 @@ drawPoints: { 3. Function: If a function is provided it will be used as a callback. The function may return values from listing 1 or 2.
-drawPoints: function(item, group, graph2d) {
+drawPoints: function(item, group) {
   ...
 }
             
@@ -743,7 +745,7 @@ onRender: function(item, group, graph2d) { stack Boolean true - If stack is enabled, the graphs will be stacked upon eachother when applicable. This currently only works with bar graphs but linegraph support is being worked on. + If stack is enabled, the graphs will be stacked upon each-other when applicable. A group can opt-out of stacking through the "excludeFromStacking" option. shaded @@ -761,7 +763,17 @@ onRender: function(item, group, graph2d) { shaded.orientation String 'bottom' - This determines if the shaded area is at the bottom or at the top of the curve. The options are 'bottom' or 'top'. + This determines if the shaded area is at the bottom or at the top of the curve, or always towards the zero-axis of the graph. + The options are 'zero', 'bottom', 'top', or the special case of 'group'. If group is chosen, the option groupId is required. + See Example 20 what these options look like. + + + + shaded.groupId + String + undefined + The id of the group which should be used as the other shading limit. + shaded.style @@ -786,7 +798,13 @@ onRender: function(item, group, graph2d) { excludeFromLegend Boolean false - Group option only. Excludes the the group from beeing listed in the legend. + Group option only. Excludes the group from being listed in the legend. + + + excludeFromStacking + Boolean + false + Group option only. Excludes the group from being included in the stacking. @@ -927,6 +945,16 @@ function (option, path) { Specifies the maximum height for the Timeline. Can be a number in pixels or a string like "300px". + + maxMinorChars + number + 7 + + Specifies the maximum number of characters that should fit in minor grid labels. + If larger, less and wider grids will be drawn. + + + min Date or Number or String @@ -997,22 +1025,6 @@ function (option, path) { visible. - - showMajorLines - Boolean - true - By default, the timeline shows both minor and major date lines on the - time axis. You can use this option to hide the lines from the major dates. - - - - showMinorLines - Boolean - true - By default, the timeline shows both minor and major date lines on the - time axis. You can use this option to hide the lines from the minor dates. - - start Date or Number or String @@ -1133,6 +1145,12 @@ function (option, path) { + + getDataRange() + Object + Get the range of all the items as an object containing min: Date and max: Date. + + getEventProperties(event) Object @@ -1164,13 +1182,6 @@ function (option, path) { Get the current visible window. Returns an object with properties start: Date and end: Date. - - getItemRange() - Object - Get the range of all the items as an object containing min: Date and max: Date. - - - isGroupVisible(groupId) Boolean @@ -1293,6 +1304,12 @@ Graph2d.off('rangechanged', onChange); Properties Description + + + currentTimeTick + Fired when the current time bar redraws. The rate depends on the zoom level. + + click @@ -1323,16 +1340,14 @@ Graph2d.off('rangechanged', onChange); Fired when double clicked inside the Graph2d. - - finishedRedraw + changed - none. + Has no properties. - Fired after a redraw is complete. When moving the Graph2d around, this could be fired frequently. + Fired once after each graph redraw. - rangechange @@ -1356,6 +1371,7 @@ Graph2d.off('rangechanged', onChange); Fired once after the user has dragged the Graph2d window. + timechange diff --git a/docs/graph3d/index.html b/docs/graph3d/index.html index 43a5e2c8..c0e604a7 100644 --- a/docs/graph3d/index.html +++ b/docs/graph3d/index.html @@ -379,6 +379,13 @@ var options = { The line width of dots, bars and lines. Applicable for all styles. + + dotSizeRatio + number + 0.02 + Ratio of the size of the dots with respect to the width of the graph. + + gridColor string diff --git a/docs/network/edges.html b/docs/network/edges.html index c3ecdf09..42c132ac 100644 --- a/docs/network/edges.html +++ b/docs/network/edges.html @@ -119,6 +119,7 @@ var options = { middle: {enabled: false, scaleFactor:1}, from: {enabled: false, scaleFactor:1} }, + arrowStrikethrough: true, color: { color:'#848484', highlight:'#848484', @@ -166,6 +167,7 @@ var options = { selfReferenceSize:20, shadow:{ enabled: false, + color: 'rgba(0,0,0,0.5)', size:10, x:5, y:5 @@ -253,6 +255,12 @@ network.setOptions(options); Object Exactly the same as the to object but with an arrowhead at the from node of the edge. + + arrowStrikethrough + Boolean + true + When false, the edge stops at the arrow. This can be useful if you have thick lines and you want the arrow to end in a point. Middle arrows are not affected by this. + color Object or String @@ -581,6 +589,12 @@ var options: { in this object are defined. + + shadow.color + String + 'rgba(0,0,0,0.5)' + The color size of the shadow as a string. Supported formats are 'rgb(255,255,255)', 'rgba(255,255,255,1)' and '#FFFFFF'. + shadow.size Number diff --git a/docs/network/index.html b/docs/network/index.html index dc0eaf40..bd7d7c3c 100644 --- a/docs/network/index.html +++ b/docs/network/index.html @@ -333,59 +333,55 @@ network.setOptions(options); clickToUse Boolean false - Locales object. By default only 'en', 'de', 'es' and 'nl' are supported. Take a look - at - the locales - section below for more explaination on how to customize this. + When a Network is configured to be clickToUse, it will react to mouse and touch events only when active. When active, a blue shadow border is displayed around the Network. The network is set active by clicking on it, and is changed to inactive again by clicking outside the Network or by pressing the ESC key. configure Object Object - All options in this object are explained in the configure module. + All options in this object are explained in the configure module. edges Object Object - All options in this object are explained in the edges module. + All options in this object are explained in the edges module. nodes Object Object - All options in this object are explained in the nodes module. + All options in this object are explained in the nodes module. groups Object Object - All options in this object are explained in the groups module. + All options in this object are explained in the groups module. layout Object Object - All options in this object are explained in the layout module. + All options in this object are explained in the layout module. interaction Object Object - All options in this object are explained in the interaction module. + All options in this object are explained in the interaction module. manipulation Object Object - All options in this object are explained in the manipulation module. + All options in this object are explained in the manipulation module. physics Object Object - All options in this object are explained in the physics module. + All options in this object are explained in the physics module. @@ -944,6 +940,28 @@ function releaseFunction (clusterPosition, containedNodesPositions) { before selecting its own objects. Does not fire events. + + setSelection( + Object selection, + [Object options]) + + + Returns: none + Sets the selection, wich must be an object like this: +
+{
+  nodes: [Array of nodeIds],
+  edges: [Array of edgeIds]
+}
+ You can also pass only nodes or edges in selection object. + Available options are: +
+{
+  unselectAll: Boolean,
+  highlightEdges: Boolean
+}
+ + unselectAll() @@ -968,8 +986,8 @@ function releaseFunction (clusterPosition, containedNodesPositions) { getViewPosition() - Returns: Number - Returns the current central focus point of the view. + Returns: Object + Returns the current central focus point of the view in the form: { x: {Number}, y: {Number} } @@ -1301,19 +1319,19 @@ var options = { hoverNode {node: nodeId} - Fired interaction:{hover:true} and the mouse hovers over a node. + Fired if the option interaction:{hover:true} is enabled and the mouse hovers over a node. blurNode {node: nodeId} - Fired interaction:{hover:true} and the mouse moved away from a node it was hovering over before. + Fired if the option interaction:{hover:true} is enabled and the mouse moved away from a node it was hovering over before. hoverEdge {edge: edgeId} - Fired interaction:{hover:true} and the mouse hovers over an edge. + Fired if the option interaction:{hover:true} is enabled and the mouse hovers over an edge. blurEdge {edge: edgeId} - Fired interaction:{hover:true} and the mouse moved away from an edge it was hovering over before. + Fired if the option interaction:{hover:true} is enabled and the mouse moved away from an edge it was hovering over before. zoom {direction:'+'/'-', scale: Number} diff --git a/docs/network/layout.html b/docs/network/layout.html index c43a838c..3b38048b 100644 --- a/docs/network/layout.html +++ b/docs/network/layout.html @@ -105,8 +105,13 @@ var options = { hierarchical: { enabled:false, levelSeparation: 150, - direction: 'UD', // UD, DU, LR, RL - sortMethod: 'hubsize' // hubsize, directed + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: 'UD', // UD, DU, LR, RL + sortMethod: 'hubsize' // hubsize, directed } } } @@ -132,6 +137,13 @@ network.setOptions(options); hierarchicalObject or BooleanObject When true, the layout engine positions the nodes in a hierarchical fashion using default settings. For customization you can supply an object. hierarchical.enabledBooleanfalse Toggle the usage of the hierarchical layout system. If this option is not defined, it is set to true if any of the properties in this object are defined. hierarchical.levelSeparationNumber150 The distance between the different levels. + hierarchical.nodeSpacingNumber100 Minimum distance between nodes on the free axis. This is only for the initial layout. If you enable physics, the node distance there will be the effective node distance. + hierarchical.treeSpacingNumber200 Distance between different trees (independent networks). This is only for the initial layout. If you enable physics, the repulsion model will denote the distance between the trees. + hierarchical.blockShiftingBooleantrue Method for reducing whitespace. Can be used alone or together with edge minimization. Each node will check for whitespace and will shift + it's branch along with it for as far as it can, respecting the nodeSpacing on any level. This is mainly for the initial layout. If you enable physics, they layout will be determined by the physics. This will greatly speed up the stabilization time though! + hierarchical.edgeMinimizationBooleantrue Method for reducing whitespace. Can be used alone or together with block shifting. Enabling block shifting will usually speed up the layout process. + Each node will try to move along its free axis to reduce the total length of it's edges. This is mainly for the initial layout. If you enable physics, they layout will be determined by the physics. This will greatly speed up the stabilization time though! + hierarchical.parentCentralizationBooleantrue When true, the parents nodes will be centered again after the the layout algorithm has been finished. hierarchical.directionString'UD' The direction of the hierarchical layout. The available options are: UD, DU, LR, RL. To simplify: up-down, down-up, left-right, right-left. hierarchical.sortMethodString'hubsize' The algorithm used to ascertain the levels of the nodes based on the data. The possible options are: hubsize, directed.

Hubsize takes the nodes with the most edges and puts them at the top. From that the rest of the hierarchy is evaluated.

diff --git a/docs/network/nodes.html b/docs/network/nodes.html index 0573f8bd..c3cd63a1 100644 --- a/docs/network/nodes.html +++ b/docs/network/nodes.html @@ -108,7 +108,7 @@ var options = { nodes:{ borderWidth: 1, - borderWidthSelected: undefined, + borderWidthSelected: 2, brokenImage:undefined, color: { border: '#2B7CE9', @@ -171,14 +171,18 @@ var options = { }, shadow:{ enabled: false, + color: 'rgba(0,0,0,0.5)', size:10, x:5, y:5 }, shape: 'ellipse', shapeProperties: { - borderDashes: false, // only for shapes with a border - borderRadius: 6 // only for box shape + borderDashes: false, // only for borders + borderRadius: 6, // only for box shape + interpolation: false, // only for image and circularImage shapes + useImageSize: false, // only for image and circularImage shapes + useBorderWithImage: false // only for image shape } size: 25, title: undefined, @@ -224,8 +228,8 @@ network.setOptions(options); borderWidthSelected Number - undefined - The width of the border of the node when it is selected. When undefined, the borderWidth is used + 2 + The width of the border of the node when it is selected. When undefined, the borderWidth * 2 is used. brokenImage @@ -590,6 +594,12 @@ mySize = minSize + diff * scale; in this object are defined. + + shadow.color + String + 'rgba(0,0,0,0.5)' + The color size of the shadow as a string. Supported formats are 'rgb(255,255,255)', 'rgba(255,255,255,1)' and '#FFFFFF'. + shadow.size Number @@ -643,6 +653,13 @@ mySize = minSize + diff * scale; This property is used only for the box shape. It allows you to determine the roundness of the corners of the shape. + + shapeProperties.interpolation + Boolean + true + This property only applies to the image and circularImage shapes. When true, the image is resampled when scaled down, resulting in a nicer image at the cost of computional time. + + shapeProperties.useImageSize Boolean @@ -651,6 +668,15 @@ mySize = minSize + diff * scale; if this is set to true, the image cannot be scaled with the value option! + + shapeProperties.useBorderWithImage + Boolean + false + This property only applies to the image shape. + When true, the color object is used. A rectangle with the background color is + drawn behind it and it has a border. This means all border options are taken into account. + + size Number diff --git a/docs/timeline/index.html b/docs/timeline/index.html index 8a72c416..f0b4d742 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -115,7 +115,7 @@

Example

The following code shows how to create a Timeline and provide it with data. - More examples can be found in the examples directory. + More examples can be found in the timeline examples page.

<!DOCTYPE HTML>
@@ -666,6 +666,14 @@ function (option, path) {
         and set repeat to weekly.
       
     
+
+    
+      itemsAlwaysDraggable
+      boolean
+      false
+      If true, all items in the Timeline are draggable without being selected. If false, only the selected item(s) are draggable.
+    
+
     
       locale
       String
@@ -734,6 +742,16 @@ function (option, path) {
       Specifies the maximum height for the Timeline. Can be a number in pixels or a string like "300px".
     
 
+    
+      maxMinorChars
+      number
+      7
+      
+        Specifies the maximum number of characters that should fit in minor grid labels.
+        If larger, less and wider grids will be drawn.
+      
+    
+
     
       min
       Date or Number or String or Moment
@@ -769,6 +787,16 @@ function (option, path) {
         Only applicable when option selectable is true.
       
     
+    
+    
+      multiselectPerGroup
+      boolean
+      false
+      
+        If true, selecting multiple items using shift+click will only select items residing in the same group as the first selected item.
+        Only applicable when option selectable and multiselect are true.
+      
+    
 
     
       onAdd
@@ -1122,6 +1150,12 @@ document.getElementById('myTimeline').onclick = function (event) {
       
     
 
+    
+      getItemRange()
+      Object
+      Get the range of all the items as an object containing min: Date and max: Date.
+    
+
     
       getSelection()
       number[]
@@ -1196,6 +1230,15 @@ document.getElementById('myTimeline').onclick = function (event) {
       
     
 
+    
+      setCustomTimeTitle(title [, id])
+      none
+      Adjust the title attribute of a custom time bar.
+        Parameter title is the string to be set as title. Use empty string to hide the title completely.
+        Parameter id is the id of the custom time bar, and is undefined by default.
+      
+    
+
     
       setData({
  groups: groups,
  items: items
}) none @@ -1305,6 +1348,11 @@ timeline.off('select', onSelect); Description + + currentTimeTick + Fired when the current time bar redraws. The rate depends on the zoom level. + + click @@ -1344,8 +1392,16 @@ timeline.off('select', onSelect); Fired after the dragging of a group is finished. - + + + changed + + Has no properties. + + Fired once after each graph redraw. + + rangechange @@ -1492,7 +1548,7 @@ var items = new vis.DataSet([ };
- A full example is available here: 08_manipulation_callbacks.html. + A full example is available here: editingItemsCallbacks.html.

Templates

diff --git a/examples/graph2d/06_interpolation.html b/examples/graph2d/06_interpolation.html index 47b31d69..a6ddc53b 100644 --- a/examples/graph2d/06_interpolation.html +++ b/examples/graph2d/06_interpolation.html @@ -88,7 +88,7 @@ } var options = { - dataPoints: false, + drawPoints: false, dataAxis: {visible: false}, legend: true, start: '2014-06-11', diff --git a/examples/graph2d/17_dynamicStyling.html b/examples/graph2d/17_dynamicStyling.html index 665f0636..414313f5 100644 --- a/examples/graph2d/17_dynamicStyling.html +++ b/examples/graph2d/17_dynamicStyling.html @@ -79,7 +79,8 @@ @@ -98,16 +99,16 @@ Fill Opacity @@ -187,7 +188,7 @@ {x: '2014-06-11', y: 10, group: 0}, {x: '2014-06-12', y: 25, group: 0}, {x: '2014-06-13', y: 30, group: 0}, - {x: '2014-06-14', y: 10, group: 0}, + {x: '2014-06-14', y: -10, group: 0}, {x: '2014-06-15', y: 15, group: 0}, {x: '2014-06-16', y: 30, group: 0} ]; @@ -210,7 +211,7 @@ style: 'square' // square, circle }, shaded: { - orientation: 'bottom' // top, bottom + orientation: 'zero' // top, bottom } } }; diff --git a/examples/graph2d/20_shading.html b/examples/graph2d/20_shading.html new file mode 100644 index 00000000..1fc0980c --- /dev/null +++ b/examples/graph2d/20_shading.html @@ -0,0 +1,117 @@ + + + + Graph2d | Shading Example + + + + + + + + +

Graph2d | Shading Example

+
+ This example shows the shading functionality within Graph2d. +
+
+ +
+ + + + diff --git a/examples/network/datasources/largeHierarchicalDataset.js b/examples/network/datasources/largeHierarchicalDataset.js new file mode 100644 index 00000000..ddbb524e --- /dev/null +++ b/examples/network/datasources/largeHierarchicalDataset.js @@ -0,0 +1,2 @@ +var nodes = [{id:0,label:0},{id:1,label:1},{id:2,label:2},{id:3,label:3},{id:4,label:4},{id:5,label:5},{id:6,label:6},{id:7,label:7},{id:8,label:8},{id:9,label:9},{id:10,label:10},{id:11,label:11},{id:12,label:12},{id:13,label:13},{id:14,label:14},{id:15,label:15},{id:16,label:16},{id:17,label:17},{id:18,label:18},{id:19,label:19},{id:20,label:20},{id:21,label:21},{id:22,label:22},{id:23,label:23},{id:24,label:24},{id:25,label:25},{id:26,label:26},{id:27,label:27},{id:28,label:28},{id:29,label:29},{id:30,label:30},{id:31,label:31},{id:32,label:32},{id:33,label:33},{id:34,label:34},{id:35,label:35},{id:36,label:36},{id:37,label:37},{id:38,label:38},{id:39,label:39},{id:40,label:40},{id:41,label:41},{id:42,label:42},{id:43,label:43},{id:44,label:44},{id:45,label:45},{id:46,label:46},{id:47,label:47},{id:48,label:48},{id:49,label:49},{id:50,label:50},{id:51,label:51},{id:52,label:52},{id:53,label:53},{id:54,label:54},{id:55,label:55},{id:56,label:56},{id:57,label:57},{id:58,label:58},{id:59,label:59},{id:60,label:60},{id:61,label:61},{id:62,label:62},{id:63,label:63},{id:64,label:64},{id:65,label:65},{id:66,label:66},{id:67,label:67},{id:68,label:68},{id:69,label:69},{id:70,label:70},{id:71,label:71},{id:72,label:72},{id:73,label:73},{id:74,label:74},{id:75,label:75},{id:76,label:76},{id:77,label:77},{id:78,label:78},{id:79,label:79},{id:80,label:80},{id:81,label:81},{id:82,label:82},{id:83,label:83},{id:84,label:84},{id:85,label:85},{id:86,label:86},{id:87,label:87},{id:88,label:88},{id:89,label:89},{id:90,label:90},{id:91,label:91},{id:92,label:92},{id:93,label:93},{id:94,label:94},{id:95,label:95},{id:96,label:96},{id:97,label:97},{id:98,label:98},{id:99,label:99},{id:100,label:100},{id:101,label:101},{id:102,label:102},{id:103,label:103},{id:104,label:104},{id:105,label:105},{id:106,label:106},{id:107,label:107},{id:108,label:108},{id:109,label:109},{id:110,label:110},{id:111,label:111},{id:112,label:112},{id:113,label:113},{id:114,label:114},{id:115,label:115},{id:116,label:116},{id:117,label:117},{id:118,label:118},{id:119,label:119},{id:120,label:120},{id:121,label:121},{id:122,label:122},{id:123,label:123},{id:124,label:124},{id:125,label:125},{id:126,label:126},{id:127,label:127},{id:128,label:128},{id:129,label:129},{id:130,label:130},{id:131,label:131},{id:132,label:132},{id:133,label:133},{id:134,label:134},{id:135,label:135},{id:136,label:136},{id:137,label:137},{id:138,label:138},{id:139,label:139},{id:140,label:140},{id:141,label:141},{id:142,label:142},{id:143,label:143},{id:144,label:144},{id:145,label:145},{id:146,label:146},{id:147,label:147},{id:148,label:148},{id:149,label:149},{id:150,label:150},{id:151,label:151},{id:152,label:152},{id:153,label:153},{id:154,label:154},{id:155,label:155},{id:156,label:156},{id:157,label:157},{id:158,label:158},{id:159,label:159},{id:160,label:160},{id:161,label:161},{id:162,label:162},{id:163,label:163},{id:164,label:164},{id:165,label:165},{id:166,label:166},{id:167,label:167},{id:168,label:168},{id:169,label:169},{id:170,label:170},{id:171,label:171},{id:172,label:172},{id:173,label:173},{id:174,label:174},{id:175,label:175},{id:176,label:176},{id:177,label:177},{id:178,label:178},{id:179,label:179},{id:180,label:180},{id:181,label:181},{id:182,label:182},{id:183,label:183},{id:184,label:184},{id:185,label:185},{id:186,label:186},{id:187,label:187},{id:188,label:188},{id:189,label:189},{id:190,label:190},{id:191,label:191},{id:192,label:192},{id:193,label:193},{id:194,label:194},{id:195,label:195},{id:196,label:196},{id:197,label:197},{id:198,label:198},{id:199,label:199},{id:200,label:200},{id:201,label:201},{id:202,label:202},{id:203,label:203},{id:204,label:204},{id:205,label:205},{id:206,label:206},{id:207,label:207},{id:208,label:208},{id:209,label:209},{id:210,label:210},{id:211,label:211},{id:212,label:212},{id:213,label:213},{id:214,label:214},{id:215,label:215},{id:216,label:216},{id:217,label:217},{id:218,label:218},{id:219,label:219},{id:220,label:220},{id:221,label:221},{id:222,label:222},{id:223,label:223},{id:224,label:224},{id:225,label:225},{id:226,label:226},{id:227,label:227},{id:228,label:228},{id:229,label:229},{id:230,label:230},{id:231,label:231},{id:232,label:232},{id:233,label:233},{id:234,label:234},{id:235,label:235},{id:236,label:236},{id:237,label:237},{id:238,label:238},{id:239,label:239},{id:240,label:240},{id:241,label:241},{id:242,label:242},{id:243,label:243},{id:244,label:244},{id:245,label:245},{id:246,label:246},{id:247,label:247},{id:248,label:248},{id:249,label:249},{id:250,label:250},{id:251,label:251},{id:252,label:252},{id:253,label:253},{id:254,label:254},{id:255,label:255},{id:256,label:256},{id:257,label:257},{id:258,label:258},{id:259,label:259},{id:260,label:260},{id:261,label:261},{id:262,label:262},{id:263,label:263},{id:264,label:264},{id:265,label:265},{id:266,label:266},{id:267,label:267},{id:268,label:268},{id:269,label:269},{id:270,label:270},{id:271,label:271},{id:272,label:272},{id:273,label:273},{id:274,label:274},{id:275,label:275},{id:276,label:276},{id:277,label:277},{id:278,label:278},{id:279,label:279},{id:280,label:280},{id:281,label:281},{id:282,label:282},{id:283,label:283},{id:284,label:284},{id:285,label:285},{id:286,label:286},{id:287,label:287},{id:288,label:288},{id:289,label:289},{id:290,label:290},{id:291,label:291},{id:292,label:292},{id:293,label:293},{id:294,label:294},{id:295,label:295},{id:296,label:296},{id:297,label:297},{id:298,label:298},{id:299,label:299},{id:300,label:300},{id:301,label:301},{id:302,label:302},{id:303,label:303},{id:304,label:304},{id:305,label:305},{id:306,label:306},{id:307,label:307},{id:308,label:308},{id:309,label:309},{id:310,label:310},{id:311,label:311},{id:312,label:312},{id:313,label:313},{id:314,label:314},{id:315,label:315},{id:316,label:316},{id:317,label:317},{id:318,label:318},{id:319,label:319},{id:320,label:320},{id:321,label:321},{id:322,label:322},{id:323,label:323},{id:324,label:324},{id:325,label:325},{id:326,label:326},{id:327,label:327},{id:328,label:328},{id:329,label:329},{id:330,label:330},{id:331,label:331},{id:332,label:332},{id:333,label:333},{id:334,label:334},{id:335,label:335},{id:336,label:336},{id:337,label:337},{id:338,label:338},{id:339,label:339},{id:340,label:340},{id:341,label:341},{id:342,label:342},{id:343,label:343},{id:344,label:344},{id:345,label:345},{id:346,label:346},{id:347,label:347}]; +var edges = [{from:331,to:0,id:"e0"},{from:331,to:1,id:"e1"},{from:302,to:2,id:"e2"},{from:321,to:3,id:"e3"},{from:323,to:4,id:"e4"},{from:326,to:5,id:"e5"},{from:24,to:6,id:"e6"},{from:327,to:7,id:"e7"},{from:50,to:8,id:"e8"},{from:275,to:9,id:"e9"},{from:327,to:10,id:"e10"},{from:30,to:11,id:"e11"},{from:327,to:12,id:"e12"},{from:270,to:13,id:"e13"},{from:204,to:14,id:"e14"},{from:42,to:15,id:"e15"},{from:140,to:16,id:"e16"},{from:327,to:17,id:"e17"},{from:80,to:18,id:"e18"},{from:24,to:19,id:"e19"},{from:60,to:20,id:"e20"},{from:323,to:21,id:"e21"},{from:328,to:22,id:"e22"},{from:58,to:23,id:"e23"},{from:0,to:24,id:"e24"},{from:50,to:25,id:"e25"},{from:50,to:26,id:"e26"},{from:36,to:27,id:"e27"},{from:36,to:28,id:"e28"},{from:303,to:29,id:"e29"},{from:1,to:30,id:"e30"},{from:326,to:31,id:"e31"},{from:81,to:32,id:"e32"},{from:60,to:33,id:"e33"},{from:62,to:34,id:"e34"},{from:24,to:35,id:"e35"},{from:319,to:36,id:"e36"},{from:58,to:37,id:"e37"},{from:58,to:38,id:"e38"},{from:80,to:39,id:"e39"},{from:35,to:40,id:"e40"},{from:73,to:41,id:"e41"},{from:327,to:42,id:"e42"},{from:301,to:43,id:"e43"},{from:36,to:44,id:"e44"},{from:322,to:45,id:"e45"},{from:69,to:46,id:"e46"},{from:329,to:47,id:"e47"},{from:199,to:48,id:"e48"},{from:321,to:49,id:"e49"},{from:331,to:50,id:"e50"},{from:70,to:51,id:"e51"},{from:329,to:52,id:"e52"},{from:140,to:53,id:"e53"},{from:1,to:54,id:"e54"},{from:330,to:55,id:"e55"},{from:304,to:56,id:"e56"},{from:214,to:57,id:"e57"},{from:84,to:58,id:"e58"},{from:141,to:59,id:"e59"},{from:36,to:60,id:"e60"},{from:323,to:61,id:"e61"},{from:326,to:62,id:"e62"},{from:323,to:63,id:"e63"},{from:328,to:64,id:"e64"},{from:331,to:65,id:"e65"},{from:140,to:66,id:"e66"},{from:24,to:67,id:"e67"},{from:324,to:68,id:"e68"},{from:326,to:69,id:"e69"},{from:323,to:70,id:"e70"},{from:283,to:71,id:"e71"},{from:27,to:72,id:"e72"},{from:50,to:73,id:"e73"},{from:325,to:74,id:"e74"},{from:58,to:75,id:"e75"},{from:323,to:76,id:"e76"},{from:15,to:77,id:"e77"},{from:70,to:78,id:"e78"},{from:22,to:79,id:"e79"},{from:328,to:80,id:"e80"},{from:0,to:81,id:"e81"},{from:322,to:82,id:"e82"},{from:326,to:83,id:"e83"},{from:325,to:84,id:"e84"},{from:331,to:85,id:"e85"},{from:184,to:86,id:"e86"},{from:250,to:87,id:"e87"},{from:321,to:88,id:"e88"},{from:322,to:89,id:"e89"},{from:326,to:90,id:"e90"},{from:162,to:91,id:"e91"},{from:162,to:92,id:"e92"},{from:99,to:93,id:"e93"},{from:320,to:94,id:"e94"},{from:326,to:95,id:"e95"},{from:0,to:96,id:"e96"},{from:326,to:97,id:"e97"},{from:327,to:98,id:"e98"},{from:0,to:99,id:"e99"},{from:327,to:100,id:"e100"},{from:0,to:101,id:"e101"},{from:0,to:102,id:"e102"},{from:328,to:103,id:"e103"},{from:256,to:104,id:"e104"},{from:326,to:105,id:"e105"},{from:81,to:106,id:"e106"},{from:322,to:107,id:"e107"},{from:326,to:108,id:"e108"},{from:8,to:109,id:"e109"},{from:204,to:110,id:"e110"},{from:163,to:111,id:"e111"},{from:330,to:112,id:"e112"},{from:330,to:113,id:"e113"},{from:324,to:114,id:"e114"},{from:42,to:115,id:"e115"},{from:328,to:116,id:"e116"},{from:331,to:117,id:"e117"},{from:321,to:118,id:"e118"},{from:141,to:119,id:"e119"},{from:321,to:120,id:"e120"},{from:330,to:121,id:"e121"},{from:324,to:122,id:"e122"},{from:199,to:123,id:"e123"},{from:302,to:124,id:"e124"},{from:328,to:125,id:"e125"},{from:307,to:126,id:"e126"},{from:321,to:127,id:"e127"},{from:329,to:128,id:"e128"},{from:0,to:129,id:"e129"},{from:331,to:130,id:"e130"},{from:287,to:131,id:"e131"},{from:322,to:132,id:"e132"},{from:1,to:133,id:"e133"},{from:304,to:134,id:"e134"},{from:295,to:135,id:"e135"},{from:42,to:136,id:"e136"},{from:104,to:137,id:"e137"},{from:321,to:138,id:"e138"},{from:204,to:139,id:"e139"},{from:109,to:140,id:"e140"},{from:324,to:141,id:"e141"},{from:70,to:142,id:"e142"},{from:73,to:143,id:"e143"},{from:304,to:144,id:"e144"},{from:0,to:145,id:"e145"},{from:0,to:146,id:"e146"},{from:327,to:147,id:"e147"},{from:141,to:148,id:"e148"},{from:323,to:149,id:"e149"},{from:184,to:150,id:"e150"},{from:324,to:151,id:"e151"},{from:330,to:152,id:"e152"},{from:75,to:153,id:"e153"},{from:328,to:154,id:"e154"},{from:60,to:155,id:"e155"},{from:331,to:156,id:"e156"},{from:153,to:157,id:"e157"},{from:214,to:158,id:"e158"},{from:129,to:159,id:"e159"},{from:331,to:160,id:"e160"},{from:324,to:161,id:"e161"},{from:322,to:162,id:"e162"},{from:195,to:163,id:"e163"},{from:323,to:164,id:"e164"},{from:275,to:165,id:"e165"},{from:58,to:166,id:"e166"},{from:321,to:167,id:"e167"},{from:325,to:168,id:"e168"},{from:324,to:169,id:"e169"},{from:330,to:170,id:"e170"},{from:330,to:171,id:"e171"},{from:331,to:172,id:"e172"},{from:1,to:173,id:"e173"},{from:50,to:174,id:"e174"},{from:327,to:175,id:"e175"},{from:331,to:176,id:"e176"},{from:324,to:177,id:"e177"},{from:204,to:178,id:"e178"},{from:330,to:179,id:"e179"},{from:330,to:180,id:"e180"},{from:50,to:181,id:"e181"},{from:323,to:182,id:"e182"},{from:106,to:183,id:"e183"},{from:70,to:184,id:"e184"},{from:58,to:185,id:"e185"},{from:0,to:186,id:"e186"},{from:321,to:187,id:"e187"},{from:304,to:188,id:"e188"},{from:307,to:189,id:"e189"},{from:140,to:190,id:"e190"},{from:104,to:191,id:"e191"},{from:50,to:192,id:"e192"},{from:60,to:193,id:"e193"},{from:27,to:194,id:"e194"},{from:297,to:195,id:"e195"},{from:321,to:196,id:"e196"},{from:27,to:197,id:"e197"},{from:1,to:198,id:"e198"},{from:321,to:199,id:"e199"},{from:75,to:200,id:"e200"},{from:30,to:201,id:"e201"},{from:50,to:202,id:"e202"},{from:325,to:203,id:"e203"},{from:173,to:204,id:"e204"},{from:307,to:205,id:"e205"},{from:275,to:206,id:"e206"},{from:275,to:207,id:"e207"},{from:331,to:208,id:"e208"},{from:109,to:209,id:"e209"},{from:0,to:210,id:"e210"},{from:327,to:211,id:"e211"},{from:275,to:212,id:"e212"},{from:304,to:213,id:"e213"},{from:104,to:214,id:"e214"},{from:327,to:215,id:"e215"},{from:53,to:216,id:"e216"},{from:60,to:217,id:"e217"},{from:60,to:218,id:"e218"},{from:109,to:219,id:"e219"},{from:192,to:220,id:"e220"},{from:275,to:221,id:"e221"},{from:326,to:222,id:"e222"},{from:250,to:223,id:"e223"},{from:325,to:224,id:"e224"},{from:321,to:225,id:"e225"},{from:1,to:226,id:"e226"},{from:323,to:227,id:"e227"},{from:322,to:228,id:"e228"},{from:327,to:229,id:"e229"},{from:256,to:230,id:"e230"},{from:250,to:231,id:"e231"},{from:330,to:232,id:"e232"},{from:36,to:233,id:"e233"},{from:328,to:234,id:"e234"},{from:323,to:235,id:"e235"},{from:327,to:236,id:"e236"},{from:328,to:237,id:"e237"},{from:250,to:238,id:"e238"},{from:326,to:239,id:"e239"},{from:327,to:240,id:"e240"},{from:329,to:241,id:"e241"},{from:329,to:242,id:"e242"},{from:109,to:243,id:"e243"},{from:323,to:244,id:"e244"},{from:220,to:245,id:"e245"},{from:326,to:246,id:"e246"},{from:267,to:247,id:"e247"},{from:250,to:248,id:"e248"},{from:256,to:249,id:"e249"},{from:322,to:250,id:"e250"},{from:322,to:251,id:"e251"},{from:322,to:252,id:"e252"},{from:109,to:253,id:"e253"},{from:101,to:254,id:"e254"},{from:328,to:255,id:"e255"},{from:331,to:256,id:"e256"},{from:327,to:257,id:"e257"},{from:24,to:258,id:"e258"},{from:124,to:259,id:"e259"},{from:324,to:260,id:"e260"},{from:322,to:261,id:"e261"},{from:322,to:262,id:"e262"},{from:321,to:263,id:"e263"},{from:283,to:264,id:"e264"},{from:318,to:265,id:"e265"},{from:30,to:266,id:"e266"},{from:8,to:267,id:"e267"},{from:140,to:268,id:"e268"},{from:322,to:269,id:"e269"},{from:24,to:270,id:"e270"},{from:9,to:271,id:"e271"},{from:322,to:272,id:"e272"},{from:99,to:273,id:"e273"},{from:24,to:274,id:"e274"},{from:282,to:275,id:"e275"},{from:250,to:276,id:"e276"},{from:70,to:277,id:"e277"},{from:328,to:278,id:"e278"},{from:250,to:279,id:"e279"},{from:50,to:280,id:"e280"},{from:250,to:281,id:"e281"},{from:173,to:282,id:"e282"},{from:320,to:283,id:"e283"},{from:320,to:284,id:"e284"},{from:250,to:285,id:"e285"},{from:325,to:286,id:"e286"},{from:1,to:287,id:"e287"},{from:1,to:288,id:"e288"},{from:109,to:289,id:"e289"},{from:50,to:290,id:"e290"},{from:250,to:291,id:"e291"},{from:195,to:292,id:"e292"},{from:320,to:293,id:"e293"},{from:331,to:294,id:"e294"},{from:331,to:295,id:"e295"},{from:101,to:296,id:"e296"},{from:58,to:297,id:"e297"},{from:24,to:298,id:"e298"},{from:291,to:299,id:"e299"},{from:302,to:300,id:"e300"},{from:323,to:301,id:"e301"},{from:226,to:302,id:"e302"},{from:53,to:303,id:"e303"},{from:110,to:304,id:"e304"},{from:163,to:305,id:"e305"},{from:324,to:306,id:"e306"},{from:304,to:307,id:"e307"},{from:322,to:308,id:"e308"},{from:140,to:309,id:"e309"},{from:323,to:310,id:"e310"},{from:0,to:311,id:"e311"},{from:250,to:312,id:"e312"},{from:30,to:313,id:"e313"},{from:58,to:314,id:"e314"},{from:104,to:315,id:"e315"},{from:75,to:316,id:"e316"},{from:323,to:317,id:"e317"},{from:321,to:318,id:"e318"},{from:256,to:319,id:"e319"},{from:250,to:320,id:"e320"},{from:330,to:321,id:"e321"},{from:327,to:322,id:"e322"},{from:326,to:323,id:"e323"},{from:328,to:324,id:"e324"},{from:328,to:325,id:"e325"},{from:327,to:326,id:"e326"},{from:0,to:327,id:"e327"},{from:70,to:328,id:"e328"},{from:327,to:329,id:"e329"},{from:324,to:330,id:"e330"},{from:69,to:332,id:"e331"},{from:346,to:333,id:"e332"},{from:346,to:334,id:"e333"},{from:337,to:335,id:"e334"},{from:106,to:336,id:"e335"},{from:341,to:337,id:"e336"},{from:341,to:338,id:"e337"},{from:346,to:339,id:"e338"},{from:337,to:340,id:"e339"},{from:334,to:341,id:"e340"},{from:334,to:342,id:"e341"},{from:334,to:343,id:"e342"},{from:334,to:344,id:"e343"},{from:84,to:345,id:"e344"},{from:14,to:346,id:"e345"},{from:331,to:347,id:"e346"}] \ No newline at end of file diff --git a/examples/network/exampleUtil.js b/examples/network/exampleUtil.js index a5554ced..1621a9a5 100644 --- a/examples/network/exampleUtil.js +++ b/examples/network/exampleUtil.js @@ -66,5 +66,68 @@ function getScaleFreeNetwork(nodeCount) { } } + return {nodes:nodes, edges:edges}; +} + +var randomSeed = 764; // Math.round(Math.random()*1000); +function seededRandom() { + var x = Math.sin(randomSeed++) * 10000; + return x - Math.floor(x); +} + +function getScaleFreeNetworkSeeded(nodeCount, seed) { + if (seed) { + randomSeed = Number(seed); + } + var nodes = []; + var edges = []; + var connectionCount = []; + var edgesId = 0; + + + // randomly create some nodes and edges + for (var i = 0; i < nodeCount; i++) { + nodes.push({ + id: i, + label: String(i) + }); + + connectionCount[i] = 0; + + // create edges in a scale-free-network way + if (i == 1) { + var from = i; + var to = 0; + edges.push({ + id: edgesId++, + from: from, + to: to + }); + connectionCount[from]++; + connectionCount[to]++; + } + else if (i > 1) { + var conn = edges.length * 2; + var rand = Math.floor(seededRandom() * conn); + var cum = 0; + var j = 0; + while (j < connectionCount.length && cum < rand) { + cum += connectionCount[j]; + j++; + } + + + var from = i; + var to = j; + edges.push({ + id: edgesId++, + from: from, + to: to + }); + connectionCount[from]++; + connectionCount[to]++; + } + } + return {nodes:nodes, edges:edges}; } \ No newline at end of file diff --git a/examples/network/layout/hierarchicalLayout.html b/examples/network/layout/hierarchicalLayout.html index 4a2539a8..d827814c 100644 --- a/examples/network/layout/hierarchicalLayout.html +++ b/examples/network/layout/hierarchicalLayout.html @@ -57,7 +57,7 @@ } - + diff --git a/examples/network/layout/hierarchicalLayoutMethods.html b/examples/network/layout/hierarchicalLayoutMethods.html index 93a16cf4..51f55267 100644 --- a/examples/network/layout/hierarchicalLayoutMethods.html +++ b/examples/network/layout/hierarchicalLayoutMethods.html @@ -19,7 +19,7 @@ - + - - + // randomly create some nodes and edges + for (var i = 0; i < 15; i++) { + nodes.push({id: i, label: String(i)}); + } + edges.push({from: 0, to: 1}); + edges.push({from: 0, to: 6}); + edges.push({from: 0, to: 13}); + edges.push({from: 0, to: 11}); + edges.push({from: 1, to: 2}); + edges.push({from: 2, to: 3}); + edges.push({from: 2, to: 4}); + edges.push({from: 3, to: 5}); + edges.push({from: 1, to: 10}); + edges.push({from: 1, to: 7}); + edges.push({from: 2, to: 8}); + edges.push({from: 2, to: 9}); + edges.push({from: 3, to: 14}); + edges.push({from: 1, to: 12}); + nodes[0]["level"] = 0; + nodes[1]["level"] = 1; + nodes[2]["level"] = 3; + nodes[3]["level"] = 4; + nodes[4]["level"] = 4; + nodes[5]["level"] = 5; + nodes[6]["level"] = 1; + nodes[7]["level"] = 2; + nodes[8]["level"] = 4; + nodes[9]["level"] = 4; + nodes[10]["level"] = 2; + nodes[11]["level"] = 1; + nodes[12]["level"] = 2; + nodes[13]["level"] = 1; + nodes[14]["level"] = 5; + + + // create a network + var container = document.getElementById('mynetwork'); + var data = { + nodes: nodes, + edges: edges + }; + + var options = { + edges: { + smooth: { + type: 'cubicBezier', + forceDirection: (directionInput.value == "UD" || directionInput.value == "DU") ? 'vertical' : 'horizontal', + roundness: 0.4 + } + }, + layout: { + hierarchical: { + direction: directionInput.value + } + }, + physics:false + }; + network = new vis.Network(container, data, options); + + // add event listeners + network.on('select', function (params) { + document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes; + }); + } + + +

Hierarchical Layout - User-defined

+
- This example shows a user-defined hierarchical layout. If the user defines levels for nodes but does not do so for all nodes, an alert will show up and hierarchical layout will be disabled. Either all or none can be defined. + This example shows a user-defined hierarchical layout. If the user defines levels for nodes but does not do so for + all nodes, an alert will show up and hierarchical layout will be disabled. Either all or none can be defined. If the smooth curves appear to be inverted, the direction of the edge is not in the same direction as the network.

- - - - - + + + + +

@@ -123,22 +128,22 @@ + + + + + +

Hierarchical Layout without Physics

+The hierarchical layout can now be controlled without the use of physics. This is much quicker. The options for this are:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
levelSeparationDistance between levels.
nodeSpacingMinimum distance between nodes on the free axis.
treeSpacingDistance between different trees (independent networks).
blockShiftingMethod for reducing whitespace. Can be used alone or together with edge minimization. Each node will check for whitespace and will shift + it's branch along with it for as far as it can, respecting the nodeSpacing on any level.
edgeMinimizationMethod for reducing whitespace. Can be used alone or together with block shifting. Enabling block shifting will usually speed up the layout process. + Each node will try to move along its free axis to reduce the total length of it's edges.
parentCentralizationWhen true, the parents nodes will be centered again after the the layout algorithm has been finished.
+

+Play with the settings below the network and see how the layout changes! +
+ + + \ No newline at end of file diff --git a/examples/network/nodeStyles/customGroups.html b/examples/network/nodeStyles/customGroups.html index 04eb8e04..bf810bcc 100644 --- a/examples/network/nodeStyles/customGroups.html +++ b/examples/network/nodeStyles/customGroups.html @@ -26,12 +26,9 @@ - + We use an icon once in the DOM so the CSS for fontAwesome is loaded.
diff --git a/examples/network/nodeStyles/imagesWithBorders.html b/examples/network/nodeStyles/imagesWithBorders.html new file mode 100644 index 00000000..fdfe4abf --- /dev/null +++ b/examples/network/nodeStyles/imagesWithBorders.html @@ -0,0 +1,105 @@ + + + + Network | Images With Borders + + + + + + + + + + + + +
+ + diff --git a/examples/network/nodeStyles/shadows.html b/examples/network/nodeStyles/shadows.html index 4a760e89..bfa7b86a 100644 --- a/examples/network/nodeStyles/shadows.html +++ b/examples/network/nodeStyles/shadows.html @@ -87,7 +87,7 @@ {from: 25, to: 24}, {from: 26, to: 25}, {from: 25, to: 7}, - {from: 28, to: 27}, + {from: 28, to: 27, shadow:{color:'rgb(0,255,0)'}}, {from: 29, to: 28}, {from: 28, to: 0} ] diff --git a/examples/network/other/clustering.html b/examples/network/other/clustering.html index 30b745ef..2f2eb8eb 100644 --- a/examples/network/other/clustering.html +++ b/examples/network/other/clustering.html @@ -80,7 +80,7 @@ Click any of the buttons below to cluster the network. On every push the network network.openCluster(params.nodes[0]); } } - }) + }); function clusterByCid() { network.setData(data); @@ -89,7 +89,7 @@ Click any of the buttons below to cluster the network. On every push the network return childOptions.cid == 1; }, clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'} - } + }; network.cluster(clusterOptionsByData); } function clusterByColor() { @@ -111,7 +111,7 @@ Click any of the buttons below to cluster the network. On every push the network return clusterOptions; }, clusterNodeProperties: {id: 'cluster:' + color, borderWidth: 3, shape: 'database', color:color, label:'color:' + color} - } + }; network.cluster(clusterOptionsByData); } } @@ -131,7 +131,7 @@ Click any of the buttons below to cluster the network. On every push the network return clusterOptions; }, clusterNodeProperties: {borderWidth:3, shape:'box', font:{size:30}} - } + }; network.clusterByHubsize(undefined, clusterOptionsByData); } diff --git a/examples/network/other/clusteringByZoom.html b/examples/network/other/clusteringByZoom.html index 40ccf8cc..f7f8fa5a 100644 --- a/examples/network/other/clusteringByZoom.html +++ b/examples/network/other/clusteringByZoom.html @@ -72,7 +72,7 @@ Stabilize when clustering: nodes: nodes, edges: edges }; - var options = {layout: {randomSeed: 8}}; + var options = {layout: {randomSeed: 8}, physics:{adaptiveTimestep:false}}; var network = new vis.Network(container, data, options); // set the first initial zoom level @@ -125,6 +125,8 @@ Stabilize when clustering: } network.clusterOutliers(clusterOptionsByData); if (document.getElementById('stabilizeCheckbox').checked === true) { + // since we use the scale as a unique identifier, we do NOT want to fit after the stabilization + network.setOptions({physics:{stabilization:{fit: false}}}); network.stabilize(); } } @@ -145,6 +147,8 @@ Stabilize when clustering: } clusters = newClusters; if (declustered === true && document.getElementById('stabilizeCheckbox').checked === true) { + // since we use the scale as a unique identifier, we do NOT want to fit after the stabilization + network.setOptions({physics:{stabilization:{fit: false}}}); network.stabilize(); } } diff --git a/examples/network/other/configuration.html b/examples/network/other/configuration.html index 1d8673b2..74bf9e79 100644 --- a/examples/network/other/configuration.html +++ b/examples/network/other/configuration.html @@ -52,6 +52,15 @@ configure: true }; network = new vis.Network(container, data, options); + + network.on("configChange", function() { + // this will immediately fix the height of the configuration + // wrapper to prevent unecessary scrolls in chrome. + // see https://github.com/almende/vis/issues/1568 + var div = container.getElementsByClassName('vis-configuration-wrapper')[0]; + div.style["height"] = div.getBoundingClientRect().height + "px"; + }); + } @@ -64,6 +73,8 @@ You can also supply a custom filter function or filter string. You can press the generate options button below to have an options object printed. You can then use this in the network.

+

Note: The configurator is recreated in the dom tree on input change. This may cause undesired scrolls in your application. In order to avoid this, explicitly set the height of the configurator (see this example's source code). +


diff --git a/gulpfile.js b/gulpfile.js index 360b3bd3..af46d93f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -132,13 +132,13 @@ gulp.task('bundle-css', ['clean'], function () { }); gulp.task('copy', ['clean'], function () { - var network = gulp.src('./lib/network/img/**/*') + var network = gulp.src('./lib/network/img/**/*') .pipe(gulp.dest(DIST + '/img/network')); - var timeline = gulp.src('./lib/timeline/img/**/*') + var timeline = gulp.src('./lib/timeline/img/**/*') .pipe(gulp.dest(DIST + '/img/timeline')); - return merge(network, timeline); + return merge(network, timeline); }); gulp.task('minify', ['bundle-js'], function (cb) { @@ -148,7 +148,7 @@ gulp.task('minify', ['bundle-js'], function (cb) { // any issues when concatenating the file downstream (the file ends // with a comment). fs.writeFileSync(DIST + '/' + VIS_MIN_JS, result.code + '\n'); - fs.writeFileSync(DIST + '/' + VIS_MAP, result.map); + fs.writeFileSync(DIST + '/' + VIS_MAP, result.map.replace(/"\.\/dist\//g, '"')); cb(); }); diff --git a/index.js b/index.js index da6e975c..d84e82e8 100644 --- a/index.js +++ b/index.js @@ -22,8 +22,8 @@ exports.graph3d = { exports.Timeline = require('./lib/timeline/Timeline'); exports.Graph2d = require('./lib/timeline/Graph2d'); exports.timeline = { + Core: require('./lib/timeline/Core'), DateUtil: require('./lib/timeline/DateUtil'), - DataStep: require('./lib/timeline/DataStep'), Range: require('./lib/timeline/Range'), stack: require('./lib/timeline/Stack'), TimeStep: require('./lib/timeline/TimeStep'), @@ -37,13 +37,14 @@ exports.timeline = { RangeItem: require('./lib/timeline/component/item/RangeItem') }, + BackgroundGroup: require('./lib/timeline/component/BackgroundGroup'), Component: require('./lib/timeline/component/Component'), CurrentTime: require('./lib/timeline/component/CurrentTime'), CustomTime: require('./lib/timeline/component/CustomTime'), DataAxis: require('./lib/timeline/component/DataAxis'), + DataScale: require('./lib/timeline/component/DataScale'), GraphGroup: require('./lib/timeline/component/GraphGroup'), Group: require('./lib/timeline/component/Group'), - BackgroundGroup: require('./lib/timeline/component/BackgroundGroup'), ItemSet: require('./lib/timeline/component/ItemSet'), Legend: require('./lib/timeline/component/Legend'), LineGraph: require('./lib/timeline/component/LineGraph'), diff --git a/lib/DOMutil.js b/lib/DOMutil.js index ebedeb21..1e778bc0 100644 --- a/lib/DOMutil.js +++ b/lib/DOMutil.js @@ -36,6 +36,16 @@ exports.cleanupElements = function(JSONcontainer) { } }; +/** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param JSONcontainer + */ +exports.resetElements = function(JSONcontainer) { + exports.prepareElements(JSONcontainer); + exports.cleanupElements(JSONcontainer); + exports.prepareElements(JSONcontainer); +} + /** * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. @@ -149,8 +159,8 @@ exports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, l point.setAttributeNS(null, "height", groupTemplate.size); } - if (groupTemplate.style !== undefined) { - point.setAttributeNS(null, "style", groupTemplate.style); + if (groupTemplate.styles !== undefined) { + point.setAttributeNS(null, "style", groupTemplate.styles); } point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); //handle label diff --git a/lib/DataSet.js b/lib/DataSet.js index e8d1c973..fbc6b92a 100644 --- a/lib/DataSet.js +++ b/lib/DataSet.js @@ -60,15 +60,15 @@ function DataSet (data, options) { // all variants of a Date are internally stored as Date, so we can convert // from everything to everything (also from ISODate to Number for example) if (this._options.type) { - for (var field in this._options.type) { - if (this._options.type.hasOwnProperty(field)) { - var value = this._options.type[field]; - if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { - this._type[field] = 'Date'; - } - else { - this._type[field] = value; - } + var fields = Object.keys(this._options.type); + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = this._options.type[field]; + if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { + this._type[field] = 'Date'; + } + else { + this._type[field] = value; } } } @@ -184,7 +184,7 @@ DataSet.prototype._trigger = function (event, params, senderId) { subscribers = subscribers.concat(this._subscribers['*']); } - for (var i = 0; i < subscribers.length; i++) { + for (var i = 0, len = subscribers.length; i < len; i++) { var subscriber = subscribers[i]; if (subscriber.callback) { subscriber.callback(event, params, senderId || null); @@ -236,6 +236,7 @@ DataSet.prototype.add = function (data, senderId) { DataSet.prototype.update = function (data, senderId) { var addedIds = []; var updatedIds = []; + var oldData = []; var updatedData = []; var me = this; var fieldId = me._fieldId; @@ -243,10 +244,12 @@ DataSet.prototype.update = function (data, senderId) { var addOrUpdate = function (item) { var id = item[fieldId]; if (me._data[id]) { + var oldItem = util.extend({}, me._data[id]); // update item id = me._updateItem(item); updatedIds.push(id); updatedData.push(item); + oldData.push(oldItem); } else { // add new item @@ -258,7 +261,11 @@ DataSet.prototype.update = function (data, senderId) { if (Array.isArray(data)) { // Array for (var i = 0, len = data.length; i < len; i++) { - addOrUpdate(data[i]); + if (data[i] instanceof Object){ + addOrUpdate(data[i]); + } else { + console.warn('Ignoring input item, which is not an object at index ' + i); + } } } else if (data instanceof Object) { @@ -273,7 +280,15 @@ DataSet.prototype.update = function (data, senderId) { this._trigger('add', {items: addedIds}, senderId); } if (updatedIds.length) { - this._trigger('update', {items: updatedIds, data: updatedData}, senderId); + var props = { items: updatedIds, oldData: oldData, data: updatedData }; + // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + this._trigger('update', props, senderId); } return addedIds.concat(updatedIds); @@ -340,13 +355,13 @@ DataSet.prototype.get = function (args) { // build options var type = options && options.type || this._options.type; var filter = options && options.filter; - var items = [], item, itemId, i, len; + var items = [], item, itemIds, itemId, i, len; // convert items if (id != undefined) { // return a single item item = me._getItem(id, type); - if (filter && !filter(item)) { + if (item && filter && !filter(item)) { item = null; } } @@ -361,12 +376,12 @@ DataSet.prototype.get = function (args) { } else { // return all items - for (itemId in this._data) { - if (this._data.hasOwnProperty(itemId)) { - item = me._getItem(itemId, type); - if (!filter || filter(item)) { - items.push(item); - } + itemIds = Object.keys(this._data); + for (i = 0, len = itemIds.length; i < len; i++) { + itemId = itemIds[i]; + item = me._getItem(itemId, type); + if (!filter || filter(item)) { + items.push(item); } } } @@ -391,9 +406,11 @@ DataSet.prototype.get = function (args) { // return the results if (returnType == 'Object') { - var result = {}; - for (i = 0; i < items.length; i++) { - result[items[i].id] = items[i]; + var result = {}, + resultant; + for (i = 0, len = items.length; i < len; i++) { + resultant = items[i]; + result[resultant.id] = resultant; } return result; } @@ -422,6 +439,7 @@ DataSet.prototype.getIds = function (options) { filter = options && options.filter, order = options && options.order, type = options && options.type || this._options.type, + itemIds = Object.keys(data), i, len, id, @@ -434,29 +452,27 @@ DataSet.prototype.getIds = function (options) { if (order) { // create ordered list items = []; - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (filter(item)) { - items.push(item); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + items.push(item); } } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { - ids[i] = items[i][this._fieldId]; + ids.push(items[i][this._fieldId]); } } else { // create unordered list - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (filter(item)) { - ids.push(item[this._fieldId]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + ids.push(item[this._fieldId]); } } } @@ -466,25 +482,23 @@ DataSet.prototype.getIds = function (options) { if (order) { // create an ordered list items = []; - for (id in data) { - if (data.hasOwnProperty(id)) { - items.push(data[id]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + items.push(data[id]); } this._sort(items, order); for (i = 0, len = items.length; i < len; i++) { - ids[i] = items[i][this._fieldId]; + ids.push(items[i][this._fieldId]); } } else { // create unordered list - for (id in data) { - if (data.hasOwnProperty(id)) { - item = data[id]; - ids.push(item[this._fieldId]); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = data[id]; + ids.push(item[this._fieldId]); } } } @@ -514,6 +528,9 @@ DataSet.prototype.forEach = function (callback, options) { var filter = options && options.filter, type = options && options.type || this._options.type, data = this._data, + itemIds = Object.keys(data), + i, + len, item, id; @@ -521,7 +538,7 @@ DataSet.prototype.forEach = function (callback, options) { // execute forEach on ordered list var items = this.get(options); - for (var i = 0, len = items.length; i < len; i++) { + for (i = 0, len = items.length; i < len; i++) { item = items[i]; id = item[this._fieldId]; callback(item, id); @@ -529,12 +546,11 @@ DataSet.prototype.forEach = function (callback, options) { } else { // unordered - for (id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (!filter || filter(item)) { - callback(item, id); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + callback(item, id); } } } @@ -556,15 +572,18 @@ DataSet.prototype.map = function (callback, options) { type = options && options.type || this._options.type, mappedItems = [], data = this._data, + itemIds = Object.keys(data), + i, + len, + id, item; // convert and filter items - for (var id in data) { - if (data.hasOwnProperty(id)) { - item = this._getItem(id, type); - if (!filter || filter(item)) { - mappedItems.push(callback(item, id)); - } + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); } } @@ -588,17 +607,23 @@ DataSet.prototype._filterFields = function (item, fields) { return item; } - var filteredItem = {}; + var filteredItem = {}, + itemFields = Object.keys(item), + len = itemFields.length, + i, + field; if(Array.isArray(fields)){ - for (var field in item) { - if (item.hasOwnProperty(field) && (fields.indexOf(field) != -1)) { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.indexOf(field) != -1) { filteredItem[field] = item[field]; } } }else{ - for (var field in item) { - if (item.hasOwnProperty(field) && fields.hasOwnProperty(field)) { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.hasOwnProperty(field)) { filteredItem[fields[field]] = item[field]; } } @@ -683,7 +708,7 @@ DataSet.prototype._remove = function (id) { } else if (id instanceof Object) { var itemId = id[this._fieldId]; - if (itemId && this._data[itemId]) { + if (itemId !== undefined && this._data[itemId]) { delete this._data[itemId]; this.length--; return itemId; @@ -715,17 +740,19 @@ DataSet.prototype.clear = function (senderId) { */ DataSet.prototype.max = function (field) { var data = this._data, + itemIds = Object.keys(data), max = null, - maxField = null; - - for (var id in data) { - if (data.hasOwnProperty(id)) { - var item = data[id]; - var itemField = item[field]; - if (itemField != null && (!max || itemField > maxField)) { - max = item; - maxField = itemField; - } + maxField = null, + i, + len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!max || itemField > maxField)) { + max = item; + maxField = itemField; } } @@ -739,17 +766,19 @@ DataSet.prototype.max = function (field) { */ DataSet.prototype.min = function (field) { var data = this._data, + itemIds = Object.keys(data), min = null, - minField = null; - - for (var id in data) { - if (data.hasOwnProperty(id)) { - var item = data[id]; - var itemField = item[field]; - if (itemField != null && (!min || itemField < minField)) { - min = item; - minField = itemField; - } + minField = null, + i, + len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!min || itemField < minField)) { + min = item; + minField = itemField; } } @@ -765,31 +794,33 @@ DataSet.prototype.min = function (field) { */ DataSet.prototype.distinct = function (field) { var data = this._data; + var itemIds = Object.keys(data); var values = []; var fieldType = this._options.type && this._options.type[field] || null; var count = 0; - var i; - - for (var prop in data) { - if (data.hasOwnProperty(prop)) { - var item = data[prop]; - var value = item[field]; - var exists = false; - for (i = 0; i < count; i++) { - if (values[i] == value) { - exists = true; - break; - } - } - if (!exists && (value !== undefined)) { - values[count] = value; - count++; + var i, + j, + len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var value = item[field]; + var exists = false; + for (j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; } } + if (!exists && (value !== undefined)) { + values[count] = value; + count++; + } } if (fieldType) { - for (i = 0; i < values.length; i++) { + for (i = 0, len = values.length; i < len; i++) { values[i] = util.convert(values[i], fieldType); } } @@ -819,12 +850,14 @@ DataSet.prototype._addItem = function (item) { item[this._fieldId] = id; } - var d = {}; - for (var field in item) { - if (item.hasOwnProperty(field)) { - var fieldType = this._type[field]; // type may be undefined - d[field] = util.convert(item[field], fieldType); - } + var d = {}, + fields = Object.keys(item), + i, + len; + for (i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); } this._data[id] = d; this.length++; @@ -840,7 +873,7 @@ DataSet.prototype._addItem = function (item) { * @private */ DataSet.prototype._getItem = function (id, types) { - var field, value; + var field, value, i, len; // get the item from the dataset var raw = this._data[id]; @@ -849,22 +882,22 @@ DataSet.prototype._getItem = function (id, types) { } // convert the items field types - var converted = {}; + var converted = {}, + fields = Object.keys(raw); + if (types) { - for (field in raw) { - if (raw.hasOwnProperty(field)) { - value = raw[field]; - converted[field] = util.convert(value, types[field]); - } + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = util.convert(value, types[field]); } } else { // no field types specified, no converting needed - for (field in raw) { - if (raw.hasOwnProperty(field)) { - value = raw[field]; - converted[field] = value; - } + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = value; } } return converted; @@ -890,11 +923,11 @@ DataSet.prototype._updateItem = function (item) { } // merge with current item - for (var field in item) { - if (item.hasOwnProperty(field)) { - var fieldType = this._type[field]; // type may be undefined - d[field] = util.convert(item[field], fieldType); - } + var fields = Object.keys(item); + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); } return id; diff --git a/lib/DataView.js b/lib/DataView.js index 39da84ab..32a7325a 100644 --- a/lib/DataView.js +++ b/lib/DataView.js @@ -35,7 +35,7 @@ function DataView (data, options) { * @param {DataSet | DataView} data */ DataView.prototype.setData = function (data) { - var ids, i, len; + var ids, id, i, len; if (this._data) { // unsubscribe from current dataset @@ -44,12 +44,7 @@ DataView.prototype.setData = function (data) { } // trigger a remove of all items in memory - ids = []; - for (var id in this._ids) { - if (this._ids.hasOwnProperty(id)) { - ids.push(id); - } - } + ids = Object.keys(this._ids); this._ids = {}; this.length = 0; this._trigger('remove', {items: ids}); @@ -84,34 +79,34 @@ DataView.prototype.setData = function (data) { * containing a variable parameter. */ DataView.prototype.refresh = function () { - var id; + var id, i, len; var ids = this._data.getIds({filter: this._options && this._options.filter}); + var oldIds = Object.keys(this._ids); var newIds = {}; var added = []; var removed = []; // check for additions - for (var i = 0; i < ids.length; i++) { + for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; newIds[id] = true; if (!this._ids[id]) { added.push(id); this._ids[id] = true; - this.length++; } } // check for removals - for (id in this._ids) { - if (this._ids.hasOwnProperty(id)) { - if (!newIds[id]) { - removed.push(id); - delete this._ids[id]; - this.length--; - } + for (i = 0, len = oldIds.length; i < len; i++) { + id = oldIds[i]; + if (!newIds[id]) { + removed.push(id); + delete this._ids[id]; } } + this.length += added.length - removed.length; + // trigger events if (added.length) { this._trigger('add', {items: added}); @@ -235,6 +230,49 @@ DataView.prototype.getIds = function (options) { return ids; }; +/** + * Map every item in the dataset. + * @param {function} callback + * @param {Object} [options] Available options: + * {Object.} [type] + * {String[]} [fields] filter fields + * {function} [filter] filter items + * {String | function} [order] Order the items by + * a field name or custom sort function. + * @return {Object[]} mappedItems + */ +DataView.prototype.map = function (callback,options) { + var mappedItems = []; + if (this._data) { + var defaultFilter = this._options.filter; + var filter; + + if (options && options.filter) { + if (defaultFilter) { + filter = function (item) { + return defaultFilter(item) && options.filter(item); + } + } + else { + filter = options.filter; + } + } + else { + filter = defaultFilter; + } + + mappedItems = this._data.map(callback,{ + filter: filter, + order: options && options.order + }); + } + else { + mappedItems = []; + } + + return mappedItems; +}; + /** * Get the DataSet to which this DataView is connected. In case there is a chain * of multiple DataViews, the root DataSet of this chain is returned. diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index 20c7b6b1..9db4fbeb 100644 --- a/lib/graph3d/Graph3d.js +++ b/lib/graph3d/Graph3d.js @@ -96,6 +96,8 @@ function Graph3d(container, data, options) { strokeWidth: 1 // px }; + this.dotSizeRatio = 0.02; // size of the dots as a fraction of the graph width + // create a frame and canvas this.create(); @@ -844,6 +846,8 @@ Graph3d.prototype.setOptions = function (options) { if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel; if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel; + if (options.dotSizeRatio !== undefined) this.dotSizeRatio = options.dotSizeRatio; + if (options.style !== undefined) { var styleNumber = this._getStyleNumber(options.style); if (styleNumber !== -1) { @@ -976,7 +980,7 @@ Graph3d.prototype._redrawLegend = function() { if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { - var dotSize = this.frame.clientWidth * 0.02; + var dotSize = this.frame.clientWidth * this.dotSizeRatio; var widthMin, widthMax; if (this.style === Graph3d.STYLE.DOTSIZE) { @@ -1613,7 +1617,7 @@ Graph3d.prototype._redrawDataDot = function() { this.dataPoints.sort(sortDepth); // draw the datapoints as colored circles - var dotSize = this.frame.clientWidth * 0.02; // px + var dotSize = this.frame.clientWidth * this.dotSizeRatio; // px for (i = 0; i < this.dataPoints.length; i++) { var point = this.dataPoints[i]; @@ -2233,9 +2237,9 @@ Graph3d.prototype._showTooltip = function (dataPoint) { } else { content.innerHTML = '' + - '' + - '' + - '' + + '' + + '' + + '' + '
x:' + dataPoint.point.x + '
y:' + dataPoint.point.y + '
z:' + dataPoint.point.z + '
' + this.xLabel + ':' + dataPoint.point.x + '
' + this.yLabel + ':' + dataPoint.point.y + '
' + this.zLabel + ':' + dataPoint.point.z + '
'; } diff --git a/lib/hammerUtil.js b/lib/hammerUtil.js index 9a2f1615..d20a2376 100644 --- a/lib/hammerUtil.js +++ b/lib/hammerUtil.js @@ -7,23 +7,14 @@ var Hammer = require('./module/hammer'); */ exports.onTouch = function (hammer, callback) { callback.inputHandler = function (event) { - if (event.isFirst && !isTouching) { + if (event.isFirst) { callback(event); - - isTouching = true; - setTimeout(function () { - isTouching = false; - }, 0); } }; hammer.on('hammer.input', callback.inputHandler); }; -// isTouching is true while a touch action is being emitted -// this is a hack to prevent `touch` from being fired twice -var isTouching = false; - /** * Register a release event, taking place after a gesture * @param {Hammer} hammer A hammer instance @@ -31,13 +22,8 @@ var isTouching = false; */ exports.onRelease = function (hammer, callback) { callback.inputHandler = function (event) { - if (event.isFinal && !isReleasing) { + if (event.isFinal) { callback(event); - - isReleasing = true; - setTimeout(function () { - isReleasing = false; - }, 0); } }; @@ -45,11 +31,6 @@ exports.onRelease = function (hammer, callback) { }; -// isReleasing is true while a release action is being emitted -// this is a hack to prevent `release` from being fired twice -var isReleasing = false; - - /** * Unregister a touch event, taking place before a gesture * @param {Hammer} hammer A hammer instance @@ -65,3 +46,20 @@ exports.offTouch = function (hammer, callback) { * @param {function} callback Callback, called as callback(event) */ exports.offRelease = exports.offTouch; + +/** + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer + */ +exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; + + pinchRecognizer.getTouchAction = function() { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; + + return pinchRecognizer; +}; diff --git a/lib/header.js b/lib/header.js index f3aa566d..3045a797 100644 --- a/lib/header.js +++ b/lib/header.js @@ -8,7 +8,7 @@ * @date @@date * * @license - * Copyright (C) 2011-2015 Almende B.V, http://almende.com + * Copyright (C) 2011-2016 Almende B.V, http://almende.com * * Vis.js is dual licensed under both * diff --git a/lib/network/Network.js b/lib/network/Network.js index 57ad80b5..68d10c76 100644 --- a/lib/network/Network.js +++ b/lib/network/Network.js @@ -144,7 +144,6 @@ Emitter(Network.prototype); */ Network.prototype.setOptions = function (options) { if (options !== undefined) { - let errorFound = Validator.validate(options, allOptions); if (errorFound === true) { console.log('%cErrors have been found in the supplied options object.', printStyle); @@ -247,7 +246,7 @@ Network.prototype._updateVisibleIndices = function () { for (let nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { if (nodes[nodeId].options.hidden === false) { - this.body.nodeIndices.push(nodeId); + this.body.nodeIndices.push(nodes[nodeId].id); } } } @@ -255,7 +254,7 @@ Network.prototype._updateVisibleIndices = function () { for (let edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { if (edges[edgeId].options.hidden === false) { - this.body.edgeIndices.push(edgeId); + this.body.edgeIndices.push(edges[edgeId].id); } } } @@ -270,7 +269,6 @@ Network.prototype.bindEventListeners = function () { this.body.emitter.on("_dataChanged", () => { // update shortcut lists this._updateVisibleIndices(); - this.physics.updatePhysicsData(); this.body.emitter.emit("_requestRedraw"); // call the dataUpdated event because the only difference between the two is the updating of the indices this.body.emitter.emit("_dataUpdated"); @@ -467,6 +465,7 @@ Network.prototype.startSimulation = function() {return this.physics.startSim Network.prototype.stopSimulation = function() {return this.physics.stopSimulation.apply(this.physics,arguments);}; Network.prototype.stabilize = function() {return this.physics.stabilize.apply(this.physics,arguments);}; Network.prototype.getSelection = function() {return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments);}; +Network.prototype.setSelection = function() {return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments);}; Network.prototype.getSelectedNodes = function() {return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments);}; Network.prototype.getSelectedEdges = function() {return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments);}; Network.prototype.getNodeAt = function() { @@ -485,7 +484,10 @@ Network.prototype.getEdgeAt = function() { }; Network.prototype.selectNodes = function() {return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);}; Network.prototype.selectEdges = function() {return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);}; -Network.prototype.unselectAll = function() {return this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);}; +Network.prototype.unselectAll = function() { + this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments); + this.redraw(); +}; Network.prototype.redraw = function() {return this.renderer.redraw.apply(this.renderer,arguments);}; Network.prototype.getScale = function() {return this.view.getScale.apply(this.view,arguments);}; Network.prototype.getViewPosition = function() {return this.view.getViewPosition.apply(this.view,arguments);}; diff --git a/lib/network/NetworkUtil.js b/lib/network/NetworkUtil.js new file mode 100644 index 00000000..07fa313f --- /dev/null +++ b/lib/network/NetworkUtil.js @@ -0,0 +1,96 @@ +let util = require("../util"); +class NetworkUtil { + constructor() {} + + /** + * Find the center position of the network considering the bounding boxes + */ + static getRange(allNodes, specificNodes = []) { + var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.shape.boundingBox.left) { + minX = node.shape.boundingBox.left; + } + if (maxX < node.shape.boundingBox.right) { + maxX = node.shape.boundingBox.right; + } + if (minY > node.shape.boundingBox.top) { + minY = node.shape.boundingBox.top; + } // top is negative, bottom is positive + if (maxY < node.shape.boundingBox.bottom) { + maxY = node.shape.boundingBox.bottom; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + } + + /** + * Find the center position of the network + */ + static getRangeCore(allNodes, specificNodes = []) { + var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.x) { + minX = node.x; + } + if (maxX < node.x) { + maxX = node.x; + } + if (minY > node.y) { + minY = node.y; + } // top is negative, bottom is positive + if (maxY < node.y) { + maxY = node.y; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + } + + + /** + * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + * @returns {{x: number, y: number}} + */ + static findCenter(range) { + return {x: (0.5 * (range.maxX + range.minX)), + y: (0.5 * (range.maxY + range.minY))}; + } + + + /** + * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. + * @param item + * @param type + * @returns {{}} + */ + static cloneOptions(item, type) { + let clonedOptions = {}; + if (type === undefined || type === 'node') { + util.deepExtend(clonedOptions, item.options, true); + clonedOptions.x = item.x; + clonedOptions.y = item.y; + clonedOptions.amountOfConnections = item.edges.length; + } + else { + util.deepExtend(clonedOptions, item.options, true); + } + return clonedOptions; + } + +} + +export default NetworkUtil; \ No newline at end of file diff --git a/lib/network/css/network-colorpicker.css b/lib/network/css/network-colorpicker.css index db1d49c6..07406fa8 100644 --- a/lib/network/css/network-colorpicker.css +++ b/lib/network/css/network-colorpicker.css @@ -1,14 +1,17 @@ div.vis-color-picker { position:absolute; + top: 0px; + left: 30px; margin-top:-140px; margin-left:30px; - width:293px; - height:425px; + width:310px; + height:444px; + z-index: 1; padding: 10px; border-radius:15px; background-color:#ffffff; - display:none; + display: none; box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; } @@ -18,8 +21,8 @@ div.vis-color-picker div.vis-arrow { left:5px; } -div.vis-color-picker div.vis-arrow:after, -div.vis-color-picker div.vis-arrow:before { +div.vis-color-picker div.vis-arrow::after, +div.vis-color-picker div.vis-arrow::before { right: 100%; top: 50%; border: solid transparent; diff --git a/lib/network/css/network-manipulation.css b/lib/network/css/network-manipulation.css index 6014a2a2..89c1dc2c 100644 --- a/lib/network/css/network-manipulation.css +++ b/lib/network/css/network-manipulation.css @@ -12,17 +12,18 @@ div.vis-network div.vis-manipulation { background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */ + padding-top:4px; position: absolute; left: 0; top: 0; width: 100%; - height: 30px; + height: 28px; } div.vis-network div.vis-edit-mode { position:absolute; left: 0; - top: 15px; + top: 5px; height: 30px; } @@ -53,8 +54,7 @@ div.vis-network div.vis-close:hover { div.vis-network div.vis-manipulation div.vis-button, div.vis-network div.vis-edit-mode div.vis-button { - position:relative; - top:-7px; + float:left; font-family: verdana; font-size: 12px; -moz-border-radius: 15px; @@ -63,8 +63,8 @@ div.vis-network div.vis-edit-mode div.vis-button { background-position: 0px 0px; background-repeat:no-repeat; height:24px; - margin: 0px 0px 0px 10px; - vertical-align:middle; + margin-left: 10px; + /*vertical-align:middle;*/ cursor: pointer; padding: 0px 8px 0px 8px; -webkit-touch-callout: none; @@ -130,11 +130,12 @@ div.vis-network div.vis-edit-mode div.vis-label { line-height: 25px; } div.vis-network div.vis-manipulation div.vis-separator-line { + float:left; display:inline-block; width:1px; - height:20px; + height:21px; background-color: #bdbdbd; - margin: 5px 7px 0 15px; + margin: 0px 7px 0 15px; /*top right bottom left*/ } /* TODO: is this redundant? diff --git a/lib/network/css/network-tooltip.css b/lib/network/css/network-tooltip.css index 1c5a9a36..f8ababcf 100644 --- a/lib/network/css/network-tooltip.css +++ b/lib/network/css/network-tooltip.css @@ -6,7 +6,7 @@ div.vis-network-tooltip { font-family: verdana; font-size:14px; - font-color:#000000; + color:#000000; background-color: #f5f4ed; -moz-border-radius: 3px; diff --git a/lib/network/modules/Canvas.js b/lib/network/modules/Canvas.js index 0b7fe972..e0f15abb 100644 --- a/lib/network/modules/Canvas.js +++ b/lib/network/modules/Canvas.js @@ -17,6 +17,7 @@ class Canvas { this.resizeTimer = undefined; this.resizeFunction = this._onResize.bind(this); this.cameraState = {}; + this.initialized = false; this.options = {}; this.defaultOptions = { @@ -87,10 +88,16 @@ class Canvas { * Get and store the cameraState * @private */ - _getCameraState() { - this.cameraState.previousWidth = this.frame.canvas.width; - this.cameraState.scale = this.body.view.scale; - this.cameraState.position = this.DOMtoCanvas({x: 0.5 * this.frame.canvas.width, y: 0.5 * this.frame.canvas.height}); + _getCameraState(pixelRatio = this.pixelRatio) { + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } } /** @@ -98,17 +105,36 @@ class Canvas { * @private */ _setCameraState() { - if (this.cameraState.scale !== undefined) { - this.body.view.scale = this.body.view.scale * (this.frame.canvas.clientWidth / this.cameraState.previousWidth); + if (this.cameraState.scale !== undefined && + this.frame.canvas.clientWidth !== 0 && + this.frame.canvas.clientHeight !== 0 && + this.pixelRatio !== 0 && + this.cameraState.previousWidth > 0) { + + let widthRatio = (this.frame.canvas.width / this.pixelRatio) / this.cameraState.previousWidth; + let heightRatio = (this.frame.canvas.height / this.pixelRatio) / this.cameraState.previousHeight; + let newScale = this.cameraState.scale; + + if (widthRatio != 1 && heightRatio != 1) { + newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio); + } + else if (widthRatio != 1) { + newScale = this.cameraState.scale * widthRatio; + } + else if (heightRatio != 1) { + newScale = this.cameraState.scale * heightRatio; + } + this.body.view.scale = newScale; // this comes from the view module. - var viewCenter = this.DOMtoCanvas({ + var currentViewCenter = this.DOMtoCanvas({ x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight }); + var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node - x: viewCenter.x - this.cameraState.position.x, - y: viewCenter.y - this.cameraState.position.y + x: currentViewCenter.x - this.cameraState.position.x, + y: currentViewCenter.y - this.cameraState.position.y }; this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale; this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale; @@ -127,7 +153,7 @@ class Canvas { return value + 'px'; } } - throw new Error('Could not use the value supplie for width or height:' + value); + throw new Error('Could not use the value supplied for width or height:' + value); } @@ -196,7 +222,7 @@ class Canvas { this.hammer = new Hammer(this.frame.canvas); this.hammer.get('pinch').set({enable: true}); // enable to get better response, todo: test on mobile. - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL}); hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)}); this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)}); @@ -227,7 +253,6 @@ class Canvas { * or '30%') */ setSize(width = this.options.width, height = this.options.height) { - this._getCameraState(); width = this._prepareValue(width); height= this._prepareValue(height); @@ -235,7 +260,18 @@ class Canvas { let oldWidth = this.frame.canvas.width; let oldHeight = this.frame.canvas.height; + // update the pixel ratio + let ctx = this.frame.canvas.getContext("2d"); + let previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || + ctx.mozBackingStorePixelRatio || + ctx.msBackingStorePixelRatio || + ctx.oBackingStorePixelRatio || + ctx.backingStorePixelRatio || 1); + if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) { + this._getCameraState(previousRatio); + this.frame.style.width = width; this.frame.style.height = height; @@ -254,6 +290,11 @@ class Canvas { // this would adapt the width of the canvas to the width from 100% if and only if // there is a change. + // store the camera if there is a change in size. + if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio) || this.frame.canvas.height != Math.round(this.frame.canvas.clientHeight * this.pixelRatio)) { + this._getCameraState(previousRatio); + } + if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio)) { this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); emitEvent = true; @@ -271,8 +312,14 @@ class Canvas { oldWidth: Math.round(oldWidth / this.pixelRatio), oldHeight: Math.round(oldHeight / this.pixelRatio) }); + + // restore the camera on change. + this._setCameraState(); } - this._setCameraState(); + + + // set initialized so the get and set camera will work from now on. + this.initialized = true; return emitEvent; }; diff --git a/lib/network/modules/CanvasRenderer.js b/lib/network/modules/CanvasRenderer.js index 8673fdd3..a6c4ae1b 100644 --- a/lib/network/modules/CanvasRenderer.js +++ b/lib/network/modules/CanvasRenderer.js @@ -147,13 +147,11 @@ class CanvasRenderer { this.canvas.setSize(); } - if (this.pixelRatio === undefined) { - this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || - ctx.mozBackingStorePixelRatio || - ctx.msBackingStorePixelRatio || - ctx.oBackingStorePixelRatio || - ctx.backingStorePixelRatio || 1); - } + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || + ctx.mozBackingStorePixelRatio || + ctx.msBackingStorePixelRatio || + ctx.oBackingStorePixelRatio || + ctx.backingStorePixelRatio || 1); ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); @@ -162,6 +160,11 @@ class CanvasRenderer { let h = this.canvas.frame.canvas.clientHeight; ctx.clearRect(0, 0, w, h); + // if the div is hidden, we stop the redraw here for performance. + if (this.canvas.frame.clientWidth === 0) { + return; + } + // set scaling and translation ctx.save(); ctx.translate(this.body.view.translation.x, this.body.view.translation.y); @@ -181,17 +184,13 @@ class CanvasRenderer { this._drawNodes(ctx, hidden); } - if (this.controlNodesActive === true) { - this._drawControlNodes(ctx); - } - ctx.beginPath(); - //this.physics.nodesSolver._debug(ctx,"#F00F0F"); this.body.emitter.emit("afterDrawing", ctx); ctx.closePath(); + + // restore original scaling and translation ctx.restore(); - if (hidden === true) { ctx.clearRect(0, 0, w, h); } @@ -256,7 +255,6 @@ class CanvasRenderer { }); let viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x}; - // draw unselected nodes; for (let i = 0; i < nodeIndices.length; i++) { node = nodes[nodeIndices[i]]; @@ -304,23 +302,6 @@ class CanvasRenderer { } } - /** - * Redraw all edges - * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d'); - * @param {CanvasRenderingContext2D} ctx - * @private - */ - _drawControlNodes(ctx) { - let edges = this.body.edges; - let edgeIndices = this.body.edgeIndices; - let edge; - - for (let i = 0; i < edgeIndices.length; i++) { - edge = edges[edgeIndices[i]]; - edge._drawControlNodes(ctx); - } - } - /** * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because * some implementations (safari and IE9) did not support requestAnimationFrame diff --git a/lib/network/modules/Clustering.js b/lib/network/modules/Clustering.js index 9c1c5889..6b3c14b2 100644 --- a/lib/network/modules/Clustering.js +++ b/lib/network/modules/Clustering.js @@ -1,16 +1,18 @@ let util = require("../../util"); +import NetworkUtil from '../NetworkUtil'; import Cluster from './components/nodes/Cluster' class ClusterEngine { constructor(body) { this.body = body; this.clusteredNodes = {}; + this.clusteredEdges = {}; this.options = {}; this.defaultOptions = {}; util.extend(this.options, this.defaultOptions); - this.body.emitter.on('_resetData', () => {this.clusteredNodes = {};}) + this.body.emitter.on('_resetData', () => {this.clusteredNodes = {}; this.clusteredEdges = {};}) } setOptions(options) { @@ -67,14 +69,14 @@ class ClusterEngine { for (let i = 0; i < this.body.nodeIndices.length; i++) { let nodeId = this.body.nodeIndices[i]; let node = this.body.nodes[nodeId]; - let clonedOptions = this._cloneOptions(node); + let clonedOptions = NetworkUtil.cloneOptions(node); if (options.joinCondition(clonedOptions) === true) { childNodesObj[nodeId] = this.body.nodes[nodeId]; // collect the nodes that will be in the cluster for (let i = 0; i < node.edges.length; i++) { let edge = node.edges[i]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { childEdgesObj[edge.id] = edge; } } @@ -95,7 +97,7 @@ class ClusterEngine { options = this._checkOptions(options); let clusters = []; let usedNodes = {}; - let edge, edges, node, nodeId, visibleEdges; + let edge, edges, node, nodeId, relevantEdgeCount; // collect the nodes that will be in the cluster for (let i = 0; i < this.body.nodeIndices.length; i++) { let childNodesObj = {}; @@ -104,50 +106,45 @@ class ClusterEngine { // if this node is already used in another cluster this session, we do not have to re-evaluate it. if (usedNodes[nodeId] === undefined) { - visibleEdges = 0; + relevantEdgeCount = 0; node = this.body.nodes[nodeId]; edges = []; for (let j = 0; j < node.edges.length; j++) { edge = node.edges[j]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { + if (edge.toId !== edge.fromId) { + relevantEdgeCount++; + } edges.push(edge); } } // this node qualifies, we collect its neighbours to start the clustering process. - if (edges.length === edgeCount) { + if (relevantEdgeCount === edgeCount) { let gatheringSuccessful = true; for (let j = 0; j < edges.length; j++) { edge = edges[j]; let childNodeId = this._getConnectedId(edge, nodeId); - // if unused and if not referencing itself - if (childNodeId !== nodeId && usedNodes[nodeId] === undefined) { - // add the nodes to the list by the join condition. - if (options.joinCondition === undefined) { + // add the nodes to the list by the join condition. + if (options.joinCondition === undefined) { + childEdgesObj[edge.id] = edge; + childNodesObj[nodeId] = this.body.nodes[nodeId]; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + usedNodes[nodeId] = true; + } + else { + let clonedOptions = NetworkUtil.cloneOptions(this.body.nodes[nodeId]); + if (options.joinCondition(clonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[nodeId] = this.body.nodes[nodeId]; - childNodesObj[childNodeId] = this.body.nodes[childNodeId]; usedNodes[nodeId] = true; } else { - let clonedOptions = this._cloneOptions(this.body.nodes[nodeId]); - if (options.joinCondition(clonedOptions) === true) { - childEdgesObj[edge.id] = edge; - childNodesObj[nodeId] = this.body.nodes[nodeId]; - usedNodes[nodeId] = true; - } - else { - // this node does not qualify after all. - gatheringSuccessful = false; - break; - } + // this node does not qualify after all. + gatheringSuccessful = false; + break; } } - else { - // this node does not qualify after all. - gatheringSuccessful = false; - break; - } } // add to the cluster queue @@ -212,16 +209,16 @@ class ClusterEngine { let childNodesObj = {}; let childEdgesObj = {}; let parentNodeId = node.id; - let parentClonedOptions = this._cloneOptions(node); + let parentClonedOptions = NetworkUtil.cloneOptions(node); childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster for (let i = 0; i < node.edges.length; i++) { let edge = node.edges[i]; - if (edge.hiddenByCluster !== true) { + if (this.clusteredEdges[edge.id] === undefined) { let childNodeId = this._getConnectedId(edge, parentNodeId); - // if the child node is not in a cluster (may not be needed now with the edge.hiddenByCluster check) + // if the child node is not in a cluster if (this.clusteredNodes[childNodeId] === undefined) { if (childNodeId !== parentNodeId) { if (options.joinCondition === undefined) { @@ -230,7 +227,7 @@ class ClusterEngine { } else { // clone the options and insert some additional parameters that could be interesting. - let childClonedOptions = this._cloneOptions(this.body.nodes[childNodeId]); + let childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]); if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { childEdgesObj[edge.id] = edge; childNodesObj[childNodeId] = this.body.nodes[childNodeId]; @@ -249,38 +246,17 @@ class ClusterEngine { } - /** - * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. - * @param objId - * @param type - * @returns {{}} - * @private - */ - _cloneOptions(item, type) { - let clonedOptions = {}; - if (type === undefined || type === 'node') { - util.deepExtend(clonedOptions, item.options, true); - clonedOptions.x = item.x; - clonedOptions.y = item.y; - clonedOptions.amountOfConnections = item.edges.length; - } - else { - util.deepExtend(clonedOptions, item.options, true); - } - return clonedOptions; - } - - /** * This function creates the edges that will be attached to the cluster * It looks for edges that are connected to the nodes from the "outside' of the cluster. * * @param childNodesObj - * @param newEdges - * @param options + * @param childEdgesObj + * @param clusterNodeProperties + * @param clusterEdgeProperties * @private */ - _createClusterEdges (childNodesObj, clusterNodeProperties, clusterEdgeProperties) { + _createClusterEdges (childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { let edge, childNodeId, childNode, toId, fromId, otherNodeId; // loop over all child nodes and their edges to find edges going out of the cluster @@ -295,17 +271,23 @@ class ClusterEngine { for (let j = 0; j < childNode.edges.length; j++) { edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process. - if (edge.hiddenByCluster !== true) { - // set up the from and to. - if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here. - toId = clusterNodeProperties.id; - fromId = edge.fromId; - otherNodeId = fromId; + if (this.clusteredEdges[edge.id] === undefined) { + // self-referencing edges will be added to the "hidden" list + if (edge.toId == edge.fromId) { + childEdgesObj[edge.id] = edge; } else { - toId = edge.toId; - fromId = clusterNodeProperties.id; - otherNodeId = toId; + // set up the from and to. + if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here. + toId = clusterNodeProperties.id; + fromId = edge.fromId; + otherNodeId = fromId; + } + else { + toId = edge.toId; + fromId = clusterNodeProperties.id; + otherNodeId = toId; + } } // Only edges from the cluster outwards are being replaced. @@ -321,7 +303,7 @@ class ClusterEngine { for (let j = 0; j < createEdges.length; j++) { let edge = createEdges[j].edge; // copy the options of the edge we will replace - let clonedOptions = this._cloneOptions(edge, 'edge'); + let clonedOptions = NetworkUtil.cloneOptions(edge, 'edge'); // make sure the properties of clusterEdges are superimposed on it util.deepExtend(clonedOptions, clusterEdgeProperties); @@ -340,8 +322,8 @@ class ClusterEngine { newEdge.connect(); // hide the replaced edge + this._backupEdgeOptions(edge); edge.setOptions({physics:false, hidden:true}); - edge.hiddenByCluster = true; } } @@ -369,7 +351,7 @@ class ClusterEngine { * @private */ _cluster(childNodesObj, childEdgesObj, options, refreshData = true) { - // kill condition: no children so can't cluster or only one node in the cluster, dont bother + // kill condition: no children so can't cluster or only one node in the cluster, don't bother if (Object.keys(childNodesObj).length < 2) {return;} // check if this cluster call is not trying to cluster anything that is in another cluster. @@ -389,18 +371,18 @@ class ClusterEngine { let childNodesOptions = []; for (let nodeId in childNodesObj) { if (childNodesObj.hasOwnProperty(nodeId)) { - let clonedOptions = this._cloneOptions(childNodesObj[nodeId]); + let clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]); childNodesOptions.push(clonedOptions); } } - // get clusterproperties based on childNodes + // get cluster properties based on childNodes let childEdgesOptions = []; for (let edgeId in childEdgesObj) { if (childEdgesObj.hasOwnProperty(edgeId)) { // these cluster edges will be removed on creation of the cluster. if (edgeId.substr(0, 12) !== "clusterEdge:") { - let clonedOptions = this._cloneOptions(childEdgesObj[edgeId], 'edge'); + let clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge'); childEdgesOptions.push(clonedOptions); } } @@ -421,7 +403,7 @@ class ClusterEngine { } - // give the clusterNode a postion if it does not have one. + // give the clusterNode a position if it does not have one. let pos = undefined; if (clusterNodeProperties.x === undefined) { pos = this._getClusterPosition(childNodesObj); @@ -446,16 +428,18 @@ class ClusterEngine { // finally put the cluster node into global this.body.nodes[clusterNodeProperties.id] = clusterNode; - // create the new edges that will connect to the cluster - this._createClusterEdges(childNodesObj, clusterNodeProperties, options.clusterEdgeProperties); + // create the new edges that will connect to the cluster, all self-referencing edges will be added to childEdgesObject here. + this._createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // disable the childEdges for (let edgeId in childEdgesObj) { if (childEdgesObj.hasOwnProperty(edgeId)) { if (this.body.edges[edgeId] !== undefined) { let edge = this.body.edges[edgeId]; + // cache the options before changing + this._backupEdgeOptions(edge); + // disable physics and hide the edge edge.setOptions({physics:false, hidden:true}); - edge.hiddenByCluster = true; } } } @@ -477,6 +461,20 @@ class ClusterEngine { } } + _backupEdgeOptions(edge) { + if (this.clusteredEdges[edge.id] === undefined) { + this.clusteredEdges[edge.id] = {physics: edge.options.physics, hidden: edge.options.hidden}; + } + } + + _restoreEdge(edge) { + let originalOptions = this.clusteredEdges[edge.id]; + if (originalOptions !== undefined) { + edge.setOptions({physics: originalOptions.physics, hidden: originalOptions.hidden}); + delete this.clusteredEdges[edge.id]; + } + } + /** * Check if a node is a cluster. @@ -566,8 +564,8 @@ class ClusterEngine { let containedNode = this.body.nodes[nodeId]; containedNode = containedNodes[nodeId]; // inherit position - containedNode.x = clusterNode.x; - containedNode.y = clusterNode.y; + if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;} + if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;} } } } @@ -581,7 +579,7 @@ class ClusterEngine { containedNode.vx = clusterNode.vx; containedNode.vy = clusterNode.vy; - // we use these methods to avoid reinstantiating the shape, which happens with setOptions. + // we use these methods to avoid re-instantiating the shape, which happens with setOptions. containedNode.setOptions({hidden:false, physics:true}); delete this.clusteredNodes[nodeId]; @@ -622,7 +620,7 @@ class ClusterEngine { } // clone the options and apply the cluster options to them - let clonedOptions = this._cloneOptions(transferEdge, 'edge'); + let clonedOptions = NetworkUtil.cloneOptions(transferEdge, 'edge'); util.deepExtend(clonedOptions, otherCluster.clusterEdgeProperties); // apply the edge specific options to it. @@ -639,8 +637,7 @@ class ClusterEngine { else { let replacedEdge = this.body.edges[edge.clusteringEdgeReplacingId]; if (replacedEdge !== undefined) { - replacedEdge.setOptions({physics: true, hidden: false}); - replacedEdge.hiddenByCluster = false; + this._restoreEdge(replacedEdge); } } edge.cleanup(); @@ -652,8 +649,7 @@ class ClusterEngine { // handle the releasing of the edges for (let edgeId in containedEdges) { if (containedEdges.hasOwnProperty(edgeId)) { - let edge = containedEdges[edgeId]; - edge.setOptions({physics: true, hidden: false}); + this._restoreEdge(containedEdges[edgeId]); } } @@ -666,12 +662,12 @@ class ClusterEngine { } getNodesInCluster(clusterId) { - let nodesArray = [] + let nodesArray = []; if (this.isCluster(clusterId) === true) { let containedNodes = this.body.nodes[clusterId].containedNodes; for (let nodeId in containedNodes) { if (containedNodes.hasOwnProperty(nodeId)) { - nodesArray.push(nodeId) + nodesArray.push(this.body.nodes[nodeId].id) } } } @@ -683,7 +679,6 @@ class ClusterEngine { * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node * @param nodeId * @returns {Array} - * @private */ findNode(nodeId) { let stack = []; @@ -691,11 +686,13 @@ class ClusterEngine { let counter = 0; while (this.clusteredNodes[nodeId] !== undefined && counter < max) { - stack.push(this.clusteredNodes[nodeId].node); + stack.push(this.body.nodes[nodeId].id); nodeId = this.clusteredNodes[nodeId].clusterId; counter++; } - stack.push(this.body.nodes[nodeId]); + stack.push(this.body.nodes[nodeId].id); + stack.reverse(); + return stack; } diff --git a/lib/network/modules/EdgesHandler.js b/lib/network/modules/EdgesHandler.js index 41abcb6a..4be26d95 100644 --- a/lib/network/modules/EdgesHandler.js +++ b/lib/network/modules/EdgesHandler.js @@ -27,6 +27,7 @@ class EdgesHandler { middle: {enabled: false, scaleFactor:1}, from: {enabled: false, scaleFactor:1} }, + arrowStrikethrough: true, color: { color:'#848484', highlight:'#848484', @@ -74,6 +75,7 @@ class EdgesHandler { selfReferenceSize:20, shadow:{ enabled: false, + color: 'rgba(0,0,0,0.5)', size:10, x:5, y:5 @@ -106,7 +108,7 @@ class EdgesHandler { let edge = this.body.edges[edgeId]; let edgeData = this.body.data.edges._data[edgeId]; - // only forcilby remove the smooth curve if the data has been set of the edge has the smooth curves defined. + // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined. // this is because a change in the global would not affect these curves. if (edgeData !== undefined) { let edgeOptions = edgeData.smooth; @@ -139,6 +141,10 @@ class EdgesHandler { this.body.emitter.on("refreshEdges", this.refresh.bind(this)); this.body.emitter.on("refresh", this.refresh.bind(this)); this.body.emitter.on("destroy", () => { + util.forEach(this.edgesListeners, (callback, event) => { + if (this.body.data.edges) + this.body.data.edges.off(event, callback); + }); delete this.body.functions.createEdge; delete this.edgesListeners.add; delete this.edgesListeners.update; @@ -153,7 +159,7 @@ class EdgesHandler { // use the parser from the Edge class to fill in all shorthand notations Edge.parseOptions(this.options, options); - // hanlde multiple input cases for color + // handle multiple input cases for color if (options.color !== undefined) { this.markAllEdgesAsDirty(); } diff --git a/lib/network/modules/InteractionHandler.js b/lib/network/modules/InteractionHandler.js index 76cc15cc..b4e6fec4 100644 --- a/lib/network/modules/InteractionHandler.js +++ b/lib/network/modules/InteractionHandler.js @@ -189,7 +189,7 @@ class InteractionHandler { let selectedNodesCount = this.selectionHandler._getSelectedNodeCount(); let currentSelection = this.selectionHandler.getSelection(); - let {nodesChanges, edgesChanges} = this._determineIfDifferent(previousSelection, currentSelection); + let {nodesChanged, edgesChanged} = this._determineIfDifferent(previousSelection, currentSelection); let nodeSelected = false; if (selectedNodesCount - previouslySelectedNodeCount > 0) { // node was selected @@ -197,32 +197,34 @@ class InteractionHandler { selected = true; nodeSelected = true; } - else if (selectedNodesCount - previouslySelectedNodeCount < 0) { // node was deselected + else if (nodesChanged === true && selectedNodesCount > 0) { this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); + this.selectionHandler._generateClickEvent('selectNode', event, pointer); + nodeSelected = true; selected = true; } - else if (selectedNodesCount === previouslySelectedNodeCount && nodesChanges === true) { + else if (selectedNodesCount - previouslySelectedNodeCount < 0) { // node was deselected this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); - this.selectionHandler._generateClickEvent('selectNode', event, pointer); - nodeSelected = true; selected = true; } + // handle the selected edges if (selectedEdgesCount - previouslySelectedEdgeCount > 0 && nodeSelected === false) { // edge was selected this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; } - else if (selectedEdgesCount - previouslySelectedEdgeCount < 0) { // edge was deselected + else if (selectedEdgesCount > 0 && edgesChanged === true) { this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); + this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; } - else if (selectedEdgesCount === previouslySelectedEdgeCount && edgesChanges === true) { + else if (selectedEdgesCount - previouslySelectedEdgeCount < 0) { // edge was deselected this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); - this.selectionHandler._generateClickEvent('selectEdge', event, pointer); selected = true; } + // fire the select event if anything has been selected or deselected if (selected === true) { // select or unselect this.selectionHandler._generateClickEvent('select', event, pointer); @@ -234,35 +236,35 @@ class InteractionHandler { * This function checks if the nodes and edges previously selected have changed. * @param previousSelection * @param currentSelection - * @returns {{nodesChanges: boolean, edgesChanges: boolean}} + * @returns {{nodesChanged: boolean, edgesChanged: boolean}} * @private */ _determineIfDifferent(previousSelection,currentSelection) { - let nodesChanges = false; - let edgesChanges = false; + let nodesChanged = false; + let edgesChanged = false; for (let i = 0; i < previousSelection.nodes.length; i++) { if (currentSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) { - nodesChanges = true; + nodesChanged = true; } } for (let i = 0; i < currentSelection.nodes.length; i++) { if (previousSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) { - nodesChanges = true; + nodesChanged = true; } } for (let i = 0; i < previousSelection.edges.length; i++) { if (currentSelection.edges.indexOf(previousSelection.edges[i]) === -1) { - edgesChanges = true; + edgesChanged = true; } } for (let i = 0; i < currentSelection.edges.length; i++) { if (previousSelection.edges.indexOf(previousSelection.edges[i]) === -1) { - edgesChanges = true; + edgesChanged = true; } } - return {nodesChanges, edgesChanges}; + return {nodesChanged, edgesChanged}; } @@ -487,38 +489,41 @@ class InteractionHandler { * @private */ onMouseWheel(event) { - // retrieve delta - let delta = 0; - if (event.wheelDelta) { /* IE/Opera. */ - delta = event.wheelDelta / 120; - } else if (event.detail) { /* Mozilla case. */ - // In Mozilla, sign of delta is different than in IE. - // Also, delta is multiple of 3. - delta = -event.detail / 3; - } - - // If delta is nonzero, handle it. - // Basically, delta is now positive if wheel was scrolled up, - // and negative, if wheel was scrolled down. - if (delta !== 0) { - - // calculate the new scale - let scale = this.body.view.scale; - let zoom = delta / 10; - if (delta < 0) { - zoom = zoom / (1 - zoom); + if (this.options.zoomView === true) { + // retrieve delta + let delta = 0; + if (event.wheelDelta) { /* IE/Opera. */ + delta = event.wheelDelta / 120; + } + else if (event.detail) { /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; } - scale *= (1 + zoom); - // calculate the pointer location - let pointer = this.getPointer({x:event.clientX, y:event.clientY}); + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta !== 0) { - // apply the new scale - this.zoom(scale, pointer); - } + // calculate the new scale + let scale = this.body.view.scale; + let zoom = delta / 10; + if (delta < 0) { + zoom = zoom / (1 - zoom); + } + scale *= (1 + zoom); + + // calculate the pointer location + let pointer = this.getPointer({x: event.clientX, y: event.clientY}); - // Prevent default actions caused by mouse wheel. - event.preventDefault(); + // apply the new scale + this.zoom(scale, pointer); + } + + // Prevent default actions caused by mouse wheel. + event.preventDefault(); + } } diff --git a/lib/network/modules/KamadaKawai.js b/lib/network/modules/KamadaKawai.js index a54994d3..63d620ff 100644 --- a/lib/network/modules/KamadaKawai.js +++ b/lib/network/modules/KamadaKawai.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 8/7/2015. - */ - // distance finding algorithm import FloydWarshall from "./components/algorithms/FloydWarshall.js" diff --git a/lib/network/modules/LayoutEngine.js b/lib/network/modules/LayoutEngine.js index 8c42ce9a..78ab7f79 100644 --- a/lib/network/modules/LayoutEngine.js +++ b/lib/network/modules/LayoutEngine.js @@ -1,6 +1,7 @@ -'use strict' +'use strict'; let util = require('../../util'); +import NetworkUtil from '../NetworkUtil'; class LayoutEngine { constructor(body) { @@ -8,9 +9,9 @@ class LayoutEngine { this.initialRandomSeed = Math.round(Math.random() * 1000000); this.randomSeed = this.initialRandomSeed; + this.setPhysics = false; this.options = {}; - this.optionsBackup = {}; - + this.optionsBackup = {physics:{}}; this.defaultOptions = { randomSeed: undefined, @@ -18,14 +19,16 @@ class LayoutEngine { hierarchical: { enabled:false, levelSeparation: 150, + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, direction: 'UD', // UD, DU, LR, RL sortMethod: 'hubsize' // hubsize, directed } }; util.extend(this.options, this.defaultOptions); - - this.hierarchicalLevels = {}; - this.bindEventListeners(); } @@ -54,7 +57,7 @@ class LayoutEngine { this.body.emitter.emit('refresh', true); } - // make sure the level seperation is the right way up + // make sure the level separation is the right way up if (this.options.hierarchical.direction === 'RL' || this.options.hierarchical.direction === 'DU') { if (this.options.hierarchical.levelSeparation > 0) { this.options.hierarchical.levelSeparation *= -1; @@ -68,7 +71,7 @@ class LayoutEngine { this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings, we adapt the other options if needed. - return this.adaptAllOptions(allOptions); + return this.adaptAllOptionsForHierarchicalLayout(allOptions); } else { if (prevHierarchicalState === true) { @@ -81,23 +84,25 @@ class LayoutEngine { return allOptions; } - adaptAllOptions(allOptions) { + adaptAllOptionsForHierarchicalLayout(allOptions) { if (this.options.hierarchical.enabled === true) { // set the physics if (allOptions.physics === undefined || allOptions.physics === true) { - allOptions.physics = {solver: 'hierarchicalRepulsion'}; - this.optionsBackup.physics = {solver:'barnesHut'}; + allOptions.physics = { + enabled:this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled, + solver:'hierarchicalRepulsion' + }; + this.optionsBackup.physics.enabled = this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled; + this.optionsBackup.physics.solver = this.optionsBackup.physics.solver || 'barnesHut'; } else if (typeof allOptions.physics === 'object') { - this.optionsBackup.physics = {solver:'barnesHut'}; - if (allOptions.physics.solver !== undefined) { - this.optionsBackup.physics = {solver:allOptions.physics.solver}; - } - allOptions.physics['solver'] = 'hierarchicalRepulsion'; + this.optionsBackup.physics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; + this.optionsBackup.physics.solver = allOptions.physics.solver || 'barnesHut'; + allOptions.physics.solver = 'hierarchicalRepulsion'; } else if (allOptions.physics !== false) { - this.optionsBackup.physics = {solver:'barnesHut'}; - allOptions.physics['solver'] = 'hierarchicalRepulsion'; + this.optionsBackup.physics.solver ='barnesHut'; + allOptions.physics = {solver:'hierarchicalRepulsion'}; } // get the type of static smooth curve in case it is required @@ -128,7 +133,7 @@ class LayoutEngine { this.optionsBackup.edges = { smooth: allOptions.edges.smooth.enabled === undefined ? true : allOptions.edges.smooth.enabled, - type:allOptions.edges.smooth.type === undefined ? 'dynamic' : allOptions.edges.smooth.type, + type: allOptions.edges.smooth.type === undefined ? 'dynamic' : allOptions.edges.smooth.type, roundness: allOptions.edges.smooth.roundness === undefined ? 0.5 : allOptions.edges.smooth.roundness, forceDirection: allOptions.edges.smooth.forceDirection === undefined ? false : allOptions.edges.smooth.forceDirection }; @@ -144,6 +149,7 @@ class LayoutEngine { // force all edges into static smooth curves. Only applies to edges that do not use the global options for smooth. this.body.emitter.emit('_forceDisableDynamicCurves', type); } + return allOptions; } @@ -171,12 +177,12 @@ class LayoutEngine { /** - * Use KamadaKawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we + * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we * cluster them first to reduce the amount. */ layoutNetwork() { if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) { - // first check if we should KamadaKawai to layout. The threshold is if less than half of the visible + // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible // nodes have predefined positions we use this. let positionDefined = 0; for (let i = 0; i < this.body.nodeIndices.length; i++) { @@ -188,28 +194,32 @@ class LayoutEngine { // if less than half of the nodes have a predefined position we continue if (positionDefined < 0.5 * this.body.nodeIndices.length) { - let MAX_LEVELS = 200; - let levels = 0; + let MAX_LEVELS = 10; + let level = 0; let clusterThreshold = 100; // if there are a lot of nodes, we cluster before we run the algorithm. if (this.body.nodeIndices.length > clusterThreshold) { let startLength = this.body.nodeIndices.length; while (this.body.nodeIndices.length > clusterThreshold) { - levels += 1; + //console.time("clustering") + level += 1; let before = this.body.nodeIndices.length; // if there are many nodes we do a hubsize cluster - if (levels % 3 === 0) { + if (level % 3 === 0) { this.body.modules.clustering.clusterBridges(); } else { this.body.modules.clustering.clusterOutliers(); } let after = this.body.nodeIndices.length; - if ((before == after && levels % 3 !== 0) || levels > MAX_LEVELS) { + if ((before == after && level % 3 !== 0) || level > MAX_LEVELS) { this._declusterAll(); - console.info("This network could not be positioned by this version of the improved layout algorithm."); + this.body.emitter.emit("_layoutFailed"); + console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance."); return; } + //console.timeEnd("clustering") + //console.log(level,after) } // increase the size of the edges this.body.modules.kamadaKawai.setOptions({springLength: Math.max(150, 2 * startLength)}) @@ -218,6 +228,16 @@ class LayoutEngine { // position the system for these nodes and edges this.body.modules.kamadaKawai.solve(this.body.nodeIndices, this.body.edgeIndices, true); + // shift to center point + this._shiftToCenter(); + + // perturb the nodes a little bit to force the physics to kick in + let offset = 70; + for (let i = 0; i < this.body.nodeIndices.length; i++) { + this.body.nodes[this.body.nodeIndices[i]].x += (0.5 - this.seededRandom())*offset; + this.body.nodes[this.body.nodeIndices[i]].y += (0.5 - this.seededRandom())*offset; + } + // uncluster all clusters this._declusterAll(); @@ -227,6 +247,19 @@ class LayoutEngine { } } + /** + * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view + * @private + */ + _shiftToCenter() { + let range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices); + let center = NetworkUtil.findCenter(range); + for (let i = 0; i < this.body.nodeIndices.length; i++) { + this.body.nodes[this.body.nodeIndices[i]].x -= center.x; + this.body.nodes[this.body.nodeIndices[i]].y -= center.y; + } + } + _declusterAll() { let clustersPresent = true; while (clustersPresent === true) { @@ -258,13 +291,26 @@ class LayoutEngine { // get the size of the largest hubs and check if the user has defined a level for a node. let node, nodeId; let definedLevel = false; + let definedPositions = true; let undefinedLevel = false; this.hierarchicalLevels = {}; - this.nodeSpacing = 100; + this.lastNodeOnLevel = {}; + this.hierarchicalChildrenReference = {}; + this.hierarchicalParentReference = {}; + this.hierarchicalTrees = {}; + this.treeIndex = -1; + + this.distributionOrdering = {}; + this.distributionIndex = {}; + this.distributionOrderingPresence = {}; + for (nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { node = this.body.nodes[nodeId]; + if (node.options.x === undefined && node.options.y === undefined) { + definedPositions = false; + } if (node.options.level !== undefined) { definedLevel = true; this.hierarchicalLevels[nodeId] = node.options.level; @@ -281,28 +327,522 @@ class LayoutEngine { return; } else { - // setup the system to use hierarchical method. - //this._changeConstants(); - - // define levels if undefined by the users. Based on hubsize + // define levels if undefined by the users. Based on hubsize. if (undefinedLevel === true) { if (this.options.hierarchical.sortMethod === 'hubsize') { this._determineLevelsByHubsize(); } - else if (this.options.hierarchical.sortMethod === 'directed' || 'direction') { + else if (this.options.hierarchical.sortMethod === 'directed') { this._determineLevelsDirected(); } + else if (this.options.hierarchical.sortMethod === 'custom') { + this._determineLevelsCustomCallback(); + } } + + // fallback for cases where there are nodes but no edges + for (let nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + if (this.hierarchicalLevels[nodeId] === undefined) { + this.hierarchicalLevels[nodeId] = 0; + } + } + } // check the distribution of the nodes per level. let distribution = this._getDistribution(); + // get the parent children relations. + this._generateMap(); + // place the nodes on the canvas. this._placeNodesByHierarchy(distribution); + + // condense the whitespace. + this._condenseHierarchy(); + + // shift to center so gravity does not have to do much + this._shiftToCenter(); + } + } + } + + /** + * @private + */ + _condenseHierarchy() { + // Global var in this scope to define when the movement has stopped. + let stillShifting = false; + let branches = {}; + // first we have some methods to help shifting trees around. + // the main method to shift the trees + let shiftTrees = () => { + let treeSizes = getTreeSizes(); + for (let i = 0; i < treeSizes.length - 1; i++) { + let diff = treeSizes[i].max - treeSizes[i+1].min; + shiftTree(i + 1, diff + this.options.hierarchical.treeSpacing); + } + }; + + // shift a single tree by an offset + let shiftTree = (index, offset) => { + for (let nodeId in this.hierarchicalTrees) { + if (this.hierarchicalTrees.hasOwnProperty(nodeId)) { + if (this.hierarchicalTrees[nodeId] === index) { + let node = this.body.nodes[nodeId]; + let pos = this._getPositionForHierarchy(node); + this._setPositionForHierarchy(node, pos + offset, undefined, true); + } + } + } + }; + + // get the width of a tree + let getTreeSize = (index) => { + let min = 1e9; + let max = -1e9; + for (let nodeId in this.hierarchicalTrees) { + if (this.hierarchicalTrees.hasOwnProperty(nodeId)) { + if (this.hierarchicalTrees[nodeId] === index) { + let pos = this._getPositionForHierarchy(this.body.nodes[nodeId]); + min = Math.min(pos, min); + max = Math.max(pos, max); + } + } + } + return {min:min, max:max}; + }; + + // get the width of all trees + let getTreeSizes = () => { + let treeWidths = []; + for (let i = 0; i <= this.treeIndex; i++) { + treeWidths.push(getTreeSize(i)); + } + return treeWidths; + }; + + + // get a map of all nodes in this branch + let getBranchNodes = (source, map) => { + map[source.id] = true; + if (this.hierarchicalChildrenReference[source.id]) { + let children = this.hierarchicalChildrenReference[source.id]; + if (children.length > 0) { + for (let i = 0; i < children.length; i++) { + getBranchNodes(this.body.nodes[children[i]], map); + } + } + } + }; + + // get a min max width as well as the maximum movement space it has on either sides + // we use min max terminology because width and height can interchange depending on the direction of the layout + let getBranchBoundary = (branchMap, maxLevel = 1e9) => { + let minSpace = 1e9; + let maxSpace = 1e9; + let min = 1e9; + let max = -1e9; + for (let branchNode in branchMap) { + if (branchMap.hasOwnProperty(branchNode)) { + let node = this.body.nodes[branchNode]; + let level = this.hierarchicalLevels[node.id]; + let position = this._getPositionForHierarchy(node); + + // get the space around the node. + let [minSpaceNode, maxSpaceNode] = this._getSpaceAroundNode(node,branchMap); + minSpace = Math.min(minSpaceNode, minSpace); + maxSpace = Math.min(maxSpaceNode, maxSpace); + + // the width is only relevant for the levels two nodes have in common. This is why we filter on this. + if (level <= maxLevel) { + min = Math.min(position, min); + max = Math.max(position, max); + } + } + } + + return [min, max, minSpace, maxSpace]; + }; + + // get the maximum level of a branch. + let getMaxLevel = (nodeId) => { + let level = this.hierarchicalLevels[nodeId]; + if (this.hierarchicalChildrenReference[nodeId]) { + let children = this.hierarchicalChildrenReference[nodeId]; + if (children.length > 0) { + for (let i = 0; i < children.length; i++) { + level = Math.max(level,getMaxLevel(children[i])); + } + } + } + return level; + }; + + // check what the maximum level is these nodes have in common. + let getCollisionLevel = (node1, node2) => { + let maxLevel1 = getMaxLevel(node1.id); + let maxLevel2 = getMaxLevel(node2.id); + return Math.min(maxLevel1, maxLevel2); + }; + + // check if two nodes have the same parent(s) + let hasSameParent = (node1, node2) => { + let parents1 = this.hierarchicalParentReference[node1.id]; + let parents2 = this.hierarchicalParentReference[node2.id]; + if (parents1 === undefined || parents2 === undefined) { + return false; + } + + for (let i = 0; i < parents1.length; i++) { + for (let j = 0; j < parents2.length; j++) { + if (parents1[i] == parents2[j]) { + return true; + } + } + } + return false; + }; + + // condense elements. These can be nodes or branches depending on the callback. + let shiftElementsCloser = (callback, levels, centerParents) => { + for (let i = 0; i < levels.length; i++) { + let level = levels[i]; + let levelNodes = this.distributionOrdering[level]; + if (levelNodes.length > 1) { + for (let j = 0; j < levelNodes.length - 1; j++) { + if (hasSameParent(levelNodes[j],levelNodes[j+1]) === true) { + if (this.hierarchicalTrees[levelNodes[j].id] === this.hierarchicalTrees[levelNodes[j+1].id]) { + callback(levelNodes[j],levelNodes[j+1], centerParents); + } + }} + } + } + }; + + // callback for shifting branches + let branchShiftCallback = (node1, node2, centerParent = false) => { + //window.CALLBACKS.push(() => { + let pos1 = this._getPositionForHierarchy(node1); + let pos2 = this._getPositionForHierarchy(node2); + let diffAbs = Math.abs(pos2 - pos1); + //console.log("NOW CHEcKING:", node1.id, node2.id, diffAbs); + if (diffAbs > this.options.hierarchical.nodeSpacing) { + let branchNodes1 = {}; branchNodes1[node1.id] = true; + let branchNodes2 = {}; branchNodes2[node2.id] = true; + + getBranchNodes(node1, branchNodes1); + getBranchNodes(node2, branchNodes2); + + // check the largest distance between the branches + let maxLevel = getCollisionLevel(node1, node2); + let [min1,max1, minSpace1, maxSpace1] = getBranchBoundary(branchNodes1, maxLevel); + let [min2,max2, minSpace2, maxSpace2] = getBranchBoundary(branchNodes2, maxLevel); + + //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, getBranchBoundary(branchNodes2, maxLevel), maxLevel); + let diffBranch = Math.abs(max1 - min2); + if (diffBranch > this.options.hierarchical.nodeSpacing) { + let offset = max1 - min2 + this.options.hierarchical.nodeSpacing; + if (offset < -minSpace2 + this.options.hierarchical.nodeSpacing) { + offset = -minSpace2 + this.options.hierarchical.nodeSpacing; + //console.log("RESETTING OFFSET", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset); + } + if (offset < 0) { + //console.log("SHIFTING", node2.id, offset); + this._shiftBlock(node2.id, offset); + stillShifting = true; + + if (centerParent === true) + this._centerParent(node2); + } + } + + } + //this.body.emitter.emit("_redraw");}) + }; + + let minimizeEdgeLength = (iterations, node) => { + //window.CALLBACKS.push(() => { + // console.log("ts",node.id); + let nodeId = node.id; + let allEdges = node.edges; + let nodeLevel = this.hierarchicalLevels[node.id]; + + // gather constants + let C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation; + let referenceNodes = {}; + let aboveEdges = []; + for (let i = 0; i < allEdges.length; i++) { + let edge = allEdges[i]; + if (edge.toId != edge.fromId) { + let otherNode = edge.toId == nodeId ? edge.from : edge.to; + referenceNodes[allEdges[i].id] = otherNode; + if (this.hierarchicalLevels[otherNode.id] < nodeLevel) { + aboveEdges.push(edge); + } + } + } + + // differentiated sum of lengths based on only moving one node over one axis + let getFx = (point, edges) => { + let sum = 0; + for (let i = 0; i < edges.length; i++) { + if (referenceNodes[edges[i].id] !== undefined) { + let a = this._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + sum += a / Math.sqrt(a * a + C2); + } + } + return sum; + }; + + // doubly differentiated sum of lengths based on only moving one node over one axis + let getDFx = (point, edges) => { + let sum = 0; + for (let i = 0; i < edges.length; i++) { + if (referenceNodes[edges[i].id] !== undefined) { + let a = this._getPositionForHierarchy(referenceNodes[edges[i].id]) - point; + sum -= (C2 * Math.pow(a * a + C2, -1.5)); + } + } + return sum; + }; + + let getGuess = (iterations, edges) => { + let guess = this._getPositionForHierarchy(node); + // Newton's method for optimization + let guessMap = {}; + for (let i = 0; i < iterations; i++) { + let fx = getFx(guess, edges); + let dfx = getDFx(guess, edges); + + // we limit the movement to avoid instability. + let limit = 40; + let ratio = Math.max(-limit, Math.min(limit, Math.round(fx/dfx))); + guess = guess - ratio; + // reduce duplicates + if (guessMap[guess] !== undefined) { + break; + } + guessMap[guess] = i; + } + return guess; + }; + + let moveBranch = (guess) => { + // position node if there is space + let nodePosition = this._getPositionForHierarchy(node); + + // check movable area of the branch + if (branches[node.id] === undefined) { + let branchNodes = {}; + branchNodes[node.id] = true; + getBranchNodes(node, branchNodes); + branches[node.id] = branchNodes; + } + let [minBranch, maxBranch, minSpaceBranch, maxSpaceBranch] = getBranchBoundary(branches[node.id]); + + let diff = guess - nodePosition; + + // check if we are allowed to move the node: + let branchOffset = 0; + if (diff > 0) { + branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing); + } + else if (diff < 0) { + branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing); + } + + if (branchOffset != 0) { + //console.log("moving branch:",branchOffset, maxSpaceBranch, minSpaceBranch) + this._shiftBlock(node.id, branchOffset); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + let moveNode = (guess) => { + let nodePosition = this._getPositionForHierarchy(node); + + // position node if there is space + let [minSpace, maxSpace] = this._getSpaceAroundNode(node); + let diff = guess - nodePosition; + // check if we are allowed to move the node: + let newPosition = nodePosition; + if (diff > 0) { + newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess); + } + else if (diff < 0) { + newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess); + } + + if (newPosition !== nodePosition) { + //console.log("moving Node:",diff, minSpace, maxSpace); + this._setPositionForHierarchy(node, newPosition, undefined, true); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + let guess = getGuess(iterations, aboveEdges); + moveBranch(guess); + guess = getGuess(iterations, allEdges); + moveNode(guess); + //}) + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + let minimizeEdgeLengthBottomUp = (iterations) => { + let levels = Object.keys(this.distributionOrdering); + levels = levels.reverse(); + for (let i = 0; i < iterations; i++) { + stillShifting = false; + for (let j = 0; j < levels.length; j++) { + let level = levels[j]; + let levelNodes = this.distributionOrdering[level]; + for (let k = 0; k < levelNodes.length; k++) { + minimizeEdgeLength(1000, levelNodes[k]); + } + } + if (stillShifting !== true) { + //console.log("FINISHED minimizeEdgeLengthBottomUp IN " + i); + break; + } + } + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + let shiftBranchesCloserBottomUp = (iterations) => { + let levels = Object.keys(this.distributionOrdering); + levels = levels.reverse(); + for (let i = 0; i < iterations; i++) { + stillShifting = false; + shiftElementsCloser(branchShiftCallback, levels, true); + if (stillShifting !== true) { + //console.log("FINISHED shiftBranchesCloserBottomUp IN " + (i+1)); + break; + } + } + }; + + // center all parents + let centerAllParents = () => { + for (let nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) + this._centerParent(this.body.nodes[nodeId]); + } + }; + + // center all parents + let centerAllParentsBottomUp = () => { + let levels = Object.keys(this.distributionOrdering); + levels = levels.reverse(); + for (let i = 0; i < levels.length; i++) { + let level = levels[i]; + let levelNodes = this.distributionOrdering[level]; + for (let j = 0; j < levelNodes.length; j++) { + this._centerParent(levelNodes[j]); + } + } + }; + + // the actual work is done here. + if (this.options.hierarchical.blockShifting === true) { + shiftBranchesCloserBottomUp(5); + centerAllParents(); + } + + // minimize edge length + if (this.options.hierarchical.edgeMinimization === true) { + minimizeEdgeLengthBottomUp(20); + } + + if (this.options.hierarchical.parentCentralization === true) { + centerAllParentsBottomUp() + } + + shiftTrees(); + } + + /** + * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map. + * This is used to only get the distances to nodes outside of a branch. + * @param node + * @param map + * @returns {*[]} + * @private + */ + _getSpaceAroundNode(node, map) { + let useMap = true; + if (map === undefined) { + useMap = false; + } + let level = this.hierarchicalLevels[node.id]; + if (level !== undefined) { + let index = this.distributionIndex[node.id]; + let position = this._getPositionForHierarchy(node); + let minSpace = 1e9; + let maxSpace = 1e9; + if (index !== 0) { + let prevNode = this.distributionOrdering[level][index - 1]; + if ((useMap === true && map[prevNode.id] === undefined) || useMap === false) { + let prevPos = this._getPositionForHierarchy(prevNode); + minSpace = position - prevPos; + } + } + + if (index != this.distributionOrdering[level].length - 1) { + let nextNode = this.distributionOrdering[level][index + 1]; + if ((useMap === true && map[nextNode.id] === undefined) || useMap === false) { + let nextPos = this._getPositionForHierarchy(nextNode); + maxSpace = Math.min(maxSpace, nextPos - position); + } + } + + return [minSpace, maxSpace]; + } + else { + return [0, 0]; + } + } + + /** + * We use this method to center a parent node and check if it does not cross other nodes when it does. + * @param node + * @private + */ + _centerParent(node) { + if (this.hierarchicalParentReference[node.id]) { + let parents = this.hierarchicalParentReference[node.id]; + for (var i = 0; i < parents.length; i++) { + let parentId = parents[i]; + let parentNode = this.body.nodes[parentId]; + if (this.hierarchicalChildrenReference[parentId]) { + // get the range of the children + let minPos = 1e9; + let maxPos = -1e9; + let children = this.hierarchicalChildrenReference[parentId]; + if (children.length > 0) { + for (let i = 0; i < children.length; i++) { + let childNode = this.body.nodes[children[i]]; + minPos = Math.min(minPos, this._getPositionForHierarchy(childNode)); + maxPos = Math.max(maxPos, this._getPositionForHierarchy(childNode)); + } + } + + let position = this._getPositionForHierarchy(parentNode); + let [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode); + let newPosition = 0.5 * (minPos + maxPos); + let diff = position - newPosition; + if ((diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing) || (diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing)) { + this._setPositionForHierarchy(parentNode, newPosition, undefined, true); + } + } } } } + + /** * This function places the nodes on the canvas based on the hierarchial distribution. * @@ -310,34 +850,128 @@ class LayoutEngine { * @private */ _placeNodesByHierarchy(distribution) { - let nodeId, node; this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches. for (let level in distribution) { if (distribution.hasOwnProperty(level)) { - for (nodeId in distribution[level].nodes) { - if (distribution[level].nodes.hasOwnProperty(nodeId)) { + // sort nodes in level by position: + let nodeArray = Object.keys(distribution[level]); + nodeArray = this._indexArrayToNodes(nodeArray); + this._sortNodeArray(nodeArray); + let handledNodeCount = 0; + + for (let i = 0; i < nodeArray.length; i++) { + let node = nodeArray[i]; + if (this.positionedNodes[node.id] === undefined) { + let pos = this.options.hierarchical.nodeSpacing * handledNodeCount; + // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y + if (handledNodeCount > 0) {pos = this._getPositionForHierarchy(nodeArray[i-1]) + this.options.hierarchical.nodeSpacing;} + this._setPositionForHierarchy(node, pos, level); + this._validataPositionAndContinue(node, level, pos); + + handledNodeCount++; + } + } + } + } + } - node = distribution[level].nodes[nodeId]; - if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { - if (node.x === undefined) {node.x = distribution[level].distance;} - distribution[level].distance = node.x + this.nodeSpacing; - } - else { - if (node.y === undefined) {node.y = distribution[level].distance;} - distribution[level].distance = node.y + this.nodeSpacing; - } + /** + * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes + * on a X position that ensures there will be no overlap. + * + * @param parentId + * @param parentLevel + * @private + */ + _placeBranchNodes(parentId, parentLevel) { + // if this is not a parent, cancel the placing. This can happen with multiple parents to one child. + if (this.hierarchicalChildrenReference[parentId] === undefined) { + return; + } - this.positionedNodes[nodeId] = true; - this._placeBranchNodes(node.edges,node.id,distribution,level); - } - } + // get a list of childNodes + let childNodes = []; + for (let i = 0; i < this.hierarchicalChildrenReference[parentId].length; i++) { + childNodes.push(this.body.nodes[this.hierarchicalChildrenReference[parentId][i]]); + } + + // use the positions to order the nodes. + this._sortNodeArray(childNodes); + + // position the childNodes + for (let i = 0; i < childNodes.length; i++) { + let childNode = childNodes[i]; + let childNodeLevel = this.hierarchicalLevels[childNode.id]; + // check if the child node is below the parent node and if it has already been positioned. + if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { + // get the amount of space required for this node. If parent the width is based on the amount of children. + let pos; + + // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y + if (i === 0) {pos = this._getPositionForHierarchy(this.body.nodes[parentId]);} + else {pos = this._getPositionForHierarchy(childNodes[i-1]) + this.options.hierarchical.nodeSpacing;} + this._setPositionForHierarchy(childNode, pos, childNodeLevel); + this._validataPositionAndContinue(childNode, childNodeLevel, pos); } + else { + return; + } + } + + // center the parent nodes. + let minPos = 1e9; + let maxPos = -1e9; + for (let i = 0; i < childNodes.length; i++) { + let childNodeId = childNodes[i].id; + minPos = Math.min(minPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); + maxPos = Math.max(maxPos, this._getPositionForHierarchy(this.body.nodes[childNodeId])); } + this._setPositionForHierarchy(this.body.nodes[parentId], 0.5 * (minPos + maxPos), parentLevel); } + /** + * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes. + * Finally it will call _placeBranchNodes to place the branch nodes. + * @param node + * @param level + * @param pos + * @private + */ + _validataPositionAndContinue(node, level, pos) { + // if overlap has been detected, we shift the branch + if (this.lastNodeOnLevel[level] !== undefined) { + let previousPos = this._getPositionForHierarchy(this.body.nodes[this.lastNodeOnLevel[level]]); + if (pos - previousPos < this.options.hierarchical.nodeSpacing) { + let diff = (previousPos + this.options.hierarchical.nodeSpacing) - pos; + let sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id); + this._shiftBlock(sharedParent.withChild, diff); + } + } + + // store change in position. + this.lastNodeOnLevel[level] = node.id; + + this.positionedNodes[node.id] = true; + + this._placeBranchNodes(node.id, level); + } + + /** + * Receives an array with node indices and returns an array with the actual node references. Used for sorting based on + * node properties. + * @param idArray + */ + _indexArrayToNodes(idArray) { + let array = []; + for (let i = 0; i < idArray.length; i++) { + array.push(this.body.nodes[idArray[i]]) + } + return array; + } + /** * This function get the distribution of levels based on hubsize * @@ -363,10 +997,9 @@ class LayoutEngine { node.options.fixed.x = true; } if (distribution[level] === undefined) { - distribution[level] = {amount: 0, nodes: {}, distance: 0}; + distribution[level] = {}; } - distribution[level].amount += 1; - distribution[level].nodes[nodeId] = node; + distribution[level][nodeId] = node; } } return distribution; @@ -400,53 +1033,65 @@ class LayoutEngine { * @private */ _determineLevelsByHubsize() { - let nodeId, node; let hubSize = 1; + let levelDownstream = (nodeA, nodeB) => { + if (this.hierarchicalLevels[nodeB.id] === undefined) { + // set initial level + if (this.hierarchicalLevels[nodeA.id] === undefined) { + this.hierarchicalLevels[nodeA.id] = 0; + } + // set level + this.hierarchicalLevels[nodeB.id] = this.hierarchicalLevels[nodeA.id] + 1; + } + }; + while (hubSize > 0) { // determine hubs hubSize = this._getHubSize(); if (hubSize === 0) break; - for (nodeId in this.body.nodes) { + for (let nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - node = this.body.nodes[nodeId]; + let node = this.body.nodes[nodeId]; if (node.edges.length === hubSize) { - this._setLevelByHubsize(0, node); + this._crawlNetwork(levelDownstream,nodeId); } } } } } - /** - * this function is called recursively to enumerate the barnches of the largest hubs and give each node a level. - * - * @param level - * @param edges - * @param parentId + * TODO: release feature * @private */ - _setLevelByHubsize(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) - return; + _determineLevelsCustomCallback() { + let minLevel = 100000; - let childNode; - this.hierarchicalLevels[node.id] = level; - for (let i = 0; i < node.edges.length; i++) { - if (node.edges[i].toId === node.id) { - childNode = node.edges[i].from; - } - else { - childNode = node.edges[i].to; - } - this._setLevelByHubsize(level + 1, childNode); - } - } + // TODO: this should come from options. + let customCallback = function(nodeA, nodeB, edge) { + }; + let levelByDirection = (nodeA, nodeB, edge) => { + let levelA = this.hierarchicalLevels[nodeA.id]; + // set initial level + if (levelA === undefined) {this.hierarchicalLevels[nodeA.id] = minLevel;} + + let diff = customCallback( + NetworkUtil.cloneOptions(nodeA,'node'), + NetworkUtil.cloneOptions(nodeB,'node'), + NetworkUtil.cloneOptions(edge,'edge') + ); + + this.hierarchicalLevels[nodeB.id] = this.hierarchicalLevels[nodeA.id] + diff; + }; + + this._crawlNetwork(levelByDirection); + this._setMinLevelToZero(); + } /** * this function allocates nodes in levels based on the direction of the edges @@ -455,111 +1100,259 @@ class LayoutEngine { * @private */ _determineLevelsDirected() { - let nodeId, node; let minLevel = 10000; - - // set first node to source - for (nodeId in this.body.nodes) { - if (this.body.nodes.hasOwnProperty(nodeId)) { - node = this.body.nodes[nodeId]; - this._setLevelDirected(minLevel,node); + let levelByDirection = (nodeA, nodeB, edge) => { + let levelA = this.hierarchicalLevels[nodeA.id]; + // set initial level + if (levelA === undefined) {this.hierarchicalLevels[nodeA.id] = minLevel;} + if (edge.toId == nodeB.id) { + this.hierarchicalLevels[nodeB.id] = this.hierarchicalLevels[nodeA.id] + 1; } - } + else { + this.hierarchicalLevels[nodeB.id] = this.hierarchicalLevels[nodeA.id] - 1; + } + }; + this._crawlNetwork(levelByDirection); + this._setMinLevelToZero(); + } + + /** + * Small util method to set the minimum levels of the nodes to zero. + * @private + */ + _setMinLevelToZero() { + let minLevel = 1e9; // get the minimum level - for (nodeId in this.body.nodes) { + for (let nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - minLevel = this.hierarchicalLevels[nodeId] < minLevel ? this.hierarchicalLevels[nodeId] : minLevel; + if (this.hierarchicalLevels[nodeId] !== undefined) { + minLevel = Math.min(this.hierarchicalLevels[nodeId], minLevel); + } } } // subtract the minimum from the set so we have a range starting from 0 - for (nodeId in this.body.nodes) { + for (let nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - this.hierarchicalLevels[nodeId] -= minLevel; + if (this.hierarchicalLevels[nodeId] !== undefined) { + this.hierarchicalLevels[nodeId] -= minLevel; + } } } } /** - * this function is called recursively to enumerate the branched of the first node and give each node a level based on edge direction - * - * @param level - * @param edges - * @param parentId + * Update the bookkeeping of parent and child. * @private */ - _setLevelDirected(level, node) { - if (this.hierarchicalLevels[node.id] !== undefined) - return; + _generateMap() { + let fillInRelations = (parentNode, childNode) => { + if (this.hierarchicalLevels[childNode.id] > this.hierarchicalLevels[parentNode.id]) { + let parentNodeId = parentNode.id; + let childNodeId = childNode.id; + if (this.hierarchicalChildrenReference[parentNodeId] === undefined) { + this.hierarchicalChildrenReference[parentNodeId] = []; + } + this.hierarchicalChildrenReference[parentNodeId].push(childNodeId); + if (this.hierarchicalParentReference[childNodeId] === undefined) { + this.hierarchicalParentReference[childNodeId] = []; + } + this.hierarchicalParentReference[childNodeId].push(parentNodeId); + } + }; + + this._crawlNetwork(fillInRelations); + } + + + /** + * Crawl over the entire network and use a callback on each node couple that is connected to each other. + * @param callback | will receive nodeA nodeB and the connecting edge. A and B are unique. + * @param startingNodeId + * @private + */ + _crawlNetwork(callback = function() {}, startingNodeId) { + let progress = {}; + let treeIndex = 0; + + let crawler = (node, tree) => { + if (progress[node.id] === undefined) { + + if (this.hierarchicalTrees[node.id] === undefined) { + this.hierarchicalTrees[node.id] = tree; + this.treeIndex = Math.max(tree, this.treeIndex); + } - let childNode; - this.hierarchicalLevels[node.id] = level; + progress[node.id] = true; + let childNode; + for (let i = 0; i < node.edges.length; i++) { + if (node.edges[i].connected === true) { + if (node.edges[i].toId === node.id) { + childNode = node.edges[i].from; + } + else { + childNode = node.edges[i].to; + } - for (let i = 0; i < node.edges.length; i++) { - if (node.edges[i].toId === node.id) { - childNode = node.edges[i].from; - this._setLevelDirected(level - 1, childNode); + if (node.id !== childNode.id) { + callback(node, childNode, node.edges[i]); + crawler(childNode, tree); + } + } + } } - else { - childNode = node.edges[i].to; - this._setLevelDirected(level + 1, childNode); + }; + + + // we can crawl from a specific node or over all nodes. + if (startingNodeId === undefined) { + for (let i = 0; i < this.body.nodeIndices.length; i++) { + let node = this.body.nodes[this.body.nodeIndices[i]]; + if (progress[node.id] === undefined) { + crawler(node, treeIndex); + treeIndex += 1; + } + } + } + else { + let node = this.body.nodes[startingNodeId]; + if (node === undefined) { + console.error("Node not found:", startingNodeId); + return; } + crawler(node); } } - /** - * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes - * on a X position that ensures there will be no overlap. - * - * @param edges + * Shift a branch a certain distance * @param parentId - * @param distribution - * @param parentLevel + * @param diff * @private */ - _placeBranchNodes(edges, parentId, distribution, parentLevel) { - for (let i = 0; i < edges.length; i++) { - let childNode = undefined; - let parentNode = undefined; - if (edges[i].toId === parentId) { - childNode = edges[i].from; - parentNode = edges[i].to; - } - else { - childNode = edges[i].to; - parentNode = edges[i].from; + _shiftBlock(parentId, diff) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + this.body.nodes[parentId].x += diff; + } + else { + this.body.nodes[parentId].y += diff; + } + if (this.hierarchicalChildrenReference[parentId] !== undefined) { + for (let i = 0; i < this.hierarchicalChildrenReference[parentId].length; i++) { + this._shiftBlock(this.hierarchicalChildrenReference[parentId][i], diff); } - let childNodeLevel = this.hierarchicalLevels[childNode.id]; + } + } - if (this.positionedNodes[childNode.id] === undefined) { - // if a node is conneceted to another node on the same level (or higher (means lower level))!, this is not handled here. - if (childNodeLevel > parentLevel) { - if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { - if (childNode.x === undefined) { - childNode.x = Math.max(distribution[childNodeLevel].distance, parentNode.x); - } - distribution[childNodeLevel].distance = childNode.x + this.nodeSpacing; - this.positionedNodes[childNode.id] = true; - } - else { - if (childNode.y === undefined) { - childNode.y = Math.max(distribution[childNodeLevel].distance, parentNode.y) - } - distribution[childNodeLevel].distance = childNode.y + this.nodeSpacing; - } - this.positionedNodes[childNode.id] = true; - if (childNode.edges.length > 1) { - this._placeBranchNodes(childNode.edges, childNode.id, distribution, childNodeLevel); + /** + * Find a common parent between branches. + * @param childA + * @param childB + * @returns {{foundParent, withChild}} + * @private + */ + _findCommonParent(childA,childB) { + let parents = {}; + let iterateParents = (parents,child) => { + if (this.hierarchicalParentReference[child] !== undefined) { + for (let i = 0; i < this.hierarchicalParentReference[child].length; i++) { + let parent = this.hierarchicalParentReference[child][i]; + parents[parent] = true; + iterateParents(parents, parent) + } + } + }; + let findParent = (parents, child) => { + if (this.hierarchicalParentReference[child] !== undefined) { + for (let i = 0; i < this.hierarchicalParentReference[child].length; i++) { + let parent = this.hierarchicalParentReference[child][i]; + if (parents[parent] !== undefined) { + return {foundParent:parent, withChild:child}; + } + let branch = findParent(parents, parent); + if (branch.foundParent !== null) { + return branch; } } } + return {foundParent:null, withChild:child}; + }; + + iterateParents(parents, childA); + return findParent(parents, childB); + } + + /** + * Abstract the getting of the position so we won't have to repeat the check for direction all the time + * @param node + * @param position + * @param level + * @private + */ + _setPositionForHierarchy(node, position, level, doNotUpdate = false) { + //console.log('_setPositionForHierarchy',node.id, position) + if (doNotUpdate !== true) { + if (this.distributionOrdering[level] === undefined) { + this.distributionOrdering[level] = []; + this.distributionOrderingPresence[level] = {}; + } + + if (this.distributionOrderingPresence[level][node.id] === undefined) { + this.distributionOrdering[level].push(node); + this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1; + } + this.distributionOrderingPresence[level][node.id] = true; + } + + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + node.x = position; + } + else { + node.y = position; + } + } + + /** + * Abstract the getting of the position of a node so we do not have to repeat the direction check all the time. + * @param node + * @returns {number|*} + * @private + */ + _getPositionForHierarchy(node) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + return node.x; + } + else { + return node.y; + } + } + + /** + * Use the x or y value to sort the array, allowing users to specify order. + * @param nodeArray + * @private + */ + _sortNodeArray(nodeArray) { + if (nodeArray.length > 1) { + if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') { + nodeArray.sort(function (a, b) { + return a.x - b.x; + }) + } + else { + nodeArray.sort(function (a, b) { + return a.y - b.y; + }) + } } } + + + } export default LayoutEngine; \ No newline at end of file diff --git a/lib/network/modules/ManipulationSystem.js b/lib/network/modules/ManipulationSystem.js index 1d81d1f5..94b8b5f7 100644 --- a/lib/network/modules/ManipulationSystem.js +++ b/lib/network/modules/ManipulationSystem.js @@ -110,6 +110,7 @@ class ManipulationSystem { } } + enableEditMode() { this.editMode = true; @@ -143,7 +144,7 @@ class ManipulationSystem { // restore the state of any bound functions or events, remove control nodes, restore physics this._clean(); - // reset global letiables + // reset global variables this.manipulationDOM = {}; // if the gui is enabled, draw all elements. @@ -221,8 +222,6 @@ class ManipulationSystem { /** * Create the toolbar for adding Nodes - * - * @private */ addNodeMode() { // when using the gui, enable edit mode if it wasnt already. @@ -250,8 +249,6 @@ class ManipulationSystem { /** * call the bound function to handle the editing of the node. The node has to be selected. - * - * @private */ editNode() { // when using the gui, enable edit mode if it wasnt already. @@ -266,7 +263,7 @@ class ManipulationSystem { this.inMode = 'editNode'; if (typeof this.options.editNode === 'function') { if (node.isCluster !== true) { - let data = util.deepExtend({}, node.options, true); + let data = util.deepExtend({}, node.options, false); data.x = node.x; data.y = node.y; @@ -298,8 +295,6 @@ class ManipulationSystem { /** * create the toolbar to connect nodes - * - * @private */ addEdgeMode() { // when using the gui, enable edit mode if it wasnt already. @@ -334,11 +329,9 @@ class ManipulationSystem { /** * create the toolbar to edit edges - * - * @private */ editEdgeMode() { - // when using the gui, enable edit mode if it wasnt already. + // when using the gui, enable edit mode if it wasn't already. if (this.editMode !== true) { this.enableEditMode(); } @@ -376,15 +369,12 @@ class ManipulationSystem { // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position - this._temporaryBindUI('onTap', () => { - }); // disabled - this._temporaryBindUI('onHold', () => { - }); // disabled + this._temporaryBindUI('onTap', () => {}); // disabled + this._temporaryBindUI('onHold', () => {}); // disabled this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this));// used to select control node this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes - this._temporaryBindUI('onMouseMove', () => { - }); // disabled + this._temporaryBindUI('onMouseMove', () => {}); // disabled // create function to position control nodes correctly on movement // automatically cleaned up because we use the temporary bind @@ -409,8 +399,6 @@ class ManipulationSystem { /** * delete everything in the selection - * - * @private */ deleteSelected() { // when using the gui, enable edit mode if it wasnt already. @@ -560,7 +548,11 @@ class ManipulationSystem { controlNodeStyle.x = x; controlNodeStyle.y = y; - return this.body.functions.createNode(controlNodeStyle); + // we have to define the bounding box in order for the nodes to be drawn immediately + let node = this.body.functions.createNode(controlNodeStyle); + node.shape.boundingBox = {left: x, right:x, top:y, bottom:y}; + + return node; } @@ -650,7 +642,7 @@ class ManipulationSystem { // remove the manipulation divs if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);} if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);} - if (this.closeDiv) {this.canvas.frame.removeChild(this.manipulationDiv);} + if (this.closeDiv) {this.canvas.frame.removeChild(this.closeDiv);} // set the references to undefined this.manipulationDiv = undefined; @@ -856,6 +848,11 @@ class ManipulationSystem { edge.edgeType.to = to; } + // we use the selection to find the node that is being dragged. We explicitly select it here. + if (this.selectedControlNode !== undefined) { + this.selectionHandler.selectObject(this.selectedControlNode) + } + this.body.emitter.emit('_redraw'); } @@ -868,7 +865,6 @@ class ManipulationSystem { this.body.emitter.emit('disablePhysics'); let pointer = this.body.functions.getPointer(event.center); let pos = this.canvas.DOMtoCanvas(pointer); - if (this.selectedControlNode !== undefined) { this.selectedControlNode.x = pos.x; this.selectedControlNode.y = pos.y; @@ -892,7 +888,13 @@ class ManipulationSystem { let pointer = this.body.functions.getPointer(event.center); let pointerObj = this.selectionHandler._pointerToPositionObject(pointer); let edge = this.body.edges[this.edgeBeingEditedId]; + // if the node that was dragged is not a control node, return + if (this.selectedControlNode === undefined) { + return; + } + // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here. + this.selectionHandler.unselectAll(); let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); let node = undefined; for (let i = overlappingNodeIds.length-1; i >= 0; i--) { @@ -901,7 +903,6 @@ class ManipulationSystem { break; } } - // perform the connection if (node !== undefined && this.selectedControlNode !== undefined) { if (node.isCluster === true) { diff --git a/lib/network/modules/NodesHandler.js b/lib/network/modules/NodesHandler.js index 491c5357..e548bd41 100644 --- a/lib/network/modules/NodesHandler.js +++ b/lib/network/modules/NodesHandler.js @@ -87,6 +87,7 @@ class NodesHandler { }, shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: 10, x: 5, y: 5 @@ -95,7 +96,9 @@ class NodesHandler { shapeProperties: { borderDashes: false, // only for borders borderRadius: 6, // only for box shape - useImageSize: false // only for image and circularImage shapes + interpolation: true, // only for image and circularImage shapes + useImageSize: false, // only for image and circularImage shapes + useBorderWithImage: false // only for image shape }, size: 25, title: undefined, @@ -113,6 +116,10 @@ class NodesHandler { this.body.emitter.on('refreshNodes', this.refresh.bind(this)); this.body.emitter.on('refresh', this.refresh.bind(this)); this.body.emitter.on('destroy', () => { + util.forEach(this.nodesListeners, (callback, event) => { + if (this.body.data.nodes) + this.body.data.nodes.off(event, callback); + }); delete this.body.functions.createNode; delete this.nodesListeners.add; delete this.nodesListeners.update; @@ -355,7 +362,7 @@ class NodesHandler { if (dataset._data.hasOwnProperty(nodeId)) { let node = this.body.nodes[nodeId]; if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) { - dataArray.push({ id: nodeId, x: Math.round(node.x), y: Math.round(node.y) }); + dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) }); } } } @@ -386,13 +393,13 @@ class NodesHandler { let nodeObj = {}; // used to quickly check if node already exists for (let i = 0; i < node.edges.length; i++) { let edge = node.edges[i]; - if (edge.toId == nodeId) { // these are double equals since ids can be numeric or string + if (edge.toId == node.id) { // these are double equals since ids can be numeric or string if (nodeObj[edge.fromId] === undefined) { nodeList.push(edge.fromId); nodeObj[edge.fromId] = true; } } - else if (edge.fromId == nodeId) { // these are double equals since ids can be numeric or string + else if (edge.fromId == node.id) { // these are double equals since ids can be numeric or string if (nodeObj[edge.toId] === undefined) { nodeList.push(edge.toId); nodeObj[edge.toId] = true; diff --git a/lib/network/modules/PhysicsEngine.js b/lib/network/modules/PhysicsEngine.js index c1a2c3fe..7d538906 100644 --- a/lib/network/modules/PhysicsEngine.js +++ b/lib/network/modules/PhysicsEngine.js @@ -86,12 +86,14 @@ class PhysicsEngine { }; util.extend(this.options, this.defaultOptions); this.timestep = 0.5; + this.layoutFailed = false; this.bindEventListeners(); } bindEventListeners() { this.body.emitter.on('initPhysics', () => {this.initPhysics();}); + this.body.emitter.on('_layoutFailed', () => {this.layoutFailed = true;}); this.body.emitter.on('resetPhysics', () => {this.stopSimulation(); this.ready = false;}); this.body.emitter.on('disablePhysics', () => {this.physicsEnabled = false; this.stopSimulation();}); this.body.emitter.on('restorePhysics', () => { @@ -110,6 +112,14 @@ class PhysicsEngine { this.stopSimulation(false); this.body.emitter.off(); }); + // this event will trigger a rebuilding of the cache everything. Used when nodes or edges have been added or removed. + this.body.emitter.on("_dataChanged", () => { + // update shortcut lists + this.updatePhysicsData(); + }); + + // debug: show forces + // this.body.emitter.on("afterDrawing", (ctx) => {this._drawForces(ctx);}); } @@ -127,7 +137,7 @@ class PhysicsEngine { else { this.physicsEnabled = true; util.selectiveNotDeepExtend(['stabilization'], this.options, options); - util.mergeOptions(this.options, options, 'stabilization') + util.mergeOptions(this.options, options, 'stabilization'); if (options.enabled === undefined) { this.options.enabled = true; @@ -191,7 +201,7 @@ class PhysicsEngine { else { this.stabilized = false; this.ready = true; - this.body.emitter.emit('fit', {}, false); + this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom this.startSimulation(); } } @@ -244,7 +254,7 @@ class PhysicsEngine { /** - * The viewFunction inserts this step into each renderloop. It calls the physics tick and handles the cleanup at stabilized. + * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. * */ simulationStep() { @@ -271,10 +281,11 @@ class PhysicsEngine { * trigger the stabilized event. * @private */ - _emitStabilized() { - if (this.stabilizationIterations > 1) { + _emitStabilized(amountOfIterations = this.stabilizationIterations) { + if (this.stabilizationIterations > 1 || this.startedStabilization === true) { setTimeout(() => { - this.body.emitter.emit('stabilized', {iterations: this.stabilizationIterations}); + this.body.emitter.emit('stabilized', {iterations: amountOfIterations}); + this.startedStabilization = false; this.stabilizationIterations = 0; }, 0); } @@ -286,6 +297,12 @@ class PhysicsEngine { * @private */ physicsTick() { + // this is here to ensure that there is no start event when the network is already stable. + if (this.startedStabilization === false) { + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + } + if (this.stabilized === false) { // adaptivity means the timestep adapts to the situation, only applicable for stabilization if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) { @@ -348,13 +365,6 @@ class PhysicsEngine { if (this.stabilized === true) { this.revert(); } - else { - // this is here to ensure that there is no start event when the network is already stable. - if (this.startedStabilization === false) { - this.body.emitter.emit('startStabilizing'); - this.startedStabilization = true; - } - } this.stabilizationIterations++; } @@ -376,7 +386,7 @@ class PhysicsEngine { for (let nodeId in nodes) { if (nodes.hasOwnProperty(nodeId)) { if (nodes[nodeId].options.physics === true) { - this.physicsBody.physicsNodeIndices.push(nodeId); + this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id); } } } @@ -385,7 +395,7 @@ class PhysicsEngine { for (let edgeId in edges) { if (edges.hasOwnProperty(edgeId)) { if (edges[edgeId].options.physics === true) { - this.physicsBody.physicsEdgeIndices.push(edgeId); + this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id); } } } @@ -463,7 +473,7 @@ class PhysicsEngine { } /** - * move the nodes one timestap and check if they are stabilized + * move the nodes one timestep and check if they are stabilized * @returns {boolean} */ moveNodes() { @@ -585,7 +595,6 @@ class PhysicsEngine { /** * Find a stable position for all nodes - * @private */ stabilize(iterations = this.options.stabilization.iterations) { if (typeof iterations !== 'number') { @@ -629,6 +638,12 @@ class PhysicsEngine { * @private */ _stabilizationBatch() { + // this is here to ensure that there is at least one start event. + if (this.startedStabilization === false) { + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + } + var count = 0; while (this.stabilized === false && count < this.options.stabilization.updateInterval && this.stabilizationIterations < this.targetIterations) { this.physicsTick(); @@ -671,6 +686,34 @@ class PhysicsEngine { this.ready = true; } + + + _drawForces(ctx) { + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + let node = this.body.nodes[this.physicsBody.physicsNodeIndices[i]]; + let force = this.physicsBody.forces[this.physicsBody.physicsNodeIndices[i]]; + let factor = 20; + let colorFactor = 0.03; + let forceSize = Math.sqrt(Math.pow(force.x,2) + Math.pow(force.x,2)); + + let size = Math.min(Math.max(5,forceSize),15); + let arrowSize = 3*size; + + let color = util.HSVToHex((180 - Math.min(1,Math.max(0,colorFactor*forceSize))*180) / 360,1,1); + + ctx.lineWidth = size; + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(node.x,node.y); + ctx.lineTo(node.x+factor*force.x, node.y+factor*force.y); + ctx.stroke(); + + let angle = Math.atan2(force.y, force.x); + ctx.fillStyle = color; + ctx.arrow(node.x + factor*force.x + Math.cos(angle)*arrowSize, node.y + factor*force.y+Math.sin(angle)*arrowSize, angle, arrowSize); + ctx.fill(); + } + } } diff --git a/lib/network/modules/SelectionHandler.js b/lib/network/modules/SelectionHandler.js index 891ec7eb..415b6ba8 100644 --- a/lib/network/modules/SelectionHandler.js +++ b/lib/network/modules/SelectionHandler.js @@ -159,7 +159,6 @@ class SelectionHandler { * * @param {{x: Number, y: Number}} pointer * @return {Node | undefined} node - * @private */ getNodeAt(pointer, returnNode = true) { // we first check if this is an navigation controls element @@ -217,7 +216,6 @@ class SelectionHandler { * * @param pointer * @returns {undefined} - * @private */ getEdgeAt(pointer, returnEdge = true) { let positionObject = this._pointerToPositionObject(pointer); @@ -277,6 +275,7 @@ class SelectionHandler { _removeFromSelection(obj) { if (obj instanceof Node) { delete this.selectionObj.nodes[obj.id]; + this._unselectConnectedEdges(obj); } else { delete this.selectionObj.edges[obj.id]; @@ -285,8 +284,6 @@ class SelectionHandler { /** * Unselect all. The selectionObj is useful for this. - * - * @private */ unselectAll() { for(let nodeId in this.selectionObj.nodes) { @@ -299,7 +296,7 @@ class SelectionHandler { this.selectionObj.edges[edgeId].unselect(); } } - + this.selectionObj = {nodes:{},edges:{}}; } @@ -575,7 +572,7 @@ class SelectionHandler { if (this.options.selectable === true) { for (let nodeId in this.selectionObj.nodes) { if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { - idArray.push(nodeId); + idArray.push(this.selectionObj.nodes[nodeId].id); } } } @@ -593,13 +590,54 @@ class SelectionHandler { if (this.options.selectable === true) { for (let edgeId in this.selectionObj.edges) { if (this.selectionObj.edges.hasOwnProperty(edgeId)) { - idArray.push(edgeId); + idArray.push(this.selectionObj.edges[edgeId].id); } } } return idArray; } + /** + * Updates the current selection + * @param {{nodes: Array., edges: Array.}} Selection + * @param {Object} options Options + */ + setSelection(selection, options = {}) { + let i, id; + + if (!selection || (!selection.nodes && !selection.edges)) + throw 'Selection must be an object with nodes and/or edges properties'; + // first unselect any selected node, if option is true or undefined + if (options.unselectAll || options.unselectAll === undefined) { + this.unselectAll(); + } + if (selection.nodes) { + for (i = 0; i < selection.nodes.length; i++) { + id = selection.nodes[i]; + + let node = this.body.nodes[id]; + if (!node) { + throw new RangeError('Node with id "' + id + '" not found'); + } + // don't select edges with it + this.selectObject(node, options.highlightEdges); + } + } + + if (selection.edges) { + for (i = 0; i < selection.edges.length; i++) { + id = selection.edges[i]; + + let edge = this.body.edges[id]; + if (!edge) { + throw new RangeError('Edge with id "' + id + '" not found'); + } + this.selectObject(edge); + } + } + this.body.emitter.emit('_requestRedraw'); + } + /** * select zero or more nodes with the option to highlight edges @@ -608,24 +646,10 @@ class SelectionHandler { * @param {boolean} [highlightEdges] */ selectNodes(selection, highlightEdges = true) { - let i, id; - if (!selection || (selection.length === undefined)) throw 'Selection must be an array with ids'; - - // first unselect any selected node - this.unselectAll(); - - for (i = 0; i < selection.length; i++) { - id = selection[i]; - - let node = this.body.nodes[id]; - if (!node) { - throw new RangeError('Node with id "' + id + '" not found'); - } - this.selectObject(node,highlightEdges); - } - this.body.emitter.emit('_requestRedraw'); + + this.setSelection({nodes: selection}, {highlightEdges: highlightEdges}); } @@ -635,24 +659,10 @@ class SelectionHandler { * selected nodes. */ selectEdges(selection) { - let i, id; - if (!selection || (selection.length === undefined)) throw 'Selection must be an array with ids'; - - // first unselect any selected objects - this.unselectAll(); - - for (i = 0; i < selection.length; i++) { - id = selection[i]; - - let edge = this.body.edges[id]; - if (!edge) { - throw new RangeError('Edge with id "' + id + '" not found'); - } - this.selectObject(edge); - } - this.body.emitter.emit('_requestRedraw'); + + this.setSelection({edges: selection}); } /** diff --git a/lib/network/modules/View.js b/lib/network/modules/View.js index 58683115..d1004c80 100644 --- a/lib/network/modules/View.js +++ b/lib/network/modules/View.js @@ -1,4 +1,6 @@ -var util = require('../../util'); +let util = require('../../util'); + +import NetworkUtil from '../NetworkUtil'; class View { constructor(body, canvas) { @@ -29,80 +31,25 @@ class View { } - /** - * Find the center position of the network - * @private - */ - _getRange(specificNodes = []) { - var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node; - if (specificNodes.length > 0) { - for (var i = 0; i < specificNodes.length; i++) { - node = this.body.nodes[specificNodes[i]]; - if (minX > (node.shape.boundingBox.left)) { - minX = node.shape.boundingBox.left; - } - if (maxX < (node.shape.boundingBox.right)) { - maxX = node.shape.boundingBox.right; - } - if (minY > (node.shape.boundingBox.top)) { - minY = node.shape.boundingBox.top; - } // top is negative, bottom is positive - if (maxY < (node.shape.boundingBox.bottom)) { - maxY = node.shape.boundingBox.bottom; - } // top is negative, bottom is positive - } - } - else { - for (var i = 0; i < this.body.nodeIndices.length; i++) { - node = this.body.nodes[this.body.nodeIndices[i]]; - if (minX > (node.shape.boundingBox.left)) { - minX = node.shape.boundingBox.left; - } - if (maxX < (node.shape.boundingBox.right)) { - maxX = node.shape.boundingBox.right; - } - if (minY > (node.shape.boundingBox.top)) { - minY = node.shape.boundingBox.top; - } // top is negative, bottom is positive - if (maxY < (node.shape.boundingBox.bottom)) { - maxY = node.shape.boundingBox.bottom; - } // top is negative, bottom is positive - } - } - - if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { - minY = 0, maxY = 0, minX = 0, maxX = 0; - } - return {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; - } - - - /** - * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; - * @returns {{x: number, y: number}} - * @private - */ - _findCenter(range) { - return {x: (0.5 * (range.maxX + range.minX)), - y: (0.5 * (range.maxY + range.minY))}; - } - - /** * This function zooms out to fit all data on screen based on amount of nodes * @param {Object} Options * @param {Boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false; */ fit(options = {nodes:[]}, initialZoom = false) { - var range; - var zoomLevel; + let range; + let zoomLevel; + if (options.nodes === undefined || options.nodes.length === 0) { + options.nodes = this.body.nodeIndices; + } + if (initialZoom === true) { // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation. - var positionDefined = 0; - for (var nodeId in this.body.nodes) { + let positionDefined = 0; + for (let nodeId in this.body.nodes) { if (this.body.nodes.hasOwnProperty(nodeId)) { - var node = this.body.nodes[nodeId]; + let node = this.body.nodes[nodeId]; if (node.predefinedPosition === true) { positionDefined += 1; } @@ -113,24 +60,24 @@ class View { return; } - range = this._getRange(options.nodes); + range = NetworkUtil.getRange(this.body.nodes, options.nodes); - var numberOfNodes = this.body.nodeIndices.length; + let numberOfNodes = this.body.nodeIndices.length; zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. // correct for larger canvasses. - var factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600); + let factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600); zoomLevel *= factor; } else { this.body.emitter.emit("_resizeNodes"); - range = this._getRange(options.nodes); + range = NetworkUtil.getRange(this.body.nodes, options.nodes); - var xDistance = Math.abs(range.maxX - range.minX) * 1.1; - var yDistance = Math.abs(range.maxY - range.minY) * 1.1; + let xDistance = Math.abs(range.maxX - range.minX) * 1.1; + let yDistance = Math.abs(range.maxY - range.minY) * 1.1; - var xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance; - var yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance; + let xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance; + let yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance; zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel; } @@ -142,8 +89,8 @@ class View { zoomLevel = 1.0; } - var center = this._findCenter(range); - var animationOptions = {position: center, scale: zoomLevel, animation: options.animation}; + let center = NetworkUtil.findCenter(range); + let animationOptions = {position: center, scale: zoomLevel, animation: options.animation}; this.moveTo(animationOptions); } @@ -157,7 +104,7 @@ class View { */ focus(nodeId, options = {}) { if (this.body.nodes[nodeId] !== undefined) { - var nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y}; + let nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y}; options.position = nodePosition; options.lockedOnNode = nodeId; @@ -229,9 +176,9 @@ class View { // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw // but at least then we'll have the target transition this.body.view.scale = this.targetScale; - var viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight}); + let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight}); - var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node + let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node x: viewCenter.x - options.position.x, y: viewCenter.y - options.position.y }; @@ -268,14 +215,14 @@ class View { * @private */ _lockedRedraw() { - var nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y}; - var viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight}); - var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node + let nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y}; + let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight}); + let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node x: viewCenter.x - nodePosition.x, y: viewCenter.y - nodePosition.y }; - var sourceTranslation = this.body.view.translation; - var targetTranslation = { + let sourceTranslation = this.body.view.translation; + let targetTranslation = { x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x, y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y }; @@ -300,7 +247,7 @@ class View { this.easingTime += this.animationSpeed; this.easingTime = finished === true ? 1.0 : this.easingTime; - var progress = util.easingFunctions[this.animationEasingFunction](this.easingTime); + let progress = util.easingFunctions[this.animationEasingFunction](this.easingTime); this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress; this.body.view.translation = { diff --git a/lib/network/modules/components/Edge.js b/lib/network/modules/components/Edge.js index 889c113a..415bf580 100644 --- a/lib/network/modules/components/Edge.js +++ b/lib/network/modules/components/Edge.js @@ -27,6 +27,7 @@ class Edge { throw "No body provided"; } this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; this.body = body; // initialize variables @@ -65,7 +66,7 @@ class Edge { } this.colorDirty = true; - Edge.parseOptions(this.options, options, true); + Edge.parseOptions(this.options, options, true, this.globalOptions); if (options.id !== undefined) {this.id = options.id;} if (options.from !== undefined) {this.fromId = options.from;} @@ -92,8 +93,9 @@ class Edge { return dataChanged; } - static parseOptions(parentOptions, newOptions, allowDeletion = false) { + static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}) { var fields = [ + 'arrowStrikethrough', 'id', 'from', 'hidden', @@ -104,6 +106,7 @@ class Edge { 'line', 'opacity', 'physics', + 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', @@ -115,29 +118,27 @@ class Edge { // only deep extend the items in the field array. These do not have shorthand. util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); - util.mergeOptions(parentOptions, newOptions, 'smooth'); - util.mergeOptions(parentOptions, newOptions, 'shadow'); + util.mergeOptions(parentOptions, newOptions, 'smooth', allowDeletion, globalOptions); + util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions); if (newOptions.dashes !== undefined && newOptions.dashes !== null) { parentOptions.dashes = newOptions.dashes; } else if (allowDeletion === true && newOptions.dashes === null) { - parentOptions.dashes = undefined; - delete parentOptions.dashes; + parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option. } // set the scaling newOptions if (newOptions.scaling !== undefined && newOptions.scaling !== null) { if (newOptions.scaling.min !== undefined) {parentOptions.scaling.min = newOptions.scaling.min;} if (newOptions.scaling.max !== undefined) {parentOptions.scaling.max = newOptions.scaling.max;} - util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label'); + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling); } else if (allowDeletion === true && newOptions.scaling === null) { - parentOptions.scaling = undefined; - delete parentOptions.scaling; + parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option. } - // hanlde multiple input cases for arrows + // handle multiple input cases for arrows if (newOptions.arrows !== undefined && newOptions.arrows !== null) { if (typeof newOptions.arrows === 'string') { let arrows = newOptions.arrows.toLowerCase(); @@ -146,21 +147,22 @@ class Edge { if (arrows.indexOf("from") != -1) {parentOptions.arrows.from.enabled = true;} } else if (typeof newOptions.arrows === 'object') { - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to'); - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle'); - util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from'); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', allowDeletion, globalOptions.arrows); } else { throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:" + JSON.stringify(newOptions.arrows)); } } else if (allowDeletion === true && newOptions.arrows === null) { - parentOptions.arrows = undefined; - delete parentOptions.arrows; + parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option. } - // hanlde multiple input cases for color + // handle multiple input cases for color if (newOptions.color !== undefined && newOptions.color !== null) { + // make a copy of the parent object in case this is referring to the global one (due to object create once, then update) + parentOptions.color = util.deepExtend({}, parentOptions.color, true); if (util.isString(newOptions.color)) { parentOptions.color.color = newOptions.color; parentOptions.color.highlight = newOptions.color; @@ -181,14 +183,16 @@ class Edge { } } else if (allowDeletion === true && newOptions.color === null) { - parentOptions.color = undefined; - delete parentOptions.color; + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options } // handle the font settings - if (newOptions.font !== undefined) { + if (newOptions.font !== undefined && newOptions.font !== null) { Label.parseOptions(parentOptions.font, newOptions); } + else if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } } @@ -343,6 +347,7 @@ class Edge { } this._setInteractionWidths(); + this.updateLabelModule(); } _setInteractionWidths() { @@ -369,17 +374,45 @@ class Edge { * @param {CanvasRenderingContext2D} ctx */ draw(ctx) { - let via = this.edgeType.drawLine(ctx, this.selected, this.hover); - this.drawArrows(ctx, via); - this.drawLabel (ctx, via); + // get the via node from the edge type + let viaNode = this.edgeType.getViaNode(); + let arrowData = {}; + + // restore edge targets to defaults + this.edgeType.fromPoint = this.edgeType.from; + this.edgeType.toPoint = this.edgeType.to; + + // from and to arrows give a different end point for edges. we set them here + if (this.options.arrows.from.enabled === true) { + arrowData.from = this.edgeType.getArrowData(ctx,'from', viaNode, this.selected, this.hover); + if (this.options.arrowStrikethrough === false) + this.edgeType.fromPoint = arrowData.from.core; + } + if (this.options.arrows.to.enabled === true) { + arrowData.to = this.edgeType.getArrowData(ctx,'to', viaNode, this.selected, this.hover); + if (this.options.arrowStrikethrough === false) + this.edgeType.toPoint = arrowData.to.core; + } + + // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly. + if (this.options.arrows.middle.enabled === true) { + arrowData.middle = this.edgeType.getArrowData(ctx,'middle', viaNode, this.selected, this.hover); + } + + // draw everything + this.edgeType.drawLine(ctx, this.selected, this.hover, viaNode); + this.drawArrows(ctx, arrowData); + this.drawLabel (ctx, viaNode); } - drawArrows(ctx, viaNode) { - if (this.options.arrows.from.enabled === true) {this.edgeType.drawArrowHead(ctx,'from', viaNode, this.selected, this.hover);} - if (this.options.arrows.middle.enabled === true) {this.edgeType.drawArrowHead(ctx,'middle', viaNode, this.selected, this.hover);} - if (this.options.arrows.to.enabled === true) {this.edgeType.drawArrowHead(ctx,'to', viaNode, this.selected, this.hover);} + + drawArrows(ctx, arrowData) { + if (this.options.arrows.from.enabled === true) {this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.from);} + if (this.options.arrows.middle.enabled === true) {this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.middle);} + if (this.options.arrows.to.enabled === true) {this.edgeType.drawArrowHead(ctx, this.selected, this.hover, arrowData.to);} } + drawLabel(ctx, viaNode) { if (this.options.label !== undefined) { // set style diff --git a/lib/network/modules/components/Node.js b/lib/network/modules/components/Node.js index 4d370851..d03aace0 100644 --- a/lib/network/modules/components/Node.js +++ b/lib/network/modules/components/Node.js @@ -48,6 +48,7 @@ import {printStyle} from "../../../shared/Validator"; class Node { constructor(options, body, imagelist, grouplist, globalOptions) { this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; this.body = body; this.edges = []; // all edges connected to this node @@ -125,7 +126,6 @@ class Node { if (options.size !== undefined) {this.baseSize = options.size;} if (options.value !== undefined) {options.value = parseFloat(options.value);} - // copy group options if (typeof options.group === 'number' || (typeof options.group === 'string' && options.group != '')) { var groupObj = this.grouplist.get(options.group); @@ -135,7 +135,7 @@ class Node { } // this transforms all shorthands into fully defined options - Node.parseOptions(this.options, options, true); + Node.parseOptions(this.options, options, true, this.globalOptions); // load the images if (this.options.image !== undefined) { @@ -150,7 +150,6 @@ class Node { this.updateLabelModule(); this.updateShape(currentShape); - if (options.hidden !== undefined || options.physics !== undefined) { return true; } @@ -163,8 +162,10 @@ class Node { * Static so it can also be used by the handler. * @param parentOptions * @param newOptions + * @param allowDeletion + * @param globalOptions */ - static parseOptions(parentOptions, newOptions, allowDeletion = false) { + static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}) { var fields = [ 'color', 'font', @@ -174,7 +175,7 @@ class Node { util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); // merge the shadow options into the parent. - util.mergeOptions(parentOptions, newOptions, 'shadow'); + util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions); // individual shape newOptions if (newOptions.color !== undefined && newOptions.color !== null) { @@ -182,8 +183,7 @@ class Node { util.fillIfDefined(parentOptions.color, parsedColor); } else if (allowDeletion === true && newOptions.color === null) { - parentOptions.color = undefined; - delete parentOptions.color; + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options } // handle the fixed options @@ -203,13 +203,16 @@ class Node { } // handle the font options - if (newOptions.font !== undefined) { + if (newOptions.font !== undefined && newOptions.font !== null) { Label.parseOptions(parentOptions.font, newOptions); } + else if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } // handle the scaling options, specifically the label part if (newOptions.scaling !== undefined) { - util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label'); + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling); } } @@ -378,6 +381,8 @@ class Node { this.options.size = this.baseSize; this.options.font.size = this.baseFontSize; } + + this.updateLabelModule(); } @@ -429,10 +434,10 @@ class 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 + this.shape.boundingBox.left < obj.right && + this.shape.boundingBox.right > obj.left && + this.shape.boundingBox.top < obj.bottom && + this.shape.boundingBox.bottom > obj.top ); } } diff --git a/lib/network/modules/components/algorithms/FloydWarshall.js b/lib/network/modules/components/algorithms/FloydWarshall.js index a41b7c79..e0d3f92d 100644 --- a/lib/network/modules/components/algorithms/FloydWarshall.js +++ b/lib/network/modules/components/algorithms/FloydWarshall.js @@ -23,8 +23,11 @@ class FloydWarshall { // put the weights for the edges in. This assumes unidirectionality. for (let i = 0; i < edgesArray.length; i++) { let edge = edges[edgesArray[i]]; - D_matrix[edge.fromId][edge.toId] = 1; - D_matrix[edge.toId][edge.fromId] = 1; + // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix + if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { + D_matrix[edge.fromId][edge.toId] = 1; + D_matrix[edge.toId][edge.fromId] = 1; + } } let nodeCount = nodesArray.length; diff --git a/lib/network/modules/components/edges/BezierEdgeDynamic.js b/lib/network/modules/components/edges/BezierEdgeDynamic.js index 60bb9dbf..0108d50a 100644 --- a/lib/network/modules/components/edges/BezierEdgeDynamic.js +++ b/lib/network/modules/components/edges/BezierEdgeDynamic.js @@ -9,16 +9,27 @@ class BezierEdgeDynamic extends BezierEdgeBase { } setOptions(options) { + // check if the physics has changed. + let physicsChange = false; + if (this.options.physics !== options.physics) { + physicsChange = true; + } + + // set the options and the to and from nodes this.options = options; this.id = this.options.id; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + + // setup the support node and connect this.setupSupportNode(); + this.connect(); // when we change the physics state of the edge, we reposition the support node. - if (this.options.physics !== options.physics) { + if (physicsChange === true) { this.via.setOptions({physics: this.options.physics}) this.positionBezierNode(); } - this.connect(); } connect() { @@ -28,7 +39,7 @@ class BezierEdgeDynamic extends BezierEdgeBase { this.via.setOptions({physics:false}) } else { - // fix weird behaviour where a selfreferencing node has physics enabled + // fix weird behaviour where a self referencing node has physics enabled if (this.from.id === this.to.id) { this.via.setOptions({physics: false}) } @@ -91,15 +102,24 @@ class BezierEdgeDynamic extends BezierEdgeBase { * @param {CanvasRenderingContext2D} ctx * @private */ - _line(ctx) { + _line(ctx, viaNode) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - ctx.quadraticCurveTo(this.via.x, this.via.y, this.to.x, this.to.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + // fallback to normal straight edges + if (viaNode.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); + } + else { + ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y); + } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); + } + + getViaNode() { return this.via; } @@ -107,14 +127,14 @@ class BezierEdgeDynamic extends BezierEdgeBase { /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way * @param percentage - * @param via + * @param viaNode * @returns {{x: number, y: number}} * @private */ - getPoint(percentage) { + getPoint(percentage, viaNode = this.via) { let t = percentage; - let x = Math.pow(1 - t, 2) * this.from.x + (2 * t * (1 - t)) * this.via.x + Math.pow(t, 2) * this.to.x; - let y = Math.pow(1 - t, 2) * this.from.y + (2 * t * (1 - t)) * this.via.y + Math.pow(t, 2) * this.to.y; + let x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + let y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; return {x: x, y: y}; } diff --git a/lib/network/modules/components/edges/BezierEdgeStatic.js b/lib/network/modules/components/edges/BezierEdgeStatic.js index 9b3619b0..d70ed7c0 100644 --- a/lib/network/modules/components/edges/BezierEdgeStatic.js +++ b/lib/network/modules/components/edges/BezierEdgeStatic.js @@ -10,28 +10,34 @@ class BezierEdgeStatic extends BezierEdgeBase { * @param {CanvasRenderingContext2D} ctx * @private */ - _line(ctx) { + _line(ctx, viaNode) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - let via = this._getViaCoordinates(); - let returnValue = via; + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges - if (via.x === undefined) { - ctx.lineTo(this.to.x, this.to.y); - returnValue = undefined; + if (viaNode.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); } else { - ctx.quadraticCurveTo(via.x, via.y, this.to.x, this.to.y); + ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y); } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return returnValue; } + getViaNode() { + return this._getViaCoordinates(); + } + + + /** + * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows. + * @returns {{x: undefined, y: undefined}} + * @private + */ _getViaCoordinates() { let xVia = undefined; let yVia = undefined; @@ -214,21 +220,21 @@ class BezierEdgeStatic extends BezierEdgeBase { return this._findBorderPositionBezier(nearNode, ctx, options.via); } - _getDistanceToEdge(x1, y1, x2, y2, x3, y3, via = this._getViaCoordinates()) { // x3,y3 is the point - return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via); + _getDistanceToEdge(x1, y1, x2, y2, x3, y3, viaNode = this._getViaCoordinates()) { // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); } /** * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way * @param percentage - * @param via + * @param viaNode * @returns {{x: number, y: number}} * @private */ - getPoint(percentage, via = this._getViaCoordinates()) { + getPoint(percentage, viaNode = this._getViaCoordinates()) { var t = percentage; - var x = Math.pow(1 - t, 2) * this.from.x + (2 * t * (1 - t)) * via.x + Math.pow(t, 2) * this.to.x; - var y = Math.pow(1 - t, 2) * this.from.y + (2 * t * (1 - t)) * via.y + Math.pow(t, 2) * this.to.y; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; return {x: x, y: y}; } diff --git a/lib/network/modules/components/edges/CubicBezierEdge.js b/lib/network/modules/components/edges/CubicBezierEdge.js index b5a3b3b3..e7b76695 100644 --- a/lib/network/modules/components/edges/CubicBezierEdge.js +++ b/lib/network/modules/components/edges/CubicBezierEdge.js @@ -10,28 +10,26 @@ class CubicBezierEdge extends CubicBezierEdgeBase { * @param {CanvasRenderingContext2D} ctx * @private */ - _line(ctx) { + _line(ctx, viaNodes) { // get the coordinates of the support points. - let [via1,via2] = this._getViaCoordinates(); - let returnValue = [via1,via2]; + let via1 = viaNodes[0]; + let via2 = viaNodes[1]; // start drawing the line. ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges - if (via1.x === undefined) { - ctx.lineTo(this.to.x, this.to.y); - returnValue = undefined; + if (viaNodes === undefined || via1.x === undefined) { + ctx.lineTo(this.toPoint.x, this.toPoint.y); } else { - ctx.bezierCurveTo(via1.x, via1.y, via2.x, via2.y, this.to.x, this.to.y); + ctx.bezierCurveTo(via1.x, via1.y, via2.x, via2.y, this.toPoint.x, this.toPoint.y); } // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); - return returnValue; } _getViaCoordinates() { @@ -39,7 +37,7 @@ class CubicBezierEdge extends CubicBezierEdgeBase { let dy = this.from.y - this.to.y; let x1, y1, x2, y2; - let roundness = this.options.smooth.roundness;; + let roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') { @@ -58,6 +56,10 @@ class CubicBezierEdge extends CubicBezierEdgeBase { return [{x: x1, y: y1},{x: x2, y: y2}]; } + getViaNode() { + return this._getViaCoordinates(); + } + _findBorderPosition(nearNode, ctx) { return this._findBorderPositionBezier(nearNode, ctx); } @@ -80,8 +82,8 @@ class CubicBezierEdge extends CubicBezierEdgeBase { vec[1] = 3 * t * Math.pow(1 - t, 2); vec[2] = 3 * Math.pow(t,2) * (1 - t); vec[3] = Math.pow(t, 3); - let x = vec[0] * this.from.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.to.x; - let y = vec[0] * this.from.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.to.y; + let x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x; + let y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y; return {x: x, y: y}; } diff --git a/lib/network/modules/components/edges/StraightEdge.js b/lib/network/modules/components/edges/StraightEdge.js index 0fc08a0f..6d7bf231 100644 --- a/lib/network/modules/components/edges/StraightEdge.js +++ b/lib/network/modules/components/edges/StraightEdge.js @@ -13,12 +13,15 @@ class StraightEdge extends EdgeBase { _line(ctx) { // draw a straight line ctx.beginPath(); - ctx.moveTo(this.from.x, this.from.y); - ctx.lineTo(this.to.x, this.to.y); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled this.enableShadow(ctx); ctx.stroke(); this.disableShadow(ctx); + } + + getViaNode() { return undefined; } @@ -31,8 +34,8 @@ class StraightEdge extends EdgeBase { */ getPoint(percentage) { return { - x: (1 - percentage) * this.from.x + percentage * this.to.x, - y: (1 - percentage) * this.from.y + percentage * this.to.y + x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x, + y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y } } diff --git a/lib/network/modules/components/edges/util/EdgeBase.js b/lib/network/modules/components/edges/util/EdgeBase.js index 86412f94..659313a1 100644 --- a/lib/network/modules/components/edges/util/EdgeBase.js +++ b/lib/network/modules/components/edges/util/EdgeBase.js @@ -4,11 +4,14 @@ class EdgeBase { constructor(options, body, labelModule) { this.body = body; this.labelModule = labelModule; + this.options = {}; this.setOptions(options); this.colorDirty = true; this.color = {}; this.selectionWidth = 2; this.hoverWidth = 1.5; + this.fromPoint = this.from; + this.toPoint = this.to; } connect() { @@ -31,36 +34,32 @@ class EdgeBase { * @param {CanvasRenderingContext2D} ctx * @private */ - drawLine(ctx, selected, hover) { + drawLine(ctx, selected, hover, viaNode) { // set style ctx.strokeStyle = this.getColor(ctx, selected, hover); ctx.lineWidth = this.getLineWidth(selected, hover); - let via = undefined; + if (this.options.dashes !== false) { - via = this._drawDashedLine(ctx); + this._drawDashedLine(ctx, viaNode); } else { - via = this._drawLine(ctx); + this._drawLine(ctx, viaNode); } - return via; } - _drawLine(ctx) { - let via = undefined; + _drawLine(ctx, viaNode, fromPoint, toPoint) { if (this.from != this.to) { // draw line - via = this._line(ctx); + this._line(ctx, viaNode, fromPoint, toPoint); } else { let [x,y,radius] = this._getCircleData(ctx); this._circle(ctx, x, y, radius); } - return via; } - _drawDashedLine(ctx) { - let via = undefined; + _drawDashedLine(ctx, viaNode, fromPoint, toPoint) { ctx.lineCap = 'round'; let pattern = [5,5]; if (Array.isArray(this.options.dashes) === true) { @@ -78,7 +77,7 @@ class EdgeBase { // draw the line if (this.from != this.to) { // draw line - via = this._line(ctx); + this._line(ctx, viaNode); } else { let [x,y,radius] = this._getCircleData(ctx); @@ -107,7 +106,6 @@ class EdgeBase { // disable shadows for other elements. this.disableShadow(ctx); } - return via; } @@ -399,26 +397,22 @@ class EdgeBase { return Math.sqrt(dx * dx + dy * dy); } + /** * * @param ctx * @param position * @param viaNode */ - drawArrowHead(ctx, position, viaNode, selected, hover) { - // set style - ctx.strokeStyle = this.getColor(ctx, selected, hover); - ctx.fillStyle = ctx.strokeStyle; - ctx.lineWidth = this.getLineWidth(selected, hover); - + getArrowData(ctx, position, viaNode, selected, hover) { // set lets let angle; - let length; - let arrowPos; + let arrowPoint; let node1; let node2; let guideOffset; let scaleFactor; + let lineWidth = this.getLineWidth(selected, hover); if (position === 'from') { node1 = this.from; @@ -443,67 +437,74 @@ class EdgeBase { if (position !== 'middle') { // draw arrow head if (this.options.smooth.enabled === true) { - arrowPos = this.findBorderPosition(node1, ctx, {via: viaNode}); - let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPos.t + guideOffset)), viaNode); - angle = Math.atan2((arrowPos.y - guidePos.y), (arrowPos.x - guidePos.x)); + arrowPoint = this.findBorderPosition(node1, ctx, {via: viaNode}); + let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode); + angle = Math.atan2((arrowPoint.y - guidePos.y), (arrowPoint.x - guidePos.x)); } else { angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x)); - arrowPos = this.findBorderPosition(node1, ctx); + arrowPoint = this.findBorderPosition(node1, ctx); } } else { angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x)); - arrowPos = this.getPoint(0.6, viaNode); // this is 0.6 to account for the size of the arrow. + arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. } - // draw arrow at the end of the line - length = (10 + 5 * this.options.width) * scaleFactor; - ctx.arrow(arrowPos.x, arrowPos.y, angle, length); - - // draw shadow if enabled - this.enableShadow(ctx); - ctx.fill(); - - // disable shadows for other elements. - this.disableShadow(ctx); - ctx.stroke(); } else { // draw circle - let angle, point; let [x,y,radius] = this._getCircleData(ctx); if (position === 'from') { - point = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); - angle = point.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; } else if (position === 'to') { - point = this.findBorderPosition(this.from, ctx, {x, y, low:0.6, high:1.0, direction:1}); - angle = point.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.6, high:1.0, direction:1}); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; } else { - point = this._pointOnCircle(x, y, radius, 0.175); + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; } + } - // draw the arrowhead - let length = (10 + 5 * this.options.width) * scaleFactor; - ctx.arrow(point.x, point.y, angle, length); + let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. - // draw shadow if enabled - this.enableShadow(ctx); - ctx.fill(); + var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); + var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); + let arrowCore = {x: xi, y: yi}; - // disable shadows for other elements. - this.disableShadow(ctx); - ctx.stroke(); - } + return {point: arrowPoint, core: arrowCore, angle: angle, length: length}; + } + + /** + * + * @param ctx + * @param selected + * @param hover + * @param arrowData + */ + drawArrowHead(ctx, selected, hover, arrowData) { + // set style + ctx.strokeStyle = this.getColor(ctx, selected, hover); + ctx.fillStyle = ctx.strokeStyle; + ctx.lineWidth = this.getLineWidth(selected, hover); + + // draw arrow at the end of the line + ctx.arrow(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length); + + // draw shadow if enabled + this.enableShadow(ctx); + ctx.fill(); + // disable shadows for other elements. + this.disableShadow(ctx); } enableShadow(ctx) { if (this.options.shadow.enabled === true) { - ctx.shadowColor = 'rgba(0,0,0,0.5)'; + ctx.shadowColor = this.options.shadow.color; ctx.shadowBlur = this.options.shadow.size; ctx.shadowOffsetX = this.options.shadow.x; ctx.shadowOffsetY = this.options.shadow.y; diff --git a/lib/network/modules/components/nodes/shapes/Box.js b/lib/network/modules/components/nodes/shapes/Box.js index 9e9b78f5..d2d15740 100644 --- a/lib/network/modules/components/nodes/shapes/Box.js +++ b/lib/network/modules/components/nodes/shapes/Box.js @@ -44,34 +44,39 @@ class Box extends NodeBase { //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); - this.updateBoundingBox(x,y); + this.updateBoundingBox(x,y,ctx,selected); this.labelModule.draw(ctx, x, y, selected); } - updateBoundingBox(x,y) { + updateBoundingBox(x,y, ctx, selected) { + this.resize(ctx, selected); this.left = x - this.width * 0.5; this.top = y - this.height * 0.5; - this.boundingBox.left = this.left; - this.boundingBox.top = this.top; - this.boundingBox.bottom = this.top + this.height; - this.boundingBox.right = this.left + this.width; + let borderRadius = this.options.shapeProperties.borderRadius; // only effective for box + this.boundingBox.left = this.left - borderRadius; + this.boundingBox.top = this.top - borderRadius; + this.boundingBox.bottom = this.top + this.height + borderRadius; + this.boundingBox.right = this.left + this.width + borderRadius; } distanceToBorder(ctx, angle) { this.resize(ctx); - let a = this.width / 2; - let b = this.height / 2; - let w = (Math.sin(angle) * a); - let h = (Math.cos(angle) * b); - return a * b / Math.sqrt(w * w + h * h); + let borderWidth = this.options.borderWidth; + + return Math.min( + Math.abs((this.width) / 2 / Math.cos(angle)), + Math.abs((this.height) / 2 / Math.sin(angle))) + borderWidth; } } diff --git a/lib/network/modules/components/nodes/shapes/Circle.js b/lib/network/modules/components/nodes/shapes/Circle.js index 3bfb828f..221e92df 100644 --- a/lib/network/modules/components/nodes/shapes/Circle.js +++ b/lib/network/modules/components/nodes/shapes/Circle.js @@ -45,11 +45,7 @@ class Circle extends CircleImageBase { distanceToBorder(ctx, angle) { this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = (Math.sin(angle) * a); - var h = (Math.cos(angle) * b); - return a * b / Math.sqrt(w * w + h * h); + return this.width * 0.5; } } diff --git a/lib/network/modules/components/nodes/shapes/CircularImage.js b/lib/network/modules/components/nodes/shapes/CircularImage.js index 7b4121c0..7d04b3f5 100644 --- a/lib/network/modules/components/nodes/shapes/CircularImage.js +++ b/lib/network/modules/components/nodes/shapes/CircularImage.js @@ -38,10 +38,10 @@ class CircularImage extends CircleImageBase { let size = Math.min(0.5*this.height, 0.5*this.width); - // draw the backgroun circle. IMPORTANT: the stroke in this method is used by the clip method below. + // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below. this._drawRawCircle(ctx, x, y, selected, hover, size); - // now we draw in the cicle, we save so we can revert the clip operation after drawing. + // now we draw in the circle, we save so we can revert the clip operation after drawing. ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in. ctx.clip(); @@ -68,7 +68,7 @@ class CircularImage extends CircleImageBase { distanceToBorder(ctx, angle) { this.resize(ctx); - return this._distanceToBorder(angle); + return this.width * 0.5; } } diff --git a/lib/network/modules/components/nodes/shapes/Database.js b/lib/network/modules/components/nodes/shapes/Database.js index 8ab35d5c..dabc02ff 100644 --- a/lib/network/modules/components/nodes/shapes/Database.js +++ b/lib/network/modules/components/nodes/shapes/Database.js @@ -23,13 +23,12 @@ class Database extends NodeBase { this.left = x - this.width / 2; this.top = y - this.height / 2; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = (this.selected ? selectionLineWidth : borderWidth); - ctx.lineWidth *= this.networkScaleInv; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.database(x - this.width / 2, y - this.height * 0.5, this.width, this.height); @@ -43,11 +42,14 @@ class Database extends NodeBase { //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); this.updateBoundingBox(x,y,ctx,selected); @@ -67,12 +69,7 @@ class Database extends NodeBase { } distanceToBorder(ctx, angle) { - this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = (Math.sin(angle) * a); - var h = (Math.cos(angle) * b); - return a * b / Math.sqrt(w * w + h * h); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Diamond.js b/lib/network/modules/components/nodes/shapes/Diamond.js index 15d348bf..9a72caaa 100644 --- a/lib/network/modules/components/nodes/shapes/Diamond.js +++ b/lib/network/modules/components/nodes/shapes/Diamond.js @@ -16,7 +16,7 @@ class Diamond extends ShapeBase { } distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Dot.js b/lib/network/modules/components/nodes/shapes/Dot.js index 28fb920c..68409139 100644 --- a/lib/network/modules/components/nodes/shapes/Dot.js +++ b/lib/network/modules/components/nodes/shapes/Dot.js @@ -16,7 +16,8 @@ class Dot extends ShapeBase { } distanceToBorder(ctx, angle) { - return this.options.size + this.options.borderWidth; + this.resize(ctx); + return this.options.size; } } diff --git a/lib/network/modules/components/nodes/shapes/Ellipse.js b/lib/network/modules/components/nodes/shapes/Ellipse.js index 0265b1fe..b4d0a28a 100644 --- a/lib/network/modules/components/nodes/shapes/Ellipse.js +++ b/lib/network/modules/components/nodes/shapes/Ellipse.js @@ -25,15 +25,13 @@ class Ellipse extends NodeBase { this.left = x - this.width * 0.5; this.top = y - this.height * 0.5; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = (selected ? selectionLineWidth : borderWidth); - ctx.lineWidth /= this.body.view.scale; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); - ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.ellipse(this.left, this.top, this.width, this.height); @@ -46,11 +44,16 @@ class Ellipse extends NodeBase { //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } + ctx.restore(); this.updateBoundingBox(x, y, ctx, selected); diff --git a/lib/network/modules/components/nodes/shapes/Icon.js b/lib/network/modules/components/nodes/shapes/Icon.js index 183b0772..c01df052 100644 --- a/lib/network/modules/components/nodes/shapes/Icon.js +++ b/lib/network/modules/components/nodes/shapes/Icon.js @@ -75,8 +75,7 @@ class Icon extends NodeBase { } distanceToBorder(ctx, angle) { - this.resize(ctx); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Image.js b/lib/network/modules/components/nodes/shapes/Image.js index 78aef4b4..1a0e8aec 100644 --- a/lib/network/modules/components/nodes/shapes/Image.js +++ b/lib/network/modules/components/nodes/shapes/Image.js @@ -17,6 +17,42 @@ class Image extends CircleImageBase { this.left = x - this.width / 2; this.top = y - this.height / 2; + if (this.options.shapeProperties.useBorderWithImage === true) { + var neutralborderWidth = this.options.borderWidth; + var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + + ctx.beginPath(); + + // setup the line properties. + ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; + + // set a fillstyle + ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; + + // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image + ctx.rect(this.left - 0.5 * ctx.lineWidth, + this.top - 0.5 * ctx.lineWidth, + this.width + ctx.lineWidth, + this.height + ctx.lineWidth); + ctx.fill(); + + //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. + ctx.save(); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } + ctx.restore(); + + ctx.closePath(); + } + this._drawImageAtPosition(ctx); this._drawImageLabel(ctx, x, y, selected || hover); @@ -42,12 +78,7 @@ class Image extends CircleImageBase { } distanceToBorder(ctx, angle) { - this.resize(ctx); - var a = this.width / 2; - var b = this.height / 2; - var w = (Math.sin(angle) * a); - var h = (Math.cos(angle) * b); - return a * b / Math.sqrt(w * w + h * h); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Square.js b/lib/network/modules/components/nodes/shapes/Square.js index 80024615..e2fc6ebb 100644 --- a/lib/network/modules/components/nodes/shapes/Square.js +++ b/lib/network/modules/components/nodes/shapes/Square.js @@ -16,8 +16,7 @@ class Square extends ShapeBase { } distanceToBorder(ctx, angle) { - this.resize(); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Star.js b/lib/network/modules/components/nodes/shapes/Star.js index df23b458..4aae4fae 100644 --- a/lib/network/modules/components/nodes/shapes/Star.js +++ b/lib/network/modules/components/nodes/shapes/Star.js @@ -16,7 +16,7 @@ class Star extends ShapeBase { } distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Text.js b/lib/network/modules/components/nodes/shapes/Text.js index 4f0fb81a..ac22dc5c 100644 --- a/lib/network/modules/components/nodes/shapes/Text.js +++ b/lib/network/modules/components/nodes/shapes/Text.js @@ -45,8 +45,7 @@ class Text extends NodeBase { } distanceToBorder(ctx, angle) { - this.resize(ctx); - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/Triangle.js b/lib/network/modules/components/nodes/shapes/Triangle.js index c8aac1d7..6c58a4f1 100644 --- a/lib/network/modules/components/nodes/shapes/Triangle.js +++ b/lib/network/modules/components/nodes/shapes/Triangle.js @@ -16,7 +16,7 @@ class Triangle extends ShapeBase { } distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/shapes/TriangleDown.js b/lib/network/modules/components/nodes/shapes/TriangleDown.js index 6b64f595..044fd7c5 100644 --- a/lib/network/modules/components/nodes/shapes/TriangleDown.js +++ b/lib/network/modules/components/nodes/shapes/TriangleDown.js @@ -16,7 +16,7 @@ class TriangleDown extends ShapeBase { } distanceToBorder(ctx, angle) { - return this._distanceToBorder(angle); + return this._distanceToBorder(ctx,angle); } } diff --git a/lib/network/modules/components/nodes/util/CircleImageBase.js b/lib/network/modules/components/nodes/util/CircleImageBase.js index e4d9f803..0bf68a82 100644 --- a/lib/network/modules/components/nodes/util/CircleImageBase.js +++ b/lib/network/modules/components/nodes/util/CircleImageBase.js @@ -66,14 +66,12 @@ class CircleImageBase extends NodeBase { } _drawRawCircle(ctx, x, y, selected, hover, size) { - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - - ctx.lineWidth = (selected ? selectionLineWidth : borderWidth); - ctx.lineWidth *= this.networkScaleInv; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx.circle(x, y, size); @@ -86,11 +84,14 @@ class CircleImageBase extends NodeBase { //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); } @@ -102,8 +103,37 @@ class CircleImageBase extends NodeBase { // draw shadow if enabled this.enableShadow(ctx); - // draw image - ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height); + let factor = (this.imageObj.width / this.width) / this.body.view.scale; + if (factor > 2 && this.options.shapeProperties.interpolation === true) { + let w = this.imageObj.width; + let h = this.imageObj.height; + var can2 = document.createElement('canvas'); + can2.width = w; + can2.height = w; + var ctx2 = can2.getContext('2d'); + + factor *= 0.5; + w *= 0.5; + h *= 0.5; + ctx2.drawImage(this.imageObj, 0, 0, w, h); + + let distance = 0; + let iterations = 1; + while (factor > 2 && iterations < 4) { + ctx2.drawImage(can2, distance, 0, w, h, distance+w, 0, w/2, h/2); + distance += w; + factor *= 0.5; + w *= 0.5; + h *= 0.5; + iterations += 1; + } + ctx.drawImage(can2, distance, 0, w, h, this.left, this.top, this.width, this.height); + } + else { + // draw image + ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height); + } + // disable shadows for other elements. this.disableShadow(ctx); diff --git a/lib/network/modules/components/nodes/util/NodeBase.js b/lib/network/modules/components/nodes/util/NodeBase.js index a5f74167..1cf6bf53 100644 --- a/lib/network/modules/components/nodes/util/NodeBase.js +++ b/lib/network/modules/components/nodes/util/NodeBase.js @@ -15,8 +15,9 @@ class NodeBase { this.options = options; } - _distanceToBorder(angle) { - var borderWidth = 1; + _distanceToBorder(ctx,angle) { + var borderWidth = this.options.borderWidth; + this.resize(ctx); return Math.min( Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; @@ -24,7 +25,7 @@ class NodeBase { enableShadow(ctx) { if (this.options.shadow.enabled === true) { - ctx.shadowColor = 'rgba(0,0,0,0.5)'; + ctx.shadowColor = this.options.shadow.color; ctx.shadowBlur = this.options.shadow.size; ctx.shadowOffsetX = this.options.shadow.x; ctx.shadowOffsetY = this.options.shadow.y; diff --git a/lib/network/modules/components/nodes/util/ShapeBase.js b/lib/network/modules/components/nodes/util/ShapeBase.js index 62901f0c..d9e2cce2 100644 --- a/lib/network/modules/components/nodes/util/ShapeBase.js +++ b/lib/network/modules/components/nodes/util/ShapeBase.js @@ -20,13 +20,12 @@ class ShapeBase extends NodeBase { this.left = x - this.width / 2; this.top = y - this.height / 2; - var borderWidth = this.options.borderWidth; + var neutralborderWidth = this.options.borderWidth; var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; - ctx.lineWidth = (selected ? selectionLineWidth : borderWidth); - ctx.lineWidth /= this.body.view.scale; - ctx.lineWidth = Math.min(this.width, ctx.lineWidth); ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; ctx[shape](x, y, this.options.size); @@ -39,11 +38,14 @@ class ShapeBase extends NodeBase { //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. ctx.save(); - this.enableBorderDashes(ctx); - //draw the border - ctx.stroke(); - //disable dashed border for other elements - this.disableBorderDashes(ctx); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx); + } ctx.restore(); if (this.options.label !== undefined) { diff --git a/lib/network/modules/components/physics/BarnesHutSolver.js b/lib/network/modules/components/physics/BarnesHutSolver.js index b2da2d60..2c514e20 100644 --- a/lib/network/modules/components/physics/BarnesHutSolver.js +++ b/lib/network/modules/components/physics/BarnesHutSolver.js @@ -6,6 +6,9 @@ class BarnesHutSolver { this.barnesHutTree; this.setOptions(options); this.randomSeed = 5; + + // debug: show grid + //this.body.emitter.on("afterDrawing", (ctx) => {this._debug(ctx,'#ff0000')}) } setOptions(options) { @@ -21,7 +24,7 @@ class BarnesHutSolver { /** - * This function calculates the forces the nodes apply on eachother based on a gravitational model. + * This function calculates the forces the nodes apply on each other based on a gravitational model. * The Barnes Hut method is used to speed up this N-body simulation. * * @private @@ -285,7 +288,7 @@ class BarnesHutSolver { break; case 1: // convert into children // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) - // we move one node a pixel and we do not put it in the tree. + // we move one node a little bit and we do not put it in the tree. if (parentBranch.children[region].children.data.x === node.x && parentBranch.children[region].children.data.y === node.y) { node.x += this.seededRandom(); diff --git a/lib/network/options.js b/lib/network/options.js index ffab67fc..59c84641 100644 --- a/lib/network/options.js +++ b/lib/network/options.js @@ -29,6 +29,7 @@ let allOptions = { from: { enabled: { boolean }, scaleFactor: { number }, __type__: { object, boolean } }, __type__: { string: ['from', 'to', 'middle'], object } }, + arrowStrikethrough: { boolean }, color: { color: { string }, highlight: { string }, @@ -72,6 +73,7 @@ let allOptions = { selfReferenceSize: { number }, shadow: { enabled: { boolean }, + color: { string }, size: { number }, x: { number }, y: { number }, @@ -121,6 +123,11 @@ let allOptions = { hierarchical: { enabled: { boolean }, levelSeparation: { number }, + nodeSpacing: { number }, + treeSpacing: { number }, + blockShifting: { boolean }, + edgeMinimization: { boolean }, + parentCentralization: { boolean }, direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed __type__: { object, boolean } @@ -204,6 +211,7 @@ let allOptions = { }, shadow: { enabled: { boolean }, + color: { string }, size: { number }, x: { number }, y: { number }, @@ -213,7 +221,9 @@ let allOptions = { shapeProperties: { borderDashes: { boolean, array }, borderRadius: { number }, + interpolation: { boolean }, useImageSize: { boolean }, + useBorderWithImage: { boolean }, __type__: { object } }, size: { number }, @@ -344,6 +354,7 @@ let configureOptions = { }, shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: [10, 0, 20, 1], x: [5, -30, 30, 1], y: [5, -30, 30, 1] @@ -352,6 +363,7 @@ let configureOptions = { shapeProperties: { borderDashes: false, borderRadius: [6, 0, 20, 1], + interpolation: true, useImageSize: false }, size: [25, 0, 200, 1] @@ -362,6 +374,7 @@ let configureOptions = { middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05] }, from: { enabled: false, scaleFactor: [1, 0, 3, 0.05] } }, + arrowStrikethrough: true, color: { color: ['color', '#848484'], highlight: ['color', '#848484'], @@ -398,6 +411,7 @@ let configureOptions = { selfReferenceSize: [20, 0, 200, 1], shadow: { enabled: false, + color: 'rgba(0,0,0,0.5)', size: [10, 0, 20, 1], x: [5, -30, 30, 1], y: [5, -30, 30, 1] @@ -416,6 +430,11 @@ let configureOptions = { hierarchical: { enabled: false, levelSeparation: [150, 20, 500, 5], + nodeSpacing: [100, 20, 500, 5], + treeSpacing: [200, 20, 500, 5], + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL sortMethod: ['hubsize', 'directed'] // hubsize, directed } diff --git a/lib/shared/ColorPicker.js b/lib/shared/ColorPicker.js index a0d81b12..adbfe10b 100644 --- a/lib/shared/ColorPicker.js +++ b/lib/shared/ColorPicker.js @@ -16,6 +16,7 @@ class ColorPicker { // bound by this.updateCallback = () => {}; + this.closeCallback = () => {}; // create all DOM elements this._create(); @@ -42,12 +43,25 @@ class ColorPicker { * the callback is executed on apply and save. Bind it to the application * @param callback */ - setCallback(callback) { + setUpdateCallback(callback) { if (typeof callback === 'function') { this.updateCallback = callback; } else { - throw new Error("Function attempted to set as colorPicker callback is not a function."); + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } + } + + /** + * the callback is executed on apply and save. Bind it to the application + * @param callback + */ + setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } + else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); } } @@ -119,19 +133,20 @@ class ColorPicker { /** - * this shows the color picker at a location. The hue circle is constructed once and stored. - * @param x - * @param y + * this shows the color picker. + * The hue circle is constructed once and stored. */ - show(x,y) { + show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + this.applied = false; this.frame.style.display = 'block'; - this.frame.style.top = y + 'px'; - this.frame.style.left = x + 'px'; this._generateHueCircle(); } - // ------------------------------------------ PRIVATE ----------------------------- // /** @@ -151,6 +166,15 @@ class ColorPicker { } this.frame.style.display = 'none'; + + // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + setTimeout(() => { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + },0); } @@ -244,7 +268,7 @@ class ColorPicker { /** - * update the colorpicker. A black circle overlays the hue circle to mimic the brightness decreasing. + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. * @param rgba * @private */ diff --git a/lib/shared/Configurator.js b/lib/shared/Configurator.js index 8a1528e6..e564bc2d 100644 --- a/lib/shared/Configurator.js +++ b/lib/shared/Configurator.js @@ -140,7 +140,7 @@ class Configurator { // a header for the category this._makeHeader(option); - // get the suboptions + // get the sub options this._handleObject(this.configureOptions[option], [option]); } counter++; @@ -163,7 +163,7 @@ class Configurator { } this._push(); - this.colorPicker.insertTo(this.container); + //~ this.colorPicker.insertTo(this.container); } @@ -530,17 +530,25 @@ class Configurator { * @private */ _showColorPicker(value, div, path) { - let rect = div.getBoundingClientRect(); - let bodyRect = document.body.getBoundingClientRect(); - let pickerX = rect.left + rect.width + 5; - let pickerY = rect.top - bodyRect.top + rect.height +2; - this.colorPicker.show(pickerX,pickerY); + // clear the callback from this div + div.onclick = function() {}; + + this.colorPicker.insertTo(div); + this.colorPicker.show(); + this.colorPicker.setColor(value); - this.colorPicker.setCallback((color) => { + this.colorPicker.setUpdateCallback((color) => { let colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; div.style.backgroundColor = colorString; this._update(colorString,path); - }) + }); + + // on close of the colorpicker, restore the callback. + this.colorPicker.setCloseCallback(() => { + div.onclick = () => { + this._showColorPicker(value,div,path); + }; + }); } @@ -687,7 +695,6 @@ class Configurator { } } return optionsObj; - } _printOptions() { diff --git a/lib/shared/configuration.css b/lib/shared/configuration.css index d8becc87..1913c988 100644 --- a/lib/shared/configuration.css +++ b/lib/shared/configuration.css @@ -10,6 +10,11 @@ div.vis-configuration-wrapper { width:700px; } +div.vis-configuration-wrapper::after { + clear: both; + content: ""; + display: block; +} div.vis-configuration.vis-config-option-container{ display:block; @@ -111,7 +116,7 @@ input.vis-configuration.vis-config-rangeinput{ position:relative; top:-5px; width:60px; - height:13px; + /*height:13px;*/ padding:1px; margin:0; pointer-events:none; diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index c0c261bc..97281b73 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -91,13 +91,15 @@ Core.prototype._create = function (container) { this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); this.on('rangechange', function () { - this._redraw(); // this allows overriding the _redraw method + if (this.initialDrawDone === true) { + this._redraw(); // this allows overriding the _redraw method + } }.bind(this)); this.on('touch', this._onTouch.bind(this)); this.on('pan', this._onDrag.bind(this)); var me = this; - this.on('change', function (properties) { + this.on('_change', function (properties) { if (properties && properties.queue == true) { // redraw once on next tick if (!me._redrawTimer) { @@ -116,8 +118,9 @@ Core.prototype._create = function (container) { // create event listeners for all interesting events, these events will be // emitted via emitter this.hammer = new Hammer(this.dom.root); - this.hammer.get('pinch').set({enable: true}); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + var pinchRecognizer = this.hammer.get('pinch').set({enable: true}); + hammerUtil.disablePreventDefaultVertically(pinchRecognizer); + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); this.listeners = {}; var events = [ @@ -181,6 +184,7 @@ Core.prototype._create = function (container) { this.touch = {}; this.redrawCount = 0; + this.initialDrawDone = false; // attach the root panel to the provided container if (!container) throw new Error('No container provided'); @@ -223,6 +227,7 @@ Core.prototype.setOptions = function (options) { ]; util.selectiveExtend(fields, this.options, options); + this.options.orientation = {item:undefined,axis:undefined}; if ('orientation' in options) { if (typeof options.orientation === 'string') { this.options.orientation = { @@ -317,11 +322,12 @@ Core.prototype.setOptions = function (options) { // override redraw with a throttled version if (!this._origRedraw) { this._origRedraw = this._redraw.bind(this); + this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); + } else { + // Not the initial run: redraw everything + this._redraw(); } - this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); - // redraw everything - this._redraw(); }; /** @@ -409,6 +415,24 @@ Core.prototype.getCustomTime = function(id) { return customTimes[0].getCustomTime(); }; +/** + * Set a custom title for the custom time bar. + * @param {String} [title] Custom title + * @param {number} [id=undefined] Id of the custom time bar. + */ +Core.prototype.setCustomTimeTitle = function(title, id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + JSON.stringify(id)) + } + if (customTimes.length > 0) { + return customTimes[0].setCustomTitle(title); + } +}; + /** * Retrieve meta information from an event. * Should be overridden by classes extending Core @@ -603,12 +627,13 @@ Core.prototype.redraw = function() { * @protected */ Core.prototype._redraw = function() { + this.redrawCount++; var resized = false; var options = this.options; var props = this.props; var dom = this.dom; - if (!dom) return; // when destroyed + if (!dom|| !dom.container || dom.container.clientWidth == 0 ) return;// when destroyed, or invisible DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); @@ -744,22 +769,32 @@ Core.prototype._redraw = function() { dom.shadowTopRight.style.visibility = visibilityTop; dom.shadowBottomRight.style.visibility = visibilityBottom; + // enable/disable vertical panning + var contentsOverflow = this.props.center.height > this.props.centerContainer.height; + this.hammer.get('pan').set({ + direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL + }); + // redraw all components this.components.forEach(function (component) { resized = component.redraw() || resized; }); + var MAX_REDRAW = 5; if (resized) { - // keep repainting until all sizes are settled - var MAX_REDRAWS = 3; // maximum number of consecutive redraws - if (this.redrawCount < MAX_REDRAWS) { - this.redrawCount++; - this._redraw(); + if (this.redrawCount < MAX_REDRAW) { + this.body.emitter.emit('_change'); + return; } else { console.log('WARNING: infinite loop in redraw?'); } + } else { this.redrawCount = 0; } + this.initialDrawDone = true; + + //Emit public 'changed' event for UI updates, see issue #1592 + this.body.emitter.emit("changed"); }; // TODO: deprecated since version 1.1.0, remove some day @@ -889,7 +924,7 @@ Core.prototype._startAutoResize = function () { me.props.lastWidth = me.dom.root.offsetWidth; me.props.lastHeight = me.dom.root.offsetHeight; - me.emit('change'); + me.body.emitter.emit('_change'); } } }; @@ -897,6 +932,12 @@ Core.prototype._startAutoResize = function () { // add event listener to window resize util.addEventListener(window, 'resize', this._onResize); + //Prevent initial unnecessary redraw + if (me.dom.root) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; + } + this.watchTimer = setInterval(this._onResize, 1000); }; @@ -953,7 +994,6 @@ Core.prototype._onDrag = function (event) { if (newScrollTop != oldScrollTop) { - this._redraw(); // TODO: this causes two redraws when dragging, the other is triggered by rangechange already this.emit("verticalDrag"); } }; diff --git a/lib/timeline/DataStep.js b/lib/timeline/DataStep.js deleted file mode 100644 index 9bc67fec..00000000 --- a/lib/timeline/DataStep.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @constructor DataStep - * The class DataStep is an iterator for data for the lineGraph. You provide a start data point and an - * end data point. The class itself determines the best scale (step size) based on the - * provided start Date, end Date, and minimumStep. - * - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * - * Alternatively, you can set a scale by hand. - * After creation, you can initialize the class by executing first(). Then you - * can iterate from the start date to the end date via next(). You can check if - * the end date is reached with the function hasNext(). After each step, you can - * retrieve the current date via getCurrent(). - * The DataStep has scales ranging from milliseconds, seconds, minutes, hours, - * days, to years. - * - * Version: 1.2 - * - * @param {Date} [start] The start date, for example new Date(2010, 9, 21) - * or new Date(2010, 9, 21, 23, 45, 00) - * @param {Date} [end] The end date - * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds - */ -function DataStep(start, end, minimumStep, containerHeight, customRange, formattingFunction, alignZeros) { - // variables - this.current = 0; - - this.autoScale = true; - this.stepIndex = 0; - this.step = 1; - this.scale = 1; - this.formattingFunction = formattingFunction; - - this.marginStart; - this.marginEnd; - this.deadSpace = 0; - - this.majorSteps = [1, 2, 5, 10]; - this.minorSteps = [0.25, 0.5, 1, 2]; - - this.alignZeros = alignZeros; - - this.setRange(start, end, minimumStep, containerHeight, customRange); -} - - - -/** - * Set a new range - * If minimumStep is provided, the step size is chosen as close as possible - * to the minimumStep but larger than minimumStep. If minimumStep is not - * provided, the scale is set to 1 DAY. - * The minimumStep should correspond with the onscreen size of about 6 characters - * @param {Number} [start] The start date and time. - * @param {Number} [end] The end date and time. - * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds - */ -DataStep.prototype.setRange = function(start, end, minimumStep, containerHeight, customRange) { - this._start = customRange.min === undefined ? start : customRange.min; - this._end = customRange.max === undefined ? end : customRange.max; - if (this._start === this._end) { - this._start = customRange.min === undefined ? this._start - 0.75 : this._start; - this._end = customRange.max === undefined ? this._end + 1 : this._end;; - } - - if (this.autoScale === true) { - this.setMinimumStep(minimumStep, containerHeight); - } - - this.setFirst(customRange); -}; - -/** - * Automatically determine the scale that bests fits the provided minimum step - * @param {Number} [minimumStep] The minimum step size in pixels - */ -DataStep.prototype.setMinimumStep = function(minimumStep, containerHeight) { - // round to floor - var range = this._end - this._start; - var safeRange = range * 1.2; - var minimumStepValue = minimumStep * (safeRange / containerHeight); - var orderOfMagnitude = Math.round(Math.log(safeRange)/Math.LN10); - - var minorStepIdx = -1; - var magnitudefactor = Math.pow(10,orderOfMagnitude); - - var start = 0; - if (orderOfMagnitude < 0) { - start = orderOfMagnitude; - } - - var solutionFound = false; - for (var i = start; Math.abs(i) <= Math.abs(orderOfMagnitude); i++) { - magnitudefactor = Math.pow(10,i); - for (var j = 0; j < this.minorSteps.length; j++) { - var stepSize = magnitudefactor * this.minorSteps[j]; - if (stepSize >= minimumStepValue) { - solutionFound = true; - minorStepIdx = j; - break; - } - } - if (solutionFound === true) { - break; - } - } - this.stepIndex = minorStepIdx; - this.scale = magnitudefactor; - this.step = magnitudefactor * this.minorSteps[minorStepIdx]; -}; - - - -/** - * Round the current date to the first minor date value - * This must be executed once when the current date is set to start Date - */ -DataStep.prototype.setFirst = function(customRange) { - if (customRange === undefined) { - customRange = {}; - } - - var niceStart = customRange.min === undefined ? this._start - (this.scale * 2 * this.minorSteps[this.stepIndex]) : customRange.min; - var niceEnd = customRange.max === undefined ? this._end + (this.scale * this.minorSteps[this.stepIndex]) : customRange.max; - - this.marginEnd = customRange.max === undefined ? this.roundToMinor(niceEnd) : customRange.max; - this.marginStart = customRange.min === undefined ? this.roundToMinor(niceStart) : customRange.min; - - // if we need to align the zero's we need to make sure that there is a zero to use. - if (this.alignZeros === true && (this.marginEnd - this.marginStart) % this.step != 0) { - this.marginEnd += this.marginEnd % this.step; - } - - this.deadSpace = this.roundToMinor(niceEnd) - niceEnd + this.roundToMinor(niceStart) - niceStart; - this.marginRange = this.marginEnd - this.marginStart; - - this.current = this.marginEnd; -}; - -DataStep.prototype.roundToMinor = function(value) { - var rounded = value - (value % (this.scale * this.minorSteps[this.stepIndex])); - if (value % (this.scale * this.minorSteps[this.stepIndex]) > 0.5 * (this.scale * this.minorSteps[this.stepIndex])) { - return rounded + (this.scale * this.minorSteps[this.stepIndex]); - } - else { - return rounded; - } -} - - -/** - * Check if the there is a next step - * @return {boolean} true if the current date has not passed the end date - */ -DataStep.prototype.hasNext = function () { - return (this.current >= this.marginStart); -}; - -/** - * Do the next step - */ -DataStep.prototype.next = function() { - var prev = this.current; - this.current -= this.step; - - // safety mechanism: if current time is still unchanged, move to the end - if (this.current === prev) { - this.current = this._end; - } -}; - -/** - * Do the next step - */ -DataStep.prototype.previous = function() { - this.current += this.step; - this.marginEnd += this.step; - this.marginRange = this.marginEnd - this.marginStart; -}; - - - -/** - * Get the current datetime - * @return {String} current The current date - */ -DataStep.prototype.getCurrent = function() { - // prevent round-off errors when close to zero - var current = (Math.abs(this.current) < this.step / 2) ? 0 : this.current; - var returnValue = current.toPrecision(5); - if (typeof this.formattingFunction === 'function') { - returnValue = this.formattingFunction(current); - } - - if (typeof returnValue === 'number') { - return '' + returnValue; - } - else if (typeof returnValue === 'string') { - return returnValue; - } - else { - return current.toPrecision(5); - } - -}; - -/** - * Check if the current value is a major value (for example when the step - * is DAY, a major value is each first day of the MONTH) - * @return {boolean} true if current date is major, else false. - */ -DataStep.prototype.isMajor = function() { - return (this.current % (this.scale * this.majorSteps[this.stepIndex]) === 0); -}; - - -DataStep.prototype.shift = function(steps) { - if (steps < 0) { - for (let i = 0; i < -steps; i++) { - this.previous(); - } - } - else if (steps > 0) { - for (let i = 0; i < steps; i++) { - this.next(); - } - } -} - -module.exports = DataStep; diff --git a/lib/timeline/DateUtil.js b/lib/timeline/DateUtil.js index 0f93e3e8..1a8a9076 100644 --- a/lib/timeline/DateUtil.js +++ b/lib/timeline/DateUtil.js @@ -4,9 +4,13 @@ * * @param {function} moment * @param {Object} body - * @param {Array} hiddenDates + * @param {Array | Object} hiddenDates */ exports.convertHiddenOptions = function(moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.convertHiddenOptions(moment, body, [hiddenDates]) + } + body.hiddenDates = []; if (hiddenDates) { if (Array.isArray(hiddenDates) == true) { @@ -30,9 +34,13 @@ exports.convertHiddenOptions = function(moment, body, hiddenDates) { * create new entrees for the repeating hidden dates * @param {function} moment * @param {Object} body - * @param {Array} hiddenDates + * @param {Array | Object} hiddenDates */ exports.updateHiddenDates = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.updateHiddenDates(moment, body, [hiddenDates]) + } + if (hiddenDates && body.domProps.centerContainer.width !== undefined) { exports.convertHiddenOptions(moment, body, hiddenDates); @@ -135,7 +143,7 @@ exports.updateHiddenDates = function (moment, body, hiddenDates) { case "weekly": startDate.add(1, 'weeks'); endDate.add(1, 'weeks'); - break + break; case "monthly": startDate.add(1, 'months'); endDate.add(1, 'months'); diff --git a/lib/timeline/Graph2d.js b/lib/timeline/Graph2d.js index c4354df2..a5498eb5 100644 --- a/lib/timeline/Graph2d.js +++ b/lib/timeline/Graph2d.js @@ -27,7 +27,7 @@ var configureOptions = require('./optionsGraph2d').configureOptions; */ function Graph2d (container, items, groups, options) { // if the third element is options, the forth is groups (optionally); - if (!(Array.isArray(groups) || groups instanceof DataSet) && groups instanceof Object) { + if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) { var forthArgument = options; options = groups; groups = forthArgument; @@ -93,11 +93,13 @@ function Graph2d (container, items, groups, options) { // item set this.linegraph = new LineGraph(this.body); + this.components.push(this.linegraph); this.itemsData = null; // DataSet this.groupsData = null; // DataSet + this.on('tap', function (event) { me.emit('click', me.getEventProperties(event)) }); @@ -122,9 +124,9 @@ function Graph2d (container, items, groups, options) { if (items) { this.setItems(items); } - else { - this._redraw(); - } + + // draw for the first time + this._redraw(); } // Extend the functionality from Core @@ -173,7 +175,6 @@ Graph2d.prototype.setItems = function(items) { if (this.options.start != undefined || this.options.end != undefined) { var start = this.options.start != undefined ? this.options.start : null; var end = this.options.end != undefined ? this.options.end : null; - this.setWindow(start, end, {animation: false}); } else { @@ -217,7 +218,7 @@ Graph2d.prototype.getLegend = function(groupId, width, height) { return this.linegraph.groups[groupId].getLegend(width,height); } else { - return "cannot find group:" + groupId; + return "cannot find group:'" + groupId + "'"; } }; diff --git a/lib/timeline/Range.js b/lib/timeline/Range.js index 3d02930c..97e690e2 100644 --- a/lib/timeline/Range.js +++ b/lib/timeline/Range.js @@ -429,10 +429,14 @@ Range.prototype._onDrag = function (event) { this.previousDelta = delta; this._applyRange(newStart, newEnd); + + var startDate = new Date(this.start); + var endDate = new Date(this.end); + // fire a rangechange event this.body.emitter.emit('rangechange', { - start: new Date(this.start), - end: new Date(this.end), + start: startDate, + end: endDate, byUser: true }); }; @@ -551,7 +555,7 @@ Range.prototype._onPinch = function (event) { var scale = 1 / (event.scale + this.scaleOffset); var centerDate = this._pointerToDate(this.props.touch.center); - var hiddenDuration = DateUtil.getHiddenDurationBetween(this.options.moment, this.body.hiddenDates, this.start, this.end); + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate); var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; diff --git a/lib/timeline/TimeStep.js b/lib/timeline/TimeStep.js index c4412f3f..e7cb1888 100644 --- a/lib/timeline/TimeStep.js +++ b/lib/timeline/TimeStep.js @@ -47,8 +47,13 @@ function TimeStep(start, end, minimumStep, hiddenDates) { this.switchedDay = false; this.switchedMonth = false; this.switchedYear = false; - this.hiddenDates = hiddenDates; - if (hiddenDates === undefined) { + if (Array.isArray(hiddenDates)) { + this.hiddenDates = hiddenDates; + } + else if (hiddenDates != undefined) { + this.hiddenDates = [hiddenDates]; + } + else { this.hiddenDates = []; } diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 7cf4f176..e2bfd555 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -121,6 +121,28 @@ function Timeline (container, items, groups, options) { me.emit('contextmenu', me.getEventProperties(event)) }; + //Single time autoscale/fit + this.fitDone = false; + this.on('changed', function (){ + if (this.itemsData == null) return; + if (!me.fitDone) { + me.fitDone = true; + if (me.options.start != undefined || me.options.end != undefined) { + if (me.options.start == undefined || me.options.end == undefined) { + var range = me.getItemRange(); + } + + var start = me.options.start != undefined ? me.options.start : range.min; + var end = me.options.end != undefined ? me.options.end : range.max; + + me.setWindow(start, end, {animation: false}); + } + else { + me.fit({animation: false}); + } + } + }); + // apply options if (options) { this.setOptions(options); @@ -135,9 +157,9 @@ function Timeline (container, items, groups, options) { if (items) { this.setItems(items); } - else { - this._redraw(); - } + + // draw for the first time + this._redraw(); } // Extend the functionality from Core @@ -194,8 +216,6 @@ Timeline.prototype.setOptions = function (options) { * @param {vis.DataSet | Array | null} items */ Timeline.prototype.setItems = function(items) { - var initialLoad = (this.itemsData == null); - // convert to type DataSet when needed var newDataSet; if (!items) { @@ -217,22 +237,6 @@ Timeline.prototype.setItems = function(items) { // set items this.itemsData = newDataSet; this.itemSet && this.itemSet.setItems(newDataSet); - - if (initialLoad) { - if (this.options.start != undefined || this.options.end != undefined) { - if (this.options.start == undefined || this.options.end == undefined) { - var range = this.getItemRange(); - } - - var start = this.options.start != undefined ? this.options.start : range.min; - var end = this.options.end != undefined ? this.options.end : range.max; - - this.setWindow(start, end, {animation: false}); - } - else { - this.fit({animation: false}); - } - } }; /** @@ -379,8 +383,8 @@ Timeline.prototype.fit = function (options) { Timeline.prototype.getItemRange = function () { // get a rough approximation for the range based on the items start and end dates var range = this.getDataRange(); - var min = range.min; - var max = range.max; + var min = range.min !== null ? range.min.valueOf() : null; + var max = range.max !== null ? range.max.valueOf() : null; var minItem = null; var maxItem = null; @@ -403,12 +407,13 @@ Timeline.prototype.getItemRange = function () { // calculate the date of the left side and right side of the items given util.forEach(this.itemSet.items, function (item) { item.show(); + item.repositionX(); var start = getStart(item); var end = getEnd(item); - var left = new Date(start - (item.getWidthLeft() + 10) * factor); - var right = new Date(end + (item.getWidthRight() + 10) * factor); + var left = start - (item.getWidthLeft() + 10) * factor; + var right = end + (item.getWidthRight() + 10) * factor; if (left < min) { min = left; @@ -455,7 +460,7 @@ Timeline.prototype.getDataRange = function() { min = start; } if (max === null || end > max) { - max = start; + max = end; } }); } diff --git a/lib/timeline/component/CurrentTime.js b/lib/timeline/component/CurrentTime.js index c9479c52..ee1c7148 100644 --- a/lib/timeline/component/CurrentTime.js +++ b/lib/timeline/component/CurrentTime.js @@ -91,7 +91,7 @@ CurrentTime.prototype.redraw = function() { 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'); + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); this.warned = true; } locale = this.options.locales['en']; // fall back on english when not available @@ -129,6 +129,7 @@ CurrentTime.prototype.start = function() { if (interval > 1000) interval = 1000; me.redraw(); + me.body.emitter.emit('currentTimeTick'); // start a renderTimer to adjust for the new time me.currentTimeTimer = setTimeout(update, interval); diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index f71ac686..63c1545c 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -23,16 +23,17 @@ function CustomTime (body, options) { moment: moment, locales: locales, locale: 'en', - id: undefined + id: undefined, + title: undefined }; this.options = util.extend({}, this.defaultOptions); if (options && options.time) { this.customTime = options.time; } else { - this.customTime = new Date(); + this.customTime = new Date(); } - + this.eventParams = {}; // stores state parameters while dragging the bar this.setOptions(options); @@ -83,7 +84,7 @@ CustomTime.prototype._create = function() { this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); }; /** @@ -123,8 +124,12 @@ CustomTime.prototype.redraw = function () { locale = this.options.locales['en']; // fall back on english when not available } - var title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); - title = title.charAt(0).toUpperCase() + title.substring(1); + var title = this.options.title; + // To hide the title completely use empty string ''. + if (title === undefined) { + title = locale.time + ': ' + this.options.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; @@ -159,6 +164,14 @@ CustomTime.prototype.getCustomTime = function() { return new Date(this.customTime.valueOf()); }; +/** + * Set custom title. + * @param {Date | number | string} title + */ +CustomTime.prototype.setCustomTitle = function(title) { + this.options.title = title; +}; + /** * Start moving horizontally * @param {Event} event diff --git a/lib/timeline/component/DataAxis.js b/lib/timeline/component/DataAxis.js index 8e673207..61055666 100644 --- a/lib/timeline/component/DataAxis.js +++ b/lib/timeline/component/DataAxis.js @@ -1,8 +1,7 @@ var util = require('../../util'); var DOMutil = require('../../DOMutil'); var Component = require('./Component'); -var DataStep = require('../DataStep'); - +var DataScale = require('./DataScale'); /** * A horizontal time axis * @param {Object} [options] See DataAxis.setOptions for the available @@ -19,7 +18,7 @@ function DataAxis (body, options, svg, linegraphOptions) { orientation: 'left', // supported: 'left', 'right' showMinorLabels: true, showMajorLabels: true, - icons: true, + icons: false, majorLinesOffset: 7, minorLinesOffset: 4, labelOffsetX: 10, @@ -30,12 +29,12 @@ function DataAxis (body, options, svg, linegraphOptions) { alignZeros: true, left:{ range: {min:undefined,max:undefined}, - format: function (value) {return value;}, + format: function (value) {return ''+parseFloat(value.toPrecision(3));}, title: {text:undefined,style:undefined} }, right:{ range: {min:undefined,max:undefined}, - format: function (value) {return value;}, + format: function (value) {return ''+parseFloat(value.toPrecision(3));}, title: {text:undefined,style:undefined} } }; @@ -50,7 +49,7 @@ function DataAxis (body, options, svg, linegraphOptions) { }; this.dom = {}; - + this.scale= undefined; this.range = {start:0, end:0}; this.options = util.extend({}, this.defaultOptions); @@ -59,7 +58,7 @@ function DataAxis (body, options, svg, linegraphOptions) { this.setOptions(options); this.width = Number(('' + this.options.width).replace("px","")); this.minWidth = this.width; - this.height = this.linegraphSVG.offsetHeight; + this.height = this.linegraphSVG.getBoundingClientRect().height; this.hidden = false; this.stepPixels = 25; @@ -68,15 +67,16 @@ function DataAxis (body, options, svg, linegraphOptions) { this.lineOffset = 0; this.master = true; + this.masterAxis = null; this.svgElements = {}; this.iconsRemoved = false; - this.groups = {}; this.amountOfGroups = 0; // create the HTML DOM this._create(); + this.framework = {svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups}; var me = this; this.body.emitter.on("verticalDrag", function() { @@ -95,6 +95,9 @@ DataAxis.prototype.addGroup = function(label, graphOptions) { }; DataAxis.prototype.updateGroup = function(label, graphOptions) { + if (!this.groups.hasOwnProperty(label)) { + this.amountOfGroups += 1; + } this.groups[label] = graphOptions; }; @@ -128,10 +131,9 @@ DataAxis.prototype.setOptions = function (options) { 'right', 'alignZeros' ]; - util.selectiveExtend(fields, this.options, options); + util.selectiveDeepExtend(fields, this.options, options); this.minWidth = Number(('' + this.options.width).replace("px","")); - if (redraw === true && this.dom.frame) { this.hide(); this.show(); @@ -187,7 +189,7 @@ DataAxis.prototype._redrawGroupIcons = function () { for (var i = 0; i < groupArray.length; i++) { var groupId = groupArray[i]; if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) { - this.groups[groupId].drawIcon(x, y, this.svgElements, this.svg, iconWidth, iconHeight); + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); y += iconHeight + iconOffset; } } @@ -244,11 +246,6 @@ DataAxis.prototype.hide = function() { * @param end */ DataAxis.prototype.setRange = function (start, end) { - if (this.master === false && this.options.alignZeros === true && this.zeroCrossing != -1) { - if (start > 0) { - start = 0; - } - } this.range.start = start; this.range.end = end; }; @@ -260,7 +257,7 @@ DataAxis.prototype.setRange = function (start, end) { DataAxis.prototype.redraw = function () { var resized = false; var activeGroups = 0; - + // Make sure the line container adheres to the vertical scrolling. this.dom.lineContainer.style.top = this.body.domProps.scrollTop + 'px'; @@ -348,105 +345,60 @@ DataAxis.prototype._redrawLabels = function () { DOMutil.prepareElements(this.DOMelements.lines); DOMutil.prepareElements(this.DOMelements.labels); var orientation = this.options['orientation']; + var customRange = this.options[orientation].range != undefined? this.options[orientation].range:{}; - // get the range for the slaved axis - var step; - if (this.master === false) { - var stepSize, rangeStart, rangeEnd, minimumStep; - if (this.zeroCrossing !== -1 && this.options.alignZeros === true) { - if (this.range.end > 0) { - stepSize = this.range.end / this.zeroCrossing; // size of one step - rangeStart = this.range.end - this.amountOfSteps * stepSize; - rangeEnd = this.range.end; - } - else { - // all of the range (including start) has to be done before the zero crossing. - stepSize = -1 * this.range.start / (this.amountOfSteps - this.zeroCrossing); // absolute size of a step - rangeStart = this.range.start; - rangeEnd = this.range.start + stepSize * this.amountOfSteps; - } - } - else { - rangeStart = this.range.start; - rangeEnd = this.range.end; - } - minimumStep = this.stepPixels; + //Override range with manual options: + var autoScaleEnd = true; + if (customRange.max != undefined){ + this.range.end = customRange.max; + autoScaleEnd = false; } - else { - // calculate range and step (step such that we have space for 7 characters per label) - minimumStep = this.props.majorCharHeight; - rangeStart = this.range.start; - rangeEnd = this.range.end; + var autoScaleStart = true; + if (customRange.min != undefined){ + this.range.start = customRange.min; + autoScaleStart = false; } - this.step = step = new DataStep( - rangeStart, - rangeEnd, - minimumStep, + this.scale = new DataScale( + this.range.start, + this.range.end, + autoScaleStart, + autoScaleEnd, this.dom.frame.offsetHeight, - this.options[this.options.orientation].range, - this.options[this.options.orientation].format, - this.master === false && this.options.alignZeros // does the step have to align zeros? only if not master and the options is on + this.props.majorCharHeight, + this.options.alignZeros, + this.options[orientation].format ); - // the slave axis needs to use the same horizontal lines as the master axis. - if (this.master === true) { - this.stepPixels = ((this.dom.frame.offsetHeight) / step.marginRange) * step.step; - this.amountOfSteps = Math.ceil(this.dom.frame.offsetHeight / this.stepPixels); + if (this.master === false && this.masterAxis != undefined){ + this.scale.followScale(this.masterAxis.scale); } - else { - // align with zero - if (this.options.alignZeros === true && this.zeroCrossing !== -1) { - // distance is the amount of steps away from the zero crossing we are. - let distance = (step.current - this.zeroCrossing * step.step) / step.step; - this.step.shift(distance); - } - } - - // value at the bottom of the SVG - this.valueAtBottom = step.marginEnd; - + //Is updated in side-effect of _redrawLabel(): this.maxLabelSize = 0; - var y = 0; // init value - var stepIndex = 0; // init value - var isMajor = false; // init value - while (stepIndex < this.amountOfSteps) { - y = Math.round(stepIndex * this.stepPixels); - isMajor = step.isMajor(); - - if (stepIndex > 0 && stepIndex !== this.amountOfSteps) { - if (this.options['showMinorLabels'] && isMajor === false || this.master === false && this.options['showMinorLabels'] === true) { - this._redrawLabel(y - 2, step.getCurrent(), 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) { + var lines = this.scale.getLines(); + lines.forEach( + line=> { + var y = line.y; + var isMajor = line.major; + if (this.options['showMinorLabels'] && isMajor === false) { + this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-minor', this.props.minorCharHeight); + } + if (isMajor) { if (y >= 0) { - this._redrawLabel(y - 2, step.getCurrent(), orientation, 'vis-y-axis vis-major', this.props.majorCharHeight); + this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-major', this.props.majorCharHeight); } - this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', this.options.majorLinesOffset, this.props.majorLineWidth); } - else { - this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', this.options.minorLinesOffset, this.props.minorLineWidth); + if (this.master === true) { + if (isMajor) { + this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', this.options.majorLinesOffset, this.props.majorLineWidth); + } + else { + this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', this.options.minorLinesOffset, this.props.minorLineWidth); + } } - } - - // get zero crossing - if (this.master === true && step.current === 0) { - this.zeroCrossing = stepIndex; - } - - step.next(); - stepIndex += 1; - } - - // get zero crossing if it's the last step - if (this.master === true && step.current === 0) { - this.zeroCrossing = stepIndex; - } - - this.conversionFactor = this.stepPixels / step.step; + }); // Note that title is rotated, so we're using the height, not width! var titleWidth = 0; @@ -483,13 +435,11 @@ DataAxis.prototype._redrawLabels = function () { }; DataAxis.prototype.convertValue = function (value) { - var invertedValue = this.valueAtBottom - value; - var convertedValue = invertedValue * this.conversionFactor; - return convertedValue; + return this.scale.convertValue(value); }; DataAxis.prototype.screenToValue = function (x) { - return this.valueAtBottom - (x / this.conversionFactor); + return this.scale.screenToValue(x); }; /** diff --git a/lib/timeline/component/DataScale.js b/lib/timeline/component/DataScale.js new file mode 100644 index 00000000..a87477fb --- /dev/null +++ b/lib/timeline/component/DataScale.js @@ -0,0 +1,237 @@ +/** + * Created by ludo on 25-1-16. + */ + +function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight, zeroAlign = false, formattingFunction=false) { + this.majorSteps = [1, 2, 5, 10]; + this.minorSteps = [0.25, 0.5, 1, 2]; + this.customLines = null; + + this.containerHeight = containerHeight; + this.majorCharHeight = majorCharHeight; + this._start = start; + this._end = end; + + this.scale = 1; + this.minorStepIdx = -1; + this.magnitudefactor = 1; + this.determineScale(); + + this.zeroAlign = zeroAlign; + this.autoScaleStart = autoScaleStart; + this.autoScaleEnd = autoScaleEnd; + + this.formattingFunction = formattingFunction; + + if (autoScaleStart || autoScaleEnd) { + var me = this; + var roundToMinor = function (value) { + var rounded = value - (value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx])); + if (value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]) > 0.5 * (me.magnitudefactor * me.minorSteps[me.minorStepIdx])) { + return rounded + (me.magnitudefactor * me.minorSteps[me.minorStepIdx]); + } + else { + return rounded; + } + }; + if (autoScaleStart) { + this._start -= this.magnitudefactor * 2 * this.minorSteps[this.minorStepIdx]; + this._start = roundToMinor(this._start); + } + + if (autoScaleEnd) { + this._end += this.magnitudefactor * this.minorSteps[this.minorStepIdx]; + this._end = roundToMinor(this._end); + } + this.determineScale(); + } +} + +DataScale.prototype.setCharHeight = function (majorCharHeight) { + this.majorCharHeight = majorCharHeight; +}; + +DataScale.prototype.setHeight = function (containerHeight) { + this.containerHeight = containerHeight; +}; + +DataScale.prototype.determineScale = function () { + var range = this._end - this._start; + this.scale = this.containerHeight / range; + var minimumStepValue = this.majorCharHeight / this.scale; + var orderOfMagnitude = (range > 0) + ? Math.round(Math.log(range) / Math.LN10) + : 0; + + this.minorStepIdx = -1; + this.magnitudefactor = Math.pow(10, orderOfMagnitude); + + var start = 0; + if (orderOfMagnitude < 0) { + start = orderOfMagnitude; + } + + var solutionFound = false; + for (var l = start; Math.abs(l) <= Math.abs(orderOfMagnitude); l++) { + this.magnitudefactor = Math.pow(10, l); + for (var j = 0; j < this.minorSteps.length; j++) { + var stepSize = this.magnitudefactor * this.minorSteps[j]; + if (stepSize >= minimumStepValue) { + solutionFound = true; + this.minorStepIdx = j; + break; + } + } + if (solutionFound === true) { + break; + } + } +}; + +DataScale.prototype.is_major = function (value) { + return (value % (this.magnitudefactor * this.majorSteps[this.minorStepIdx]) === 0); +}; + +DataScale.prototype.getStep = function(){ + return this.magnitudefactor * this.minorSteps[this.minorStepIdx]; +}; + +DataScale.prototype.getFirstMajor = function(){ + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + return this.convertValue(this._start + ((majorStep - (this._start % majorStep)) % majorStep)); +}; + +DataScale.prototype.formatValue = function(current) { + var returnValue = current.toPrecision(5); + if (typeof this.formattingFunction === 'function') { + returnValue = this.formattingFunction(current); + } + + if (typeof returnValue === 'number') { + return '' + returnValue; + } + else if (typeof returnValue === 'string') { + return returnValue; + } + else { + return current.toPrecision(5); + } + +}; + +DataScale.prototype.getLines = function () { + var lines = []; + var step = this.getStep(); + var bottomOffset = (step - (this._start % step)) % step; + for (var i = (this._start + bottomOffset); this._end-i > 0.00001; i += step) { + if (i != this._start) { //Skip the bottom line + lines.push({major: this.is_major(i), y: this.convertValue(i), val: this.formatValue(i)}); + } + } + return lines; +}; + +DataScale.prototype.followScale = function (other) { + var oldStepIdx = this.minorStepIdx; + var oldStart = this._start; + var oldEnd = this._end; + + var me = this; + var increaseMagnitude = function () { + me.magnitudefactor *= 2; + }; + var decreaseMagnitude = function () { + me.magnitudefactor /= 2; + }; + + if ((other.minorStepIdx <= 1 && this.minorStepIdx <= 1) || (other.minorStepIdx > 1 && this.minorStepIdx > 1)) { + //easy, no need to change stepIdx nor multiplication factor + } else if (other.minorStepIdx < this.minorStepIdx) { + //I'm 5, they are 4 per major. + this.minorStepIdx = 1; + if (oldStepIdx == 2) { + increaseMagnitude(); + } else { + increaseMagnitude(); + increaseMagnitude(); + } + } else { + //I'm 4, they are 5 per major + this.minorStepIdx = 2; + if (oldStepIdx == 1) { + decreaseMagnitude(); + } else { + decreaseMagnitude(); + decreaseMagnitude(); + } + } + + //Get masters stats: + var lines = other.getLines(); + var otherZero = other.convertValue(0); + var otherStep = other.getStep() * other.scale; + + var done = false; + var count = 0; + //Loop until magnitude is correct for given constrains. + while (!done && count++ <5) { + + //Get my stats: + this.scale = otherStep / (this.minorSteps[this.minorStepIdx] * this.magnitudefactor); + var newRange = this.containerHeight / this.scale; + + //For the case the magnitudefactor has changed: + this._start = oldStart; + this._end = this._start + newRange; + + var myOriginalZero = this._end * this.scale; + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + var majorOffset = this.getFirstMajor() - other.getFirstMajor(); + + if (this.zeroAlign) { + var zeroOffset = otherZero - myOriginalZero; + this._end += (zeroOffset / this.scale); + this._start = this._end - newRange; + } else { + if (!this.autoScaleStart) { + this._start += majorStep - (majorOffset / this.scale); + this._end = this._start + newRange; + } else { + this._start -= majorOffset / this.scale; + this._end = this._start + newRange; + } + } + if (!this.autoScaleEnd && this._end > oldEnd+0.00001) { + //Need to decrease magnitude to prevent scale overshoot! (end) + decreaseMagnitude(); + done = false; + continue; + } + if (!this.autoScaleStart && this._start < oldStart-0.00001) { + if (this.zeroAlign && oldStart >= 0) { + console.warn("Can't adhere to given 'min' range, due to zeroalign"); + } else { + //Need to decrease magnitude to prevent scale overshoot! (start) + decreaseMagnitude(); + done = false; + continue; + } + } + if (this.autoScaleStart && this.autoScaleEnd && newRange < (oldEnd-oldStart)){ + increaseMagnitude(); + done = false; + continue; + } + done = true; + } +}; + +DataScale.prototype.convertValue = function (value) { + return this.containerHeight - ((value - this._start) * this.scale); +}; + +DataScale.prototype.screenToValue = function (pixels) { + return ((this.containerHeight - pixels) / this.scale) + this._start; +}; + +module.exports = DataScale; \ No newline at end of file diff --git a/lib/timeline/component/GraphGroup.js b/lib/timeline/component/GraphGroup.js index d9d53405..20f52e9f 100644 --- a/lib/timeline/component/GraphGroup.js +++ b/lib/timeline/component/GraphGroup.js @@ -1,7 +1,7 @@ var util = require('../../util'); var DOMutil = require('../../DOMutil'); -var Line = require('./graph2d_types/line'); -var Bar = require('./graph2d_types/bar'); +var Bars = require('./graph2d_types/bar'); +var Lines = require('./graph2d_types/line'); var Points = require('./graph2d_types/points'); /** @@ -14,10 +14,10 @@ var Points = require('./graph2d_types/points'); * It enumerates through the default styles * @constructor */ -function GraphGroup (group, groupId, options, groupsUsingDefaultStyles) { +function GraphGroup(group, groupId, options, groupsUsingDefaultStyles) { this.id = groupId; - var fields = ['sampling','style','sort','yAxisOrientation','barChart','drawPoints','shaded','interpolation'] - this.options = util.selectiveBridgeObject(fields,options); + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation', 'zIndex','excludeFromStacking', 'excludeFromLegend']; + this.options = util.selectiveBridgeObject(fields, options); this.usingDefaultStyle = group.className === undefined; this.groupsUsingDefaultStyles = groupsUsingDefaultStyles; this.zeroPosition = 0; @@ -29,20 +29,17 @@ function GraphGroup (group, groupId, options, groupsUsingDefaultStyles) { this.visible = group.visible === undefined ? true : group.visible; } - /** * this loads a reference to all items in this group into this group. * @param {array} items */ -GraphGroup.prototype.setItems = function(items) { +GraphGroup.prototype.setItems = function (items) { if (items != null) { this.itemsData = items; if (this.options.sort == true) { - this.itemsData.sort(function (a,b) {return a.x - b.x;}) - } - // typecast all items to numbers. Takes around 10ms for 500.000 items - for (var i = 0; i < this.itemsData.length; i++) { - this.itemsData[i].y = Number(this.itemsData[i].y); + util.insertSort(this.itemsData,function (a, b) { + return a.x > b.x ? 1 : -1; + }); } } else { @@ -50,35 +47,37 @@ GraphGroup.prototype.setItems = function(items) { } }; +GraphGroup.prototype.getItems = function () { + return this.itemsData; +} /** - * this is used for plotting barcharts, this way, we only have to calculate it once. + * this is used for barcharts and shading, this way, we only have to calculate it once. * @param pos */ -GraphGroup.prototype.setZeroPosition = function(pos) { +GraphGroup.prototype.setZeroPosition = function (pos) { this.zeroPosition = pos; }; - /** * set the options of the graph group over the default options. * @param options */ -GraphGroup.prototype.setOptions = function(options) { +GraphGroup.prototype.setOptions = function (options) { if (options !== undefined) { - var fields = ['sampling','style','sort','yAxisOrientation','barChart','excludeFromLegend']; + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'zIndex','excludeFromStacking', 'excludeFromLegend']; util.selectiveDeepExtend(fields, this.options, options); // if the group's drawPoints is a function delegate the callback to the onRender property if (typeof options.drawPoints == 'function') { - options.drawPoints = { - onRender: options.drawPoints - } + options.drawPoints = { + onRender: options.drawPoints + } } - - util.mergeOptions(this.options, options,'interpolation'); - util.mergeOptions(this.options, options,'drawPoints'); - util.mergeOptions(this.options, options,'shaded'); + + util.mergeOptions(this.options, options, 'interpolation'); + util.mergeOptions(this.options, options, 'drawPoints'); + util.mergeOptions(this.options, options, 'shaded'); if (options.interpolation) { if (typeof options.interpolation == 'object') { @@ -97,16 +96,6 @@ GraphGroup.prototype.setOptions = function(options) { } } } - - if (this.options.style == 'line') { - this.type = new Line(this.id, this.options); - } - else if (this.options.style == 'bar') { - this.type = new Bar(this.id, this.options); - } - else if (this.options.style == 'points') { - this.type = new Points(this.id, this.options); - } }; @@ -114,7 +103,7 @@ GraphGroup.prototype.setOptions = function(options) { * this updates the current group class with the latest group dataset entree, used in _updateGroup in linegraph * @param group */ -GraphGroup.prototype.update = function(group) { +GraphGroup.prototype.update = function (group) { this.group = group; this.content = group.content || 'graph'; this.className = group.className || this.className || 'vis-graph-group' + this.groupsUsingDefaultStyles[0] % 10; @@ -123,73 +112,6 @@ GraphGroup.prototype.update = function(group) { this.setOptions(group.options); }; - -/** - * draw the icon for the legend. - * - * @param x - * @param y - * @param JSONcontainer - * @param SVGcontainer - * @param iconWidth - * @param iconHeight - */ -GraphGroup.prototype.drawIcon = function(x, y, JSONcontainer, SVGcontainer, iconWidth, iconHeight) { - var fillHeight = iconHeight * 0.5; - var path, fillPath; - - var outline = DOMutil.getSVGElement("rect", JSONcontainer, SVGcontainer); - outline.setAttributeNS(null, "x", x); - outline.setAttributeNS(null, "y", y - fillHeight); - outline.setAttributeNS(null, "width", iconWidth); - outline.setAttributeNS(null, "height", 2*fillHeight); - outline.setAttributeNS(null, "class", "vis-outline"); - - if (this.options.style == 'line') { - path = DOMutil.getSVGElement("path", JSONcontainer, SVGcontainer); - path.setAttributeNS(null, "class", this.className); - if(this.style !== undefined) { - path.setAttributeNS(null, "style", this.style); - } - - path.setAttributeNS(null, "d", "M" + x + ","+y+" L" + (x + iconWidth) + ","+y+""); - if (this.options.shaded.enabled == true) { - fillPath = DOMutil.getSVGElement("path", JSONcontainer, SVGcontainer); - if (this.options.shaded.orientation == 'top') { - fillPath.setAttributeNS(null, "d", "M"+x+", " + (y - fillHeight) + - "L"+x+","+y+" L"+ (x + iconWidth) + ","+y+" L"+ (x + iconWidth) + "," + (y - fillHeight)); - } - else { - fillPath.setAttributeNS(null, "d", "M"+x+","+y+" " + - "L"+x+"," + (y + fillHeight) + " " + - "L"+ (x + iconWidth) + "," + (y + fillHeight) + - "L"+ (x + iconWidth) + ","+y); - } - fillPath.setAttributeNS(null, "class", this.className + " vis-icon-fill"); - } - - if (this.options.drawPoints.enabled == true) { - var groupTemplate = { - style: this.options.drawPoints.style, - size:this.options.drawPoints.size, - className: this.className - }; - DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, JSONcontainer, SVGcontainer); - } - } - else { - var barWidth = Math.round(0.3 * iconWidth); - var bar1Height = Math.round(0.4 * iconHeight); - var bar2Height = Math.round(0.75 * iconHeight); - - var offset = Math.round((iconWidth - (2 * barWidth))/3); - - DOMutil.drawBar(x + 0.5*barWidth + offset , y + fillHeight - bar1Height - 1, barWidth, bar1Height, this.className + ' vis-bar', JSONcontainer, SVGcontainer, this.style); - DOMutil.drawBar(x + 1.5*barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, this.className + ' vis-bar', JSONcontainer, SVGcontainer, this.style); - } -}; - - /** * return the legend entree for this group. * @@ -197,23 +119,40 @@ GraphGroup.prototype.drawIcon = function(x, y, JSONcontainer, SVGcontainer, icon * @param iconHeight * @returns {{icon: HTMLElement, label: (group.content|*|string), orientation: (.options.yAxisOrientation|*)}} */ -GraphGroup.prototype.getLegend = function(iconWidth, iconHeight) { - var svg = document.createElementNS('http://www.w3.org/2000/svg',"svg"); - this.drawIcon(0,0.5*iconHeight,[],svg,iconWidth,iconHeight); - return {icon: svg, label: this.content, orientation:this.options.yAxisOrientation}; -}; - -GraphGroup.prototype.getYRange = function(groupData) { - return this.type.getYRange(groupData); -}; - -GraphGroup.prototype.getData = function(groupData) { - return this.type.getData(groupData); +GraphGroup.prototype.getLegend = function (iconWidth, iconHeight, framework, x, y) { + if (framework == undefined || framework == null) { + var svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + framework = {svg: svg, svgElements:{}, options: this.options, groups: [this]} + } + if (x == undefined || x == null){ + x = 0; + } + if (y == undefined || y == null){ + y = 0.5 * iconHeight; + } + switch (this.options.style){ + case "line": + Lines.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "points": //explicit no break + case "point": + Points.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "bar": + Bars.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + } + return {icon: framework.svg, label: this.content, orientation: this.options.yAxisOrientation}; }; -GraphGroup.prototype.draw = function(dataset, group, framework) { - this.type.draw(dataset, group, framework); +GraphGroup.prototype.getYRange = function (groupData) { + var yMin = groupData[0].y; + var yMax = groupData[0].y; + for (var j = 0; j < groupData.length; j++) { + yMin = yMin > groupData[j].y ? groupData[j].y : yMin; + yMax = yMax < groupData[j].y ? groupData[j].y : yMax; + } + return {min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation}; }; - module.exports = GraphGroup; diff --git a/lib/timeline/component/Group.js b/lib/timeline/component/Group.js index 51761959..8a09e4ae 100644 --- a/lib/timeline/component/Group.js +++ b/lib/timeline/component/Group.js @@ -177,6 +177,9 @@ Group.prototype.redraw = function(range, margin, restack) { restack = true; } + // recalculate the height of the subgroups + this._calculateSubGroupHeights(); + // reposition visible items vertically if (typeof this.itemSet.options.order === 'function') { // a custom order function @@ -244,6 +247,25 @@ Group.prototype.redraw = function(range, margin, restack) { return resized; }; +/** + * recalculate the height of the subgroups + * @private + */ +Group.prototype._calculateSubGroupHeights = function () { + if (Object.keys(this.subgroups).length > 0) { + var me = this; + + this.resetSubgroups(); + + util.forEach(this.visibleItems, function (item) { + if (item.data.subgroup !== undefined) { + me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height); + me.subgroups[item.data.subgroup].visible = true; + } + }); + } +}; + /** * recalculate the height of the group * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin @@ -254,20 +276,12 @@ Group.prototype._calculateHeight = function (margin) { // recalculate the height of the group var height; var visibleItems = this.visibleItems; - //var visibleSubgroups = []; - //this.visibleSubgroups = 0; - this.resetSubgroups(); - var me = this; if (visibleItems.length > 0) { var min = visibleItems[0].top; var max = visibleItems[0].top + visibleItems[0].height; util.forEach(visibleItems, function (item) { min = Math.min(min, item.top); max = Math.max(max, (item.top + item.height)); - if (item.data.subgroup !== undefined) { - me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height,item.height); - me.subgroups[item.data.subgroup].visible = true; - } }); if (min > margin.axis) { // there is an empty gap between the lowest item and the axis diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index be30cf67..27aaee38 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -43,6 +43,7 @@ function ItemSet(body, options) { selectable: true, multiselect: false, + itemsAlwaysDraggable: false, editable: { updateTime: false, @@ -219,7 +220,7 @@ ItemSet.prototype._create = function(){ this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this)); - this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer. + this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); // single select (or unselect) when tapping an item this.hammer.on('tap', this._onSelectItem.bind(this)); @@ -234,7 +235,7 @@ ItemSet.prototype._create = function(){ this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); - this.groupHammer.get('pan').set({threshold:5, direction:30}); + this.groupHammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}); // attach to the DOM this.show(); @@ -307,7 +308,7 @@ ItemSet.prototype._create = function(){ ItemSet.prototype.setOptions = function(options) { if (options) { // copy all options that we know - var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; + var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; util.selectiveExtend(fields, this.options, options); if ('orientation' in options) { @@ -725,6 +726,8 @@ ItemSet.prototype.setItems = function(items) { // update the group holding all ungrouped items this._updateUngrouped(); } + + this.body.emitter.emit('_change', {queue: true}); }; /** @@ -784,7 +787,7 @@ ItemSet.prototype.setGroups = function(groups) { // update the order of all items in each group this._order(); - this.body.emitter.emit('change', {queue: true}); + this.body.emitter.emit('_change', {queue: true}); }; /** @@ -895,7 +898,7 @@ ItemSet.prototype._onUpdate = function(ids) { this._order(); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change', {queue: true}); + this.body.emitter.emit('_change', {queue: true}); }; /** @@ -925,7 +928,7 @@ ItemSet.prototype._onRemove = function(ids) { // update order this._order(); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change', {queue: true}); + this.body.emitter.emit('_change', {queue: true}); } }; @@ -995,7 +998,7 @@ ItemSet.prototype._onAddGroups = function(ids) { } }); - this.body.emitter.emit('change', {queue: true}); + this.body.emitter.emit('_change', {queue: true}); }; /** @@ -1016,7 +1019,7 @@ ItemSet.prototype._onRemoveGroups = function(ids) { this.markDirty(); - this.body.emitter.emit('change', {queue: true}); + this.body.emitter.emit('_change', {queue: true}); }; /** @@ -1160,7 +1163,7 @@ ItemSet.prototype._getGroupIndex = function(groupId) { if (groupId == this.groupIds[i]) return i; } -} +}; /** * Start dragging the selected events @@ -1172,10 +1175,10 @@ ItemSet.prototype._onDragStart = function (event) { var me = this; var props; - if (item && item.selected) { + if (item && (item.selected || this.options.itemsAlwaysDraggable)) { - if (!this.options.editable.updateTime && - !this.options.editable.updateGroup && + if (!this.options.editable.updateTime && + !this.options.editable.updateGroup && !item.editable) { return; } @@ -1193,7 +1196,7 @@ ItemSet.prototype._onDragStart = function (event) { item: dragLeftItem, initialX: event.center.x, dragLeft: true, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; this.touchParams.itemProps = [props]; @@ -1203,7 +1206,7 @@ ItemSet.prototype._onDragStart = function (event) { item: dragRightItem, initialX: event.center.x, dragRight: true, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; this.touchParams.itemProps = [props]; @@ -1213,18 +1216,18 @@ ItemSet.prototype._onDragStart = function (event) { var baseGroupIndex = this._getGroupIndex(item.data.group); - this.touchParams.itemProps = this.getSelection().map(function (id) { + var itemsToDrag = (this.options.itemsAlwaysDraggable && !item.selected) ? [item.id] : this.getSelection(); + + this.touchParams.itemProps = itemsToDrag.map(function (id) { var item = me.items[id]; var groupIndex = me._getGroupIndex(item.data.group); - var props = { + return { item: item, initialX: event.center.x, groupOffset: baseGroupIndex-groupIndex, - data: util.extend({}, item.data) // clone the items data + data: this._cloneItemData(item.data) }; - - return props; - }); + }.bind(this)); } event.stopPropagation(); @@ -1247,7 +1250,7 @@ ItemSet.prototype._onDragStartAddItem = function (event) { var time = this.body.util.toTime(x); var scale = this.body.util.getScale(); var step = this.body.util.getStep(); - var start = snap ? snap(time, scale, step) : start; + var start = snap ? snap(time, scale, step) : time; var end = start; var itemData = { @@ -1267,14 +1270,14 @@ ItemSet.prototype._onDragStartAddItem = function (event) { var newItem = new RangeItem(itemData, this.conversion, this.options); newItem.id = id; // TODO: not so nice setting id afterwards - newItem.data = itemData; + newItem.data = this._cloneItemData(itemData); this._addItem(newItem); var props = { item: newItem, dragRight: true, initialX: event.center.x, - data: util.extend({}, itemData) + data: newItem.data }; this.touchParams.itemProps = [props]; @@ -1301,32 +1304,30 @@ ItemSet.prototype._onDrag = function (event) { var updateGroupAllowed = me.options.editable.updateGroup; var newGroupBase = null; if (updateGroupAllowed && selectedItem) { - if (selectedItem.data.group != undefined) { - // drag from one group to another - var group = me.groupFromTarget(event); - if (group) { - //we know the offset for all items, so the new group for all items - //will be relative to this one. - newGroupBase = this._getGroupIndex(group.groupId); - } + if (selectedItem.data.group != undefined) { + // drag from one group to another + var group = me.groupFromTarget(event); + if (group) { + //we know the offset for all items, so the new group for all items + //will be relative to this one. + newGroupBase = this._getGroupIndex(group.groupId); } + } } // move this.touchParams.itemProps.forEach(function (props) { - var newProps = {}; var current = me.body.util.toTime(event.center.x - xOffset); var initial = me.body.util.toTime(props.initialX - xOffset); - var offset = current - initial; - - var itemData = util.extend({}, props.item.data); // clone the data + var offset = current - initial; // ms + var itemData = this._cloneItemData(props.item.data); // clone the data if (props.item.editable === false) { return; } - var updateTimeAllowed = me.options.editable.updateTime || - props.item.editable === true; + var updateTimeAllowed = me.options.editable.updateTime || + props.item.editable === true; if (updateTimeAllowed) { if (props.dragLeft) { @@ -1334,6 +1335,7 @@ ItemSet.prototype._onDrag = function (event) { if (itemData.start != undefined) { var initialStart = util.convert(props.data.start, 'Date'); var start = new Date(initialStart.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; } } @@ -1342,6 +1344,7 @@ ItemSet.prototype._onDrag = function (event) { if (itemData.end != undefined) { var initialEnd = util.convert(props.data.end, 'Date'); var end = new Date(initialEnd.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.end = snap ? snap(end, scale, step) : end; } } @@ -1355,18 +1358,20 @@ ItemSet.prototype._onDrag = function (event) { var initialEnd = util.convert(props.data.end, 'Date'); var duration = initialEnd.valueOf() - initialStart.valueOf(); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; itemData.end = new Date(itemData.start.valueOf() + duration); } else { + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) itemData.start = snap ? snap(start, scale, step) : start; } } } } - var updateGroupAllowed = me.options.editable.updateGroup || - props.item.editable === true; + var updateGroupAllowed = me.options.editable.updateGroup || + props.item.editable === true; if (updateGroupAllowed && (!props.dragLeft && !props.dragRight) && newGroupBase!=null) { if (itemData.group != undefined) { @@ -1381,15 +1386,16 @@ ItemSet.prototype._onDrag = function (event) { } // confirm moving the item + itemData = this._cloneItemData(itemData); // convert start and end to the correct type me.options.onMoving(itemData, function (itemData) { if (itemData) { - props.item.setData(itemData); + props.item.setData(this._cloneItemData(itemData, 'Date')); } - }); - }); + }.bind(this)); + }.bind(this)); this.stackDirty = true; // force re-stacking of all items next redraw - this.body.emitter.emit('change'); + this.body.emitter.emit('_change'); } }; @@ -1440,12 +1446,12 @@ ItemSet.prototype._onDragEnd = function (event) { // force re-stacking of all items next redraw me.stackDirty = true; - me.body.emitter.emit('change'); + me.body.emitter.emit('_change'); }); } else { // update existing item - var itemData = util.extend({}, props.item.data); // clone the data + var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type me.options.onMove(itemData, function (itemData) { if (itemData) { // apply changes @@ -1457,11 +1463,11 @@ ItemSet.prototype._onDragEnd = function (event) { props.item.setData(props.data); me.stackDirty = true; // force re-stacking of all items next redraw - me.body.emitter.emit('change'); + me.body.emitter.emit('_change'); } }); } - }); + }.bind(this)); } }; @@ -1687,8 +1693,6 @@ ItemSet.prototype._onAddItem = function (event) { var snap = this.options.snap || null; var item = this.itemFromTarget(event); - event.stopPropagation(); - if (item) { // update item @@ -1708,7 +1712,7 @@ ItemSet.prototype._onAddItem = function (event) { var scale = this.body.util.getScale(); var step = this.body.util.getStep(); - var newItem = { + var newItemData = { start: snap ? snap(start, scale, step) : start, content: 'new item' }; @@ -1716,18 +1720,19 @@ ItemSet.prototype._onAddItem = function (event) { // when default type is a range, add a default end date to the new item if (this.options.type === 'range') { var end = this.body.util.toTime(x + this.props.width / 5); - newItem.end = snap ? snap(end, scale, step) : end; + newItemData.end = snap ? snap(end, scale, step) : end; } - newItem[this.itemsData._fieldId] = util.randomUUID(); + newItemData[this.itemsData._fieldId] = util.randomUUID(); var group = this.groupFromTarget(event); if (group) { - newItem.group = group.groupId; + newItemData.group = group.groupId; } // execute async handler to customize (or cancel) adding an item - this.options.onAdd(newItem, function (item) { + newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type + this.options.onAdd(newItemData, function (item) { if (item) { me.itemsData.getDataSet().add(item); // TODO: need to trigger a redraw? @@ -1757,23 +1762,37 @@ ItemSet.prototype._onMultiSelectItem = function (event) { if (shiftKey && this.options.multiselect) { // select all items between the old selection and the tapped item - + var itemGroup = this.itemsData.get(item.id).group; + + // when filtering get the group of the last selected item + var lastSelectedGroup = undefined; + if (this.options.multiselectPerGroup) { + if (selection.length > 0) { + lastSelectedGroup = this.itemsData.get(selection[0]).group; + } + } + // determine the selection range - selection.push(item.id); + if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) { + selection.push(item.id); + } var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions)); - - // select all items within the selection range - selection = []; - for (var id in this.items) { - if (this.items.hasOwnProperty(id)) { - var _item = this.items[id]; - var start = _item.data.start; - var end = (_item.data.end !== undefined) ? _item.data.end : start; - - if (start >= range.min && - end <= range.max && - !(_item instanceof BackgroundItem)) { - selection.push(_item.id); // do not use id but item.id, id itself is stringified + + if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) { + // select all items within the selection range + selection = []; + for (var id in this.items) { + if (this.items.hasOwnProperty(id)) { + var _item = this.items[id]; + var start = _item.data.start; + var end = (_item.data.end !== undefined) ? _item.data.end : start; + + if (start >= range.min && + end <= range.max && + (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && + !(_item instanceof BackgroundItem)) { + selection.push(_item.id); // do not use id but item.id, id itself is stringified + } } } } @@ -1901,4 +1920,31 @@ ItemSet.itemSetFromTarget = function(event) { return null; }; +/** + * Clone the data of an item, and "normalize" it: convert the start and end date + * to the type (Date, Moment, ...) configured in the DataSet. If not configured, + * start and end are converted to Date. + * @param {Object} itemData, typically `item.data` + * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken + * @return {Object} The cloned object + * @private + */ +ItemSet.prototype._cloneItemData = function (itemData, type) { + var clone = util.extend({}, itemData); + + if (!type) { + // convert start and end date to the type (Date, Moment, ...) configured in the DataSet + type = this.itemsData.getDataSet()._options.type; + } + + if (clone.start != undefined) { + clone.start = util.convert(clone.start, type && type.start || 'Date'); + } + if (clone.end != undefined) { + clone.end = util.convert(clone.end , type && type.end || 'Date'); + } + + return clone; +}; + module.exports = ItemSet; diff --git a/lib/timeline/component/Legend.js b/lib/timeline/component/Legend.js index cedfe9fd..90b97259 100644 --- a/lib/timeline/component/Legend.js +++ b/lib/timeline/component/Legend.js @@ -8,7 +8,7 @@ var Component = require('./Component'); function Legend(body, options, side, linegraphOptions) { this.body = body; this.defaultOptions = { - enabled: true, + enabled: false, icons: true, iconSize: 20, iconSpacing: 6, @@ -18,9 +18,10 @@ function Legend(body, options, side, linegraphOptions) { }, right: { visible: true, - position: 'top-left' // top/bottom - left,center,right + position: 'top-right' // top/bottom - left,center,right } } + this.side = side; this.options = util.extend({},this.defaultOptions); this.linegraphOptions = linegraphOptions; @@ -30,6 +31,7 @@ function Legend(body, options, side, linegraphOptions) { this.groups = {}; this.amountOfGroups = 0; this._create(); + this.framework = {svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups}; this.setOptions(options); } @@ -187,9 +189,11 @@ Legend.prototype.drawLegendIcons = function() { var groupArray = Object.keys(this.groups); groupArray.sort(function (a,b) { return (a < b ? -1 : 1); - }) + }); + + // this resets the elements so the order is maintained + DOMutil.resetElements(this.svgElements); - DOMutil.prepareElements(this.svgElements); var padding = window.getComputedStyle(this.dom.frame).paddingTop; var iconOffset = Number(padding.replace('px','')); var x = iconOffset; @@ -202,12 +206,10 @@ Legend.prototype.drawLegendIcons = function() { for (var i = 0; i < groupArray.length; i++) { var groupId = groupArray[i]; if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) { - this.groups[groupId].drawIcon(x, y, this.svgElements, this.svg, iconWidth, iconHeight); + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); y += iconHeight + this.options.iconSpacing; } } - - DOMutil.cleanupElements(this.svgElements); } }; diff --git a/lib/timeline/component/LineGraph.js b/lib/timeline/component/LineGraph.js index f612ff52..961a293d 100644 --- a/lib/timeline/component/LineGraph.js +++ b/lib/timeline/component/LineGraph.js @@ -6,8 +6,9 @@ var Component = require('./Component'); var DataAxis = require('./DataAxis'); var GraphGroup = require('./GraphGroup'); var Legend = require('./Legend'); -var BarFunctions = require('./graph2d_types/bar'); -var LineFunctions = require('./graph2d_types/line'); +var Bars = require('./graph2d_types/bar'); +var Lines = require('./graph2d_types/line'); +var Points = require('./graph2d_types/points'); var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items @@ -27,11 +28,11 @@ function LineGraph(body, options) { defaultGroup: 'default', sort: true, sampling: true, - stack:false, + stack: false, graphHeight: '400px', shaded: { enabled: false, - orientation: 'bottom' // top, bottom + orientation: 'bottom' // top, bottom, zero }, style: 'line', // line, bar barChart: { @@ -49,42 +50,14 @@ function LineGraph(body, options) { size: 6, style: 'square' // square, circle }, - dataAxis: { - showMinorLabels: true, - showMajorLabels: true, - icons: false, - width: '40px', - visible: true, - alignZeros: true, - left:{ - range: {min:undefined,max:undefined}, - format: function (value) {return value;}, - title: {text:undefined,style:undefined} - }, - right:{ - range: {min:undefined,max:undefined}, - format: function (value) {return value;}, - title: {text:undefined,style:undefined} - } - }, - legend: { - enabled: false, - icons: true, - left: { - visible: true, - position: 'top-left' // top/bottom - left,right - }, - right: { - visible: true, - position: 'top-right' // top/bottom - left,right - } - }, + dataAxis: {}, //Defaults are done on DataAxis level + legend: {}, //Defaults are done on Legend level groups: { visibility: {} } }; - // options is shared by this ItemSet and all its items + // options is shared by this lineGraph and all its items this.options = util.extend({}, this.defaultOptions); this.dom = {}; this.props = {}; @@ -93,6 +66,7 @@ function LineGraph(body, options) { this.abortedGraphUpdate = false; this.updateSVGheight = false; this.updateSVGheightOnResize = false; + this.forceGraphUpdate = true; var me = this; this.itemsData = null; // DataSet @@ -132,18 +106,18 @@ function LineGraph(body, options) { this.svgElements = {}; this.setOptions(options); this.groupsUsingDefaultStyles = [0]; - this.COUNTER = 0; - this.body.emitter.on('rangechanged', function() { + this.body.emitter.on('rangechanged', function () { me.lastStart = me.body.range.start; me.svg.style.left = util.option.asSize(-me.props.width); - me.redraw.call(me,true); + + me.forceGraphUpdate = true; + //Is this local redraw necessary? (Core also does a change event!) + me.redraw.call(me); }); // create the HTML DOM this._create(); this.framework = {svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups}; - this.body.emitter.emit('change'); - } LineGraph.prototype = new Component(); @@ -151,15 +125,15 @@ LineGraph.prototype = new Component(); /** * Create the HTML DOM for the ItemSet */ -LineGraph.prototype._create = function(){ +LineGraph.prototype._create = function () { var frame = document.createElement('div'); frame.className = 'vis-line-graph'; this.dom.frame = frame; // create svg element for graph drawing. - this.svg = document.createElementNS('http://www.w3.org/2000/svg','svg'); + this.svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); this.svg.style.position = 'relative'; - this.svg.style.height = ('' + this.options.graphHeight).replace('px','') + 'px'; + this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px'; this.svg.style.display = 'block'; frame.appendChild(this.svg); @@ -182,23 +156,23 @@ LineGraph.prototype._create = function(){ * set the options of the LineGraph. the mergeOptions is used for subObjects that have an enabled element. * @param {object} options */ -LineGraph.prototype.setOptions = function(options) { +LineGraph.prototype.setOptions = function (options) { if (options) { - var fields = ['sampling','defaultGroup','stack','height','graphHeight','yAxisOrientation','style','barChart','dataAxis','sort','groups']; - if (options.graphHeight === undefined && options.height !== undefined && this.body.domProps.centerContainer.height !== undefined) { + var fields = ['sampling', 'defaultGroup', 'stack', 'height', 'graphHeight', 'yAxisOrientation', 'style', 'barChart', 'dataAxis', 'sort', 'groups']; + if (options.graphHeight === undefined && options.height !== undefined) { this.updateSVGheight = true; this.updateSVGheightOnResize = true; } else if (this.body.domProps.centerContainer.height !== undefined && options.graphHeight !== undefined) { - if (parseInt((options.graphHeight + '').replace("px",'')) < this.body.domProps.centerContainer.height) { + if (parseInt((options.graphHeight + '').replace("px", '')) < this.body.domProps.centerContainer.height) { this.updateSVGheight = true; } } util.selectiveDeepExtend(fields, this.options, options); - util.mergeOptions(this.options, options,'interpolation'); - util.mergeOptions(this.options, options,'drawPoints'); - util.mergeOptions(this.options, options,'shaded'); - util.mergeOptions(this.options, options,'legend'); + util.mergeOptions(this.options, options, 'interpolation'); + util.mergeOptions(this.options, options, 'drawPoints'); + util.mergeOptions(this.options, options, 'shaded'); + util.mergeOptions(this.options, options, 'legend'); if (options.interpolation) { if (typeof options.interpolation == 'object') { @@ -237,15 +211,16 @@ LineGraph.prototype.setOptions = function(options) { } // this is used to redraw the graph if the visibility of the groups is changed. - if (this.dom.frame) { - this.redraw(true); + if (this.dom.frame) { //not on initial run? + this.forceGraphUpdate=true; + this.body.emitter.emit("_change",{queue: true}); } }; /** * Hide the component from the DOM */ -LineGraph.prototype.hide = function() { +LineGraph.prototype.hide = function () { // remove the frame containing the items if (this.dom.frame.parentNode) { this.dom.frame.parentNode.removeChild(this.dom.frame); @@ -257,7 +232,7 @@ LineGraph.prototype.hide = function() { * Show the component in the DOM (when not already visible). * @return {Boolean} changed */ -LineGraph.prototype.show = function() { +LineGraph.prototype.show = function () { // show frame containing the items if (!this.dom.frame.parentNode) { this.body.dom.center.appendChild(this.dom.frame); @@ -269,7 +244,7 @@ LineGraph.prototype.show = function() { * Set items * @param {vis.DataSet | null} items */ -LineGraph.prototype.setItems = function(items) { +LineGraph.prototype.setItems = function (items) { var me = this, ids, oldItemsData = this.itemsData; @@ -307,9 +282,6 @@ LineGraph.prototype.setItems = function(items) { ids = this.itemsData.getIds(); this._onAdd(ids); } - this._updateUngrouped(); - //this._updateGraph(); - this.redraw(true); }; @@ -317,7 +289,7 @@ LineGraph.prototype.setItems = function(items) { * Set groups * @param {vis.DataSet} groups */ -LineGraph.prototype.setGroups = function(groups) { +LineGraph.prototype.setGroups = function (groups) { var me = this; var ids; @@ -330,7 +302,9 @@ LineGraph.prototype.setGroups = function(groups) { // remove all drawn groups ids = this.groupsData.getIds(); this.groupsData = null; - this._onRemoveGroups(ids); // note: this will cause a redraw + for (var i = 0; i < ids.length; i++) { + this._removeGroup(ids[i]); + } } // replace the dataset @@ -355,34 +329,23 @@ LineGraph.prototype.setGroups = function(groups) { ids = this.groupsData.getIds(); this._onAddGroups(ids); } - this._onUpdate(); }; - -/** - * Update the data - * @param [ids] - * @private - */ -LineGraph.prototype._onUpdate = function(ids) { - this._updateUngrouped(); +LineGraph.prototype._onUpdate = function (ids) { this._updateAllGroupData(); - //this._updateGraph(); - this.redraw(true); }; -LineGraph.prototype._onAdd = function (ids) {this._onUpdate(ids);}; -LineGraph.prototype._onRemove = function (ids) {this._onUpdate(ids);}; -LineGraph.prototype._onUpdateGroups = function (groupIds) { - for (var i = 0; i < groupIds.length; i++) { - var group = this.groupsData.get(groupIds[i]); - this._updateGroup(group, groupIds[i]); - } - - //this._updateGraph(); - this.redraw(true); +LineGraph.prototype._onAdd = function (ids) { + this._onUpdate(ids); +}; +LineGraph.prototype._onRemove = function (ids) { + this._onUpdate(ids); +}; +LineGraph.prototype._onUpdateGroups = function (groupIds) { + this._updateAllGroupData(); +}; +LineGraph.prototype._onAddGroups = function (groupIds) { + this._onUpdateGroups(groupIds); }; -LineGraph.prototype._onAddGroups = function (groupIds) {this._onUpdateGroups(groupIds);}; - /** * this cleans the group out off the legends and the dataaxis, updates the ungrouped and updates the graph @@ -391,25 +354,32 @@ LineGraph.prototype._onAddGroups = function (groupIds) {this._onUpdateGroups(gro */ LineGraph.prototype._onRemoveGroups = function (groupIds) { for (var i = 0; i < groupIds.length; i++) { - if (this.groups.hasOwnProperty(groupIds[i])) { - if (this.groups[groupIds[i]].options.yAxisOrientation == 'right') { - this.yAxisRight.removeGroup(groupIds[i]); - this.legendRight.removeGroup(groupIds[i]); - this.legendRight.redraw(); - } - else { - this.yAxisLeft.removeGroup(groupIds[i]); - this.legendLeft.removeGroup(groupIds[i]); - this.legendLeft.redraw(); - } - delete this.groups[groupIds[i]]; - } + this._removeGroup(groupIds[i]); } - this._updateUngrouped(); - //this._updateGraph(); - this.redraw(true); + this.forceGraphUpdate = true; + this.body.emitter.emit("_change",{queue: true}); }; +/** + * this cleans the group out off the legends and the dataaxis + * @param groupId + * @private + */ +LineGraph.prototype._removeGroup = function (groupId) { + if (this.groups.hasOwnProperty(groupId)) { + if (this.groups[groupId].options.yAxisOrientation == 'right') { + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); + this.legendRight.redraw(); + } + else { + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); + this.legendLeft.redraw(); + } + delete this.groups[groupId]; + } +} /** * update a group object with the group dataset entree @@ -435,10 +405,16 @@ LineGraph.prototype._updateGroup = function (group, groupId) { if (this.groups[groupId].options.yAxisOrientation == 'right') { this.yAxisRight.updateGroup(groupId, this.groups[groupId]); this.legendRight.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); } else { this.yAxisLeft.updateGroup(groupId, this.groups[groupId]); this.legendLeft.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); } } this.legendLeft.redraw(); @@ -454,98 +430,83 @@ LineGraph.prototype._updateGroup = function (group, groupId) { LineGraph.prototype._updateAllGroupData = function () { if (this.itemsData != null) { var groupsContent = {}; - var groupId; - for (groupId in this.groups) { - if (this.groups.hasOwnProperty(groupId)) { - groupsContent[groupId] = []; + var items = this.itemsData.get(); + //pre-Determine array sizes, for more efficient memory claim + var groupCounts = {}; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; } + groupCounts.hasOwnProperty(groupId) ? groupCounts[groupId]++ : groupCounts[groupId] = 1; } - for (var itemId in this.itemsData._data) { - if (this.itemsData._data.hasOwnProperty(itemId)) { - var item = this.itemsData._data[itemId]; - if (groupsContent[item.group] === undefined) { - throw new Error('Cannot find referenced group ' + item.group + '. Possible reason: items added before groups? Groups need to be added before items, as items refer to groups.') - } - item.x = util.convert(item.x,'Date'); - groupsContent[item.group].push(item); + //Now insert data into the arrays. + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; } - } - for (groupId in this.groups) { - if (this.groups.hasOwnProperty(groupId)) { - this.groups[groupId].setItems(groupsContent[groupId]); + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(groupCounts[groupId]); } + //Copy data (because of unmodifiable DataView input. + var extended = util.bridgeObject(item); + extended.x = util.convert(item.x, 'Date'); + extended.orginalY = item.y; //real Y + extended.y = Number(item.y); + + var index= groupsContent[groupId].length - groupCounts[groupId]--; + groupsContent[groupId][index] = extended; } - } -}; + //Make sure all groups are present, to allow removal of old groups + for (var groupId in this.groups){ + if (this.groups.hasOwnProperty(groupId)){ + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(0); + } + } + } -/** - * Create or delete the group holding all ungrouped items. This group is used when - * there are no groups specified. This anonymous group is called 'graph'. - * @protected - */ -LineGraph.prototype._updateUngrouped = function() { - if (this.itemsData && this.itemsData != null) { - var ungroupedCounter = 0; - for (var itemId in this.itemsData._data) { - if (this.itemsData._data.hasOwnProperty(itemId)) { - var item = this.itemsData._data[itemId]; - if (item != undefined) { - if (item.hasOwnProperty('group')) { - if (item.group === undefined) { - item.group = UNGROUPED; - } + //Update legendas, style and axis + for (var groupId in groupsContent) { + if (groupsContent.hasOwnProperty(groupId)) { + if (groupsContent[groupId].length == 0) { + if (this.groups.hasOwnProperty(groupId)) { + this._removeGroup(groupId); } - else { - item.group = UNGROUPED; + } else { + var group = undefined; + if (this.groupsData != undefined) { + group = this.groupsData.get(groupId); + } + if (group == undefined) { + group = {id: groupId, content: this.options.defaultGroup + groupId}; } - ungroupedCounter = item.group == UNGROUPED ? ungroupedCounter + 1 : ungroupedCounter; + this._updateGroup(group, groupId); + this.groups[groupId].setItems(groupsContent[groupId]); } } } - - if (ungroupedCounter == 0) { - delete this.groups[UNGROUPED]; - this.legendLeft.removeGroup(UNGROUPED); - this.legendRight.removeGroup(UNGROUPED); - this.yAxisLeft.removeGroup(UNGROUPED); - this.yAxisRight.removeGroup(UNGROUPED); - } - else { - var group = {id: UNGROUPED, content: this.options.defaultGroup}; - this._updateGroup(group, UNGROUPED); - } + this.forceGraphUpdate = true; + this.body.emitter.emit("_change",{queue: true}); } - else { - delete this.groups[UNGROUPED]; - this.legendLeft.removeGroup(UNGROUPED); - this.legendRight.removeGroup(UNGROUPED); - this.yAxisLeft.removeGroup(UNGROUPED); - this.yAxisRight.removeGroup(UNGROUPED); - } - - this.legendLeft.redraw(); - this.legendRight.redraw(); }; - /** * Redraw the component, mandatory function * @return {boolean} Returns true if the component is resized */ -LineGraph.prototype.redraw = function(forceGraphUpdate) { +LineGraph.prototype.redraw = function () { var resized = false; // calculate actual size and position this.props.width = this.dom.frame.offsetWidth; this.props.height = this.body.domProps.centerContainer.height - - this.body.domProps.border.top - - this.body.domProps.border.bottom; - - // update the graph if there is no lastWidth or with, used for the initial draw - if (this.lastWidth === undefined && this.props.width) { - forceGraphUpdate = true; - } + - this.body.domProps.border.top + - this.body.domProps.border.bottom; // check if this component is resized resized = this._isResized() || resized; @@ -559,7 +520,7 @@ LineGraph.prototype.redraw = function(forceGraphUpdate) { // the svg element is three times as big as the width, this allows for fully dragging left and right // without reloading the graph. the controls for this are bound to events in the constructor if (resized == true) { - this.svg.style.width = util.option.asSize(3*this.props.width); + this.svg.style.width = util.option.asSize(3 * this.props.width); this.svg.style.left = util.option.asSize(-this.props.width); // if the height of the graph is set as proportional, change the height of the svg @@ -577,12 +538,13 @@ LineGraph.prototype.redraw = function(forceGraphUpdate) { this.updateSVGheight = false; } else { - this.svg.style.height = ('' + this.options.graphHeight).replace('px','') + 'px'; + this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px'; } // zoomed is here to ensure that animations are shown correctly. - if (resized == true || zoomed == true || this.abortedGraphUpdate == true || forceGraphUpdate == true) { + if (resized == true || zoomed == true || this.abortedGraphUpdate == true || this.forceGraphUpdate == true) { resized = this._updateGraph() || resized; + this.forceGraphUpdate = false; } else { // move the whole svg while dragging @@ -590,19 +552,43 @@ LineGraph.prototype.redraw = function(forceGraphUpdate) { var offset = this.body.range.start - this.lastStart; var range = this.body.range.end - this.body.range.start; if (this.props.width != 0) { - var rangePerPixelInv = this.props.width/range; + var rangePerPixelInv = this.props.width / range; var xOffset = offset * rangePerPixelInv; this.svg.style.left = (-this.props.width - xOffset) + 'px'; } } } - this.legendLeft.redraw(); this.legendRight.redraw(); return resized; }; +LineGraph.prototype._getSortedGroupIds = function(){ + // getting group Ids + var grouplist = []; + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + var group = this.groups[groupId]; + if (group.visible == true && (this.options.groups.visibility[groupId] === undefined || this.options.groups.visibility[groupId] == true)) { + grouplist.push({id:groupId,zIndex:group.options.zIndex}); + } + } + } + util.insertSort(grouplist,function(a,b){ + var az = a.zIndex; + var bz = b.zIndex; + if (az === undefined) az=0; + if (bz === undefined) bz=0; + return az==bz? 0: (az 0) { - // this is the range of the SVG canvas - var minDate = this.body.util.toGlobalTime(-this.body.domProps.root.width); - var maxDate = this.body.util.toGlobalTime(2 * this.body.domProps.root.width); var groupsData = {}; + // fill groups data, this only loads the data we require based on the timewindow this._getRelevantData(groupIds, groupsData, minDate, maxDate); @@ -640,44 +617,104 @@ LineGraph.prototype._updateGraph = function () { // we transform the X coordinates to detect collisions for (i = 0; i < groupIds.length; i++) { - preprocessedGroupData[groupIds[i]] = this._convertXcoordinates(groupsData[groupIds[i]]); + this._convertXcoordinates(groupsData[groupIds[i]]); } // now all needed data has been collected we start the processing. - this._getYRanges(groupIds, preprocessedGroupData, groupRanges); + this._getYRanges(groupIds, groupsData, groupRanges); // update the Y axis first, we use this data to draw at the correct Y points - // changeCalled is required to clean the SVG on a change emit. changeCalled = this._updateYAxis(groupIds, groupRanges); - var MAX_CYCLES = 5; - if (changeCalled == true && this.COUNTER < MAX_CYCLES) { + + // at changeCalled, abort this update cycle as the graph needs another update with new Width input from the Redraw container. + // Cleanup SVG elements on abort. + if (changeCalled == true) { DOMutil.cleanupElements(this.svgElements); this.abortedGraphUpdate = true; - this.COUNTER++; - this.body.emitter.emit('change'); return true; } - else { - if (this.COUNTER > MAX_CYCLES) { - console.log("WARNING: there may be an infinite loop in the _updateGraph emitter cycle."); + this.abortedGraphUpdate = false; + + // With the yAxis scaled correctly, use this to get the Y values of the points. + var below = undefined; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (this.options.stack === true && this.options.style === 'line') { + if (group.options.excludeFromStacking == undefined || !group.options.excludeFromStacking) { + if (below != undefined) { + this._stack(groupsData[group.id], groupsData[below.id]); + if (group.options.shaded.enabled == true && group.options.shaded.orientation !== "group"){ + if (group.options.shaded.orientation == "top" && below.options.shaded.orientation !== "group"){ + below.options.shaded.orientation="group"; + below.options.shaded.groupId=group.id; + } else { + group.options.shaded.orientation="group"; + group.options.shaded.groupId=below.id; + } + } + } + below = group; + } } - this.COUNTER = 0; - this.abortedGraphUpdate = false; + this._convertYcoordinates(groupsData[groupIds[i]], group); + } - // With the yAxis scaled correctly, use this to get the Y values of the points. - for (i = 0; i < groupIds.length; i++) { - group = this.groups[groupIds[i]]; - processedGroupData[groupIds[i]] = this._convertYcoordinates(groupsData[groupIds[i]], group); + //Precalculate paths and draw shading if appropriate. This will make sure the shading is always behind any lines. + var paths = {}; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (group.options.style === 'line' && group.options.shaded.enabled == true) { + var dataset = groupsData[groupIds[i]]; + if (dataset == null || dataset.length == 0) { + continue; + } + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(dataset, group); + } + if (group.options.shaded.orientation === "group") { + var subGroupId = group.options.shaded.groupId; + if (groupIds.indexOf(subGroupId) === -1) { + console.log(group.id + ": Unknown shading group target given:" + subGroupId); + continue; + } + if (!paths.hasOwnProperty(subGroupId)) { + paths[subGroupId] = Lines.calcPath(groupsData[subGroupId], this.groups[subGroupId]); + } + Lines.drawShading(paths[groupIds[i]], group, paths[subGroupId], this.framework); + } + else { + Lines.drawShading(paths[groupIds[i]], group, undefined, this.framework); + } } + } - // draw the groups - for (i = 0; i < groupIds.length; i++) { - group = this.groups[groupIds[i]]; - if (group.options.style != 'bar') { // bar needs to be drawn enmasse - group.draw(processedGroupData[groupIds[i]], group, this.framework); + // draw the groups, calculating paths if still necessary. + Bars.draw(groupIds, groupsData, this.framework); + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (groupsData[groupIds[i]].length > 0) { + switch (group.options.style) { + case "line": + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(groupsData[groupIds[i]], group); + } + Lines.draw(paths[groupIds[i]], group, this.framework); + //explicit no break; + case "point": + //explicit no break; + case "points": + if (group.options.style == "point" || group.options.style == "points" || group.options.drawPoints.enabled == true) { + Points.draw(groupsData[groupIds[i]], group, this.framework); + } + break; + case "bar": + // bar needs to be drawn enmasse + //explicit no break + default: + //do nothing... } } - BarFunctions.draw(groupIds, processedGroupData, this.framework); + } } } @@ -687,6 +724,51 @@ LineGraph.prototype._updateGraph = function () { return false; }; +LineGraph.prototype._stack = function (data, subData) { + var index, dx, dy, subPrevPoint, subNextPoint; + index = 0; + // for each data point we look for a matching on in the set below + for (var j = 0; j < data.length; j++) { + subPrevPoint = undefined; + subNextPoint = undefined; + // we look for time matches or a before-after point + for (var k = index; k < subData.length; k++) { + // if times match exactly + if (subData[k].x === data[j].x) { + subPrevPoint = subData[k]; + subNextPoint = subData[k]; + index = k; + break; + } + else if (subData[k].x > data[j].x) { // overshoot + subNextPoint = subData[k]; + if (k == 0) { + subPrevPoint = subNextPoint; + } + else { + subPrevPoint = subData[k - 1]; + } + index = k; + break; + } + } + // in case the last data point has been used, we assume it stays like this. + if (subNextPoint === undefined) { + subPrevPoint = subData[subData.length - 1]; + subNextPoint = subData[subData.length - 1]; + } + // linear interpolation + dx = subNextPoint.x - subPrevPoint.x; + dy = subNextPoint.y - subPrevPoint.y; + if (dx == 0) { + data[j].y = data[j].orginalY + subNextPoint.y; + } + else { + data[j].y = data[j].orginalY + (dy / dx) * (data[j].x - subPrevPoint.x) + subPrevPoint.y; // ax + b where b is data[j].y + } + } +} + /** * first select and preprocess the data from the datasets. @@ -706,33 +788,27 @@ LineGraph.prototype._getRelevantData = function (groupIds, groupsData, minDate, if (groupIds.length > 0) { for (i = 0; i < groupIds.length; i++) { group = this.groups[groupIds[i]]; - groupsData[groupIds[i]] = []; - var dataContainer = groupsData[groupIds[i]]; + var itemsData = group.getItems(); // optimization for sorted data if (group.options.sort == true) { - var guess = Math.max(0, util.binarySearchValue(group.itemsData, minDate, 'x', 'before')); - for (j = guess; j < group.itemsData.length; j++) { + var dateComparator = function (a, b) { + return a.getTime() == b.getTime() ? 0 : a < b ? -1 : 1 + }; + var first = Math.max(0, util.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator)); + var last = Math.min(itemsData.length, util.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1); + if (last <= 0) { + last = itemsData.length; + } + var dataContainer = new Array(last-first); + for (j = first; j < last; j++) { item = group.itemsData[j]; - if (item !== undefined) { - if (item.x > maxDate) { - dataContainer.push(item); - break; - } - else { - dataContainer.push(item); - } - } + dataContainer[j-first] = item; } + groupsData[groupIds[i]] = dataContainer; } else { - for (j = 0; j < group.itemsData.length; j++) { - item = group.itemsData[j]; - if (item !== undefined) { - if (item.x > minDate && item.x < maxDate) { - dataContainer.push(item); - } - } - } + // If unsorted data, all data is relevant, just returning entire structure + groupsData[groupIds[i]] = group.itemsData; } } } @@ -762,12 +838,12 @@ LineGraph.prototype._applySampling = function (groupIds, groupsData) { var pointsPerPixel = amountOfPoints / xDistance; increment = Math.min(Math.ceil(0.2 * amountOfPoints), Math.max(1, Math.round(pointsPerPixel))); - var sampledData = []; + var sampledData = new Array(amountOfPoints); for (var j = 0; j < amountOfPoints; j += increment) { - sampledData.push(dataContainer[j]); - + var idx = Math.round(j/increment); + sampledData[idx]=dataContainer[j]; } - groupsData[groupIds[i]] = sampledData; + groupsData[groupIds[i]] = sampledData.splice(0,Math.round(amountOfPoints/increment)); } } } @@ -796,22 +872,22 @@ LineGraph.prototype._getYRanges = function (groupIds, groupsData, groupRanges) { group = this.groups[groupIds[i]]; // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. if (options.stack === true && options.style === 'bar') { - if (options.yAxisOrientation === 'left') {combinedDataLeft = combinedDataLeft .concat(group.getData(groupData));} - else {combinedDataRight = combinedDataRight.concat(group.getData(groupData));} + if (options.yAxisOrientation === 'left') { + combinedDataLeft = combinedDataLeft.concat(group.getItems()); + } + else { + combinedDataRight = combinedDataRight.concat(group.getItems()); + } } else { - groupRanges[groupIds[i]] = group.getYRange(groupData,groupIds[i]); + groupRanges[groupIds[i]] = group.getYRange(groupData, groupIds[i]); } } } // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. - BarFunctions.getStackedYRange(combinedDataLeft , groupRanges, groupIds, '__barStackLeft' , 'left' ); - BarFunctions.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right'); - // if line graphs are stacked, their range need to be handled differently and accumulated over all groups. - //LineFunctions.getStackedYRange(combinedDataLeft , groupRanges, groupIds, '__lineStackLeft' , 'left' ); - //LineFunctions.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__lineStackRight', 'right'); - + Bars.getStackedYRange(combinedDataLeft, groupRanges, groupIds, '__barStackLeft', 'left'); + Bars.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right'); } }; @@ -872,7 +948,7 @@ LineGraph.prototype._updateYAxis = function (groupIds, groupRanges) { this.yAxisRight.setRange(minRight, maxRight); } } - resized = this._toggleAxisVisiblity(yAxisLeftUsed , this.yAxisLeft) || resized; + resized = this._toggleAxisVisiblity(yAxisLeftUsed, this.yAxisLeft) || resized; resized = this._toggleAxisVisiblity(yAxisRightUsed, this.yAxisRight) || resized; if (yAxisRightUsed == true && yAxisLeftUsed == true) { @@ -884,14 +960,17 @@ LineGraph.prototype._updateYAxis = function (groupIds, groupRanges) { this.yAxisRight.drawIcons = false; } this.yAxisRight.master = !yAxisLeftUsed; + this.yAxisRight.masterAxis = this.yAxisLeft; + if (this.yAxisRight.master == false) { - if (yAxisRightUsed == true) {this.yAxisLeft.lineOffset = this.yAxisRight.width;} - else {this.yAxisLeft.lineOffset = 0;} + if (yAxisRightUsed == true) { + this.yAxisLeft.lineOffset = this.yAxisRight.width; + } + else { + this.yAxisLeft.lineOffset = 0; + } resized = this.yAxisLeft.redraw() || resized; - this.yAxisRight.stepPixels = this.yAxisLeft.stepPixels; - this.yAxisRight.zeroCrossing = this.yAxisLeft.zeroCrossing; - this.yAxisRight.amountOfSteps = this.yAxisLeft.amountOfSteps; resized = this.yAxisRight.redraw() || resized; } else { @@ -899,9 +978,11 @@ LineGraph.prototype._updateYAxis = function (groupIds, groupRanges) { } // clean the accumulated lists - var tempGroups = ['__barStackLeft','__barStackRight','__lineStackLeft','__lineStackRight']; + var tempGroups = ['__barStackLeft', '__barStackRight', '__lineStackLeft', '__lineStackRight']; for (var i = 0; i < tempGroups.length; i++) { - if (groupIds.indexOf(tempGroups[i]) != -1) {groupIds.splice(groupIds.indexOf(tempGroups[i]),1);} + if (groupIds.indexOf(tempGroups[i]) != -1) { + groupIds.splice(groupIds.indexOf(tempGroups[i]), 1); + } } return resized; @@ -920,7 +1001,7 @@ LineGraph.prototype._toggleAxisVisiblity = function (axisUsed, axis) { var changed = false; if (axisUsed == false) { if (axis.dom.frame.parentNode && axis.hidden == false) { - axis.hide() + axis.hide(); changed = true; } } @@ -944,17 +1025,11 @@ LineGraph.prototype._toggleAxisVisiblity = function (axisUsed, axis) { * @private */ LineGraph.prototype._convertXcoordinates = function (datapoints) { - var extractedData = []; - var xValue, yValue; var toScreen = this.body.util.toScreen; - for (var i = 0; i < datapoints.length; i++) { - xValue = toScreen(datapoints[i].x) + this.props.width; - yValue = datapoints[i].y; - extractedData.push({x: xValue, y: yValue}); + datapoints[i].screen_x = toScreen(datapoints[i].x) + this.props.width; + datapoints[i].screen_y = datapoints[i].y; //starting point for range calculations } - - return extractedData; }; @@ -969,25 +1044,15 @@ LineGraph.prototype._convertXcoordinates = function (datapoints) { * @private */ LineGraph.prototype._convertYcoordinates = function (datapoints, group) { - var extractedData = []; - var xValue, yValue; - var toScreen = this.body.util.toScreen; var axis = this.yAxisLeft; - var svgHeight = Number(this.svg.style.height.replace('px','')); + var svgHeight = Number(this.svg.style.height.replace('px', '')); if (group.options.yAxisOrientation == 'right') { axis = this.yAxisRight; } - for (var i = 0; i < datapoints.length; i++) { - var labelValue = datapoints[i].label ? datapoints[i].label : null; - xValue = toScreen(datapoints[i].x) + this.props.width; - yValue = Math.round(axis.convertValue(datapoints[i].y)); - extractedData.push({x: xValue, y: yValue, label:labelValue}); + datapoints[i].screen_y = Math.round(axis.convertValue(datapoints[i].y)); } - group.setZeroPosition(Math.min(svgHeight, axis.convertValue(0))); - - return extractedData; }; diff --git a/lib/timeline/component/TimeAxis.js b/lib/timeline/component/TimeAxis.js index dec23f83..136179b4 100644 --- a/lib/timeline/component/TimeAxis.js +++ b/lib/timeline/component/TimeAxis.js @@ -39,6 +39,7 @@ function TimeAxis (body, options) { }, // axis orientation: 'top' or 'bottom' showMinorLabels: true, showMajorLabels: true, + maxMinorChars: 7, format: TimeStep.FORMAT, moment: moment, timeAxis: null @@ -69,6 +70,7 @@ TimeAxis.prototype.setOptions = function(options) { util.selectiveExtend([ 'showMinorLabels', 'showMajorLabels', + 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment' @@ -195,7 +197,7 @@ TimeAxis.prototype._repaintLabels = function () { // calculate range and step (step such that we have space for 7 characters per label) var start = util.convert(this.body.range.start, 'Number'); var end = util.convert(this.body.range.end, 'Number'); - var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * 7).valueOf(); + var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf(); var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize); minimumStep -= this.body.util.toTime(0).valueOf(); @@ -224,19 +226,20 @@ TimeAxis.prototype._repaintLabels = function () { var next; var x; var xNext; - var isMajor; - var width; + var isMajor, nextIsMajor; + var width = 0, prevWidth; var line; var labelMinor; var xFirstMajorLabel = undefined; - var max = 0; + var count = 0; + const MAX = 1000; var className; step.start(); next = step.getCurrent(); xNext = this.body.util.toScreen(next); - while (step.hasNext() && max < 1000) { - max++; + while (step.hasNext() && count < MAX) { + count++; isMajor = step.isMajor(); className = step.getClassName(); @@ -247,13 +250,16 @@ TimeAxis.prototype._repaintLabels = function () { step.next(); next = step.getCurrent(); + nextIsMajor = step.isMajor(); xNext = this.body.util.toScreen(next); + prevWidth = width; width = xNext - x; - var labelFits = (labelMinor.length + 1) * this.props.minorCharWidth < width; + var showMinorGrid = (width >= prevWidth * 0.4); // prevent displaying of the 31th of the month on a scale of 5 days - if (this.options.showMinorLabels && labelFits) { - this._repaintMinorText(x, labelMinor, orientation, className); + if (this.options.showMinorLabels && showMinorGrid) { + var label = this._repaintMinorText(x, labelMinor, orientation, className); + label.style.width = width + 'px'; // set width to prevent overflow } if (isMajor && this.options.showMajorLabels) { @@ -261,22 +267,28 @@ TimeAxis.prototype._repaintLabels = function () { if (xFirstMajorLabel == undefined) { xFirstMajorLabel = x; } - this._repaintMajorText(x, step.getLabelMajor(), orientation, className); + label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); } line = this._repaintMajorLine(x, width, orientation, className); } - else { - if (labelFits) { + else { // minor line + if (showMinorGrid) { line = this._repaintMinorLine(x, width, orientation, className); } else { if (line) { - line.style.width = (parseInt (line.style.width) + width) + 'px' + // adjust the width of the previous grid + line.style.width = (parseInt (line.style.width) + width) + 'px'; } } } } + if (count === MAX && !warnedForOverflow) { + console.warn(`Something is wrong with the Timeline scale. Limited drawing of grid lines to ${MAX} lines.`); + warnedForOverflow = true; + } + // create a major label on the left when needed if (this.options.showMajorLabels) { var leftTime = this.body.util.toTime(0), @@ -467,4 +479,7 @@ TimeAxis.prototype._calculateCharSize = function () { this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; }; + +var warnedForOverflow = false; + module.exports = TimeAxis; diff --git a/lib/timeline/component/css/item.css b/lib/timeline/component/css/item.css index e843e1e0..4e048885 100644 --- a/lib/timeline/component/css/item.css +++ b/lib/timeline/component/css/item.css @@ -123,3 +123,8 @@ cursor: e-resize; } + +.vis-range.vis-item.vis-readonly .vis-drag-left, +.vis-range.vis-item.vis-readonly .vis-drag-right { + cursor: auto; +} diff --git a/lib/timeline/component/graph2d_types/bar.js b/lib/timeline/component/graph2d_types/bar.js index 19b18b3f..32b3d36e 100644 --- a/lib/timeline/component/graph2d_types/bar.js +++ b/lib/timeline/component/graph2d_types/bar.js @@ -2,34 +2,42 @@ var DOMutil = require('../../../DOMutil'); var Points = require('./points'); function Bargraph(groupId, options) { - this.groupId = groupId; - this.options = options; } -Bargraph.prototype.getYRange = function(groupData) { - var yMin = groupData[0].y; - var yMax = groupData[0].y; - for (var j = 0; j < groupData.length; j++) { - yMin = yMin > groupData[j].y ? groupData[j].y : yMin; - yMax = yMax < groupData[j].y ? groupData[j].y : yMax; - } - return {min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation}; -}; +Bargraph.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); -Bargraph.prototype.getData = function(groupData) { - var combinedData = []; - for (var j = 0; j < groupData.length; j++) { - combinedData.push({ - x: groupData[j].x, - y: groupData[j].y, - groupId: this.groupId - }); - } - return combinedData; -} + var barWidth = Math.round(0.3 * iconWidth); + var originalWidth = group.options.barChart.width; + var scale = originalWidth / barWidth; + var bar1Height = Math.round(0.4 * iconHeight); + var bar2Height = Math.round(0.75 * iconHeight); + + var offset = Math.round((iconWidth - (2 * barWidth)) / 3); + DOMutil.drawBar(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, barWidth, bar1Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + DOMutil.drawBar(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: (group.options.drawPoints.size / scale), + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, groupTemplate, framework.svgElements, framework.svg); + DOMutil.drawPoint(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, groupTemplate, framework.svgElements, framework.svg); + } + +} /** * draw a bar graph @@ -43,7 +51,7 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { var coreDistance; var key, drawData; var group; - var i,j; + var i, j; var barPoints = 0; // combine all barchart data @@ -53,6 +61,8 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { if (group.visible === true && (framework.options.groups.visibility[groupIds[i]] === undefined || framework.options.groups.visibility[groupIds[i]] === true)) { for (j = 0; j < processedGroupData[groupIds[i]].length; j++) { combinedData.push({ + screen_x: processedGroupData[groupIds[i]][j].screen_x, + screen_y: processedGroupData[groupIds[i]][j].screen_y, x: processedGroupData[groupIds[i]][j].x, y: processedGroupData[groupIds[i]][j].y, groupId: groupIds[i], @@ -64,15 +74,17 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { } } - if (barPoints === 0) {return;} + if (barPoints === 0) { + return; + } // sort by time and by group combinedData.sort(function (a, b) { - if (a.x === b.x) { + if (a.screen_x === b.screen_x) { return a.groupId < b.groupId ? -1 : 1; } else { - return a.x - b.x; + return a.screen_x - b.screen_x; } }); @@ -82,48 +94,50 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { // plot barchart for (i = 0; i < combinedData.length; i++) { group = framework.groups[combinedData[i].groupId]; - var minWidth = 0.1 * group.options.barChart.width; + var minWidth = group.options.barChart.minWidth != undefined ? group.options.barChart.minWidth : 0.1 * group.options.barChart.width; - key = combinedData[i].x; + key = combinedData[i].screen_x; var heightOffset = 0; if (intersections[key] === undefined) { - if (i+1 < combinedData.length) {coreDistance = Math.abs(combinedData[i+1].x - key);} - if (i > 0) {coreDistance = Math.min(coreDistance,Math.abs(combinedData[i-1].x - key));} + if (i + 1 < combinedData.length) { + coreDistance = Math.abs(combinedData[i + 1].screen_x - key); + } drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); } else { var nextKey = i + (intersections[key].amount - intersections[key].resolved); var prevKey = i - (intersections[key].resolved + 1); - if (nextKey < combinedData.length) {coreDistance = Math.abs(combinedData[nextKey].x - key);} - if (prevKey > 0) {coreDistance = Math.min(coreDistance,Math.abs(combinedData[prevKey].x - key));} + if (nextKey < combinedData.length) { + coreDistance = Math.abs(combinedData[nextKey].screen_x - key); + } drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); intersections[key].resolved += 1; - if (group.options.stack === true) { - if (combinedData[i].y < group.zeroPosition) { + if (group.options.stack === true && group.options.excludeFromStacking !== true) { + if (combinedData[i].screen_y < group.zeroPosition) { heightOffset = intersections[key].accumulatedNegative; - intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].y; + intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].screen_y; } else { heightOffset = intersections[key].accumulatedPositive; - intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].y; + intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].screen_y; } } else if (group.options.barChart.sideBySide === true) { drawData.width = drawData.width / intersections[key].amount; - drawData.offset += (intersections[key].resolved) * drawData.width - (0.5*drawData.width * (intersections[key].amount+1)); - if (group.options.barChart.align === 'left') {drawData.offset -= 0.5*drawData.width;} - else if (group.options.barChart.align === 'right') {drawData.offset += 0.5*drawData.width;} + drawData.offset += (intersections[key].resolved) * drawData.width - (0.5 * drawData.width * (intersections[key].amount + 1)); } } - DOMutil.drawBar(combinedData[i].x + drawData.offset, combinedData[i].y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + DOMutil.drawBar(combinedData[i].screen_x + drawData.offset, combinedData[i].screen_y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].screen_y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); // draw points if (group.options.drawPoints.enabled === true) { let pointData = { - x:combinedData[i].x + drawData.offset, - y:combinedData[i].y - heightOffset, + screen_x: combinedData[i].screen_x, + screen_y: combinedData[i].screen_y - heightOffset, + x: combinedData[i].x, + y: combinedData[i].y, groupId: combinedData[i].groupId, - label: combinedData[i].label, + label: combinedData[i].label }; Points.draw([pointData], group, framework, drawData.offset); //DOMutil.drawPoint(combinedData[i].x + drawData.offset, combinedData[i].y, group, framework.svgElements, framework.svg); @@ -143,16 +157,21 @@ Bargraph._getDataIntersections = function (intersections, combinedData) { var coreDistance; for (var i = 0; i < combinedData.length; i++) { if (i + 1 < combinedData.length) { - coreDistance = Math.abs(combinedData[i + 1].x - combinedData[i].x); + coreDistance = Math.abs(combinedData[i + 1].screen_x - combinedData[i].screen_x); } if (i > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].x - combinedData[i].x)); + coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].screen_x - combinedData[i].screen_x)); } if (coreDistance === 0) { - if (intersections[combinedData[i].x] === undefined) { - intersections[combinedData[i].x] = {amount: 0, resolved: 0, accumulatedPositive: 0, accumulatedNegative: 0}; + if (intersections[combinedData[i].screen_x] === undefined) { + intersections[combinedData[i].screen_x] = { + amount: 0, + resolved: 0, + accumulatedPositive: 0, + accumulatedNegative: 0 + }; } - intersections[combinedData[i].x].amount += 1; + intersections[combinedData[i].screen_x].amount += 1; } } }; @@ -170,7 +189,7 @@ Bargraph._getDataIntersections = function (intersections, combinedData) { Bargraph._getSafeDrawData = function (coreDistance, group, minWidth) { var width, offset; if (coreDistance < group.options.barChart.width && coreDistance > 0) { - width = coreDistance < minWidth ? minWidth : coreDistance; + width = coreDistance < minWidth ? minWidth : coreDistance offset = 0; // recalculate offset with the new width; if (group.options.barChart.align === 'left') { @@ -195,15 +214,15 @@ Bargraph._getSafeDrawData = function (coreDistance, group, minWidth) { return {width: width, offset: offset}; }; -Bargraph.getStackedYRange = function(combinedData, groupRanges, groupIds, groupLabel, orientation) { +Bargraph.getStackedYRange = function (combinedData, groupRanges, groupIds, groupLabel, orientation) { if (combinedData.length > 0) { // sort by time and by group combinedData.sort(function (a, b) { - if (a.x === b.x) { + if (a.screen_x === b.screen_x) { return a.groupId < b.groupId ? -1 : 1; - } + } else { - return a.x - b.x; + return a.screen_x - b.screen_x; } }); var intersections = {}; @@ -217,20 +236,20 @@ Bargraph.getStackedYRange = function(combinedData, groupRanges, groupIds, groupL Bargraph._getStackedYRange = function (intersections, combinedData) { var key; - var yMin = combinedData[0].y; - var yMax = combinedData[0].y; + var yMin = combinedData[0].screen_y; + var yMax = combinedData[0].screen_y; for (var i = 0; i < combinedData.length; i++) { - key = combinedData[i].x; + key = combinedData[i].screen_x; if (intersections[key] === undefined) { - yMin = yMin > combinedData[i].y ? combinedData[i].y : yMin; - yMax = yMax < combinedData[i].y ? combinedData[i].y : yMax; + yMin = yMin > combinedData[i].screen_y ? combinedData[i].screen_y : yMin; + yMax = yMax < combinedData[i].screen_y ? combinedData[i].screen_y : yMax; } else { - if (combinedData[i].y < 0) { - intersections[key].accumulatedNegative += combinedData[i].y; + if (combinedData[i].screen_y < 0) { + intersections[key].accumulatedNegative += combinedData[i].screen_y; } else { - intersections[key].accumulatedPositive += combinedData[i].y; + intersections[key].accumulatedPositive += combinedData[i].screen_y; } } } diff --git a/lib/timeline/component/graph2d_types/line.js b/lib/timeline/component/graph2d_types/line.js index 7d70e8d3..18b9877b 100644 --- a/lib/timeline/component/graph2d_types/line.js +++ b/lib/timeline/component/graph2d_types/line.js @@ -1,109 +1,112 @@ var DOMutil = require('../../../DOMutil'); -var Points = require('./points'); function Line(groupId, options) { - this.groupId = groupId; - this.options = options; } -Line.prototype.getData = function(groupData) { - var combinedData = []; - for (var j = 0; j < groupData.length; j++) { - combinedData.push({ - x: groupData[j].x, - y: groupData[j].y, - groupId: this.groupId - }); - } - return combinedData; +Line.calcPath = function (dataset, group) { + if (dataset != null) { + if (dataset.length > 0) { + var d = []; + + // construct path from dataset + if (group.options.interpolation.enabled == true) { + d = Line._catmullRom(dataset, group); + } + else { + d = Line._linear(dataset); + } + return d; + } + } } -Line.prototype.getYRange = function(groupData) { - var yMin = groupData[0].y; - var yMax = groupData[0].y; - for (var j = 0; j < groupData.length; j++) { - yMin = yMin > groupData[j].y ? groupData[j].y : yMin; - yMax = yMax < groupData[j].y ? groupData[j].y : yMax; - } - return {min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation}; -}; +Line.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; -Line.getStackedYRange = function(combinedData, groupRanges, groupIds, groupLabel, orientation) { - if (combinedData.length > 0) { - // sort by time and by group - combinedData.sort(function (a, b) { - if (a.x === b.x) { - return a.groupId < b.groupId ? -1 : 1; - } - else { - return a.x - b.x; - } - }); - var intersections = {}; - - Line._getDataIntersections(intersections, combinedData); - groupRanges[groupLabel] = Line._getStackedYRange(intersections, combinedData); - groupRanges[groupLabel].yAxisOrientation = orientation; - groupIds.push(groupLabel); - } -} + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); -Line._getStackedYRange = function (intersections, combinedData) { - var key; - var yMin = combinedData[0].y; - var yMax = combinedData[0].y; - for (var i = 0; i < combinedData.length; i++) { - key = combinedData[i].x; - if (intersections[key] === undefined) { - yMin = yMin > combinedData[i].y ? combinedData[i].y : yMin; - yMax = yMax < combinedData[i].y ? combinedData[i].y : yMax; + path = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); } - else { - if (combinedData[i].y < 0) { - intersections[key].accumulatedNegative += combinedData[i].y; - } - else { - intersections[key].accumulatedPositive += combinedData[i].y; - } + + path.setAttributeNS(null, "d", "M" + x + "," + y + " L" + (x + iconWidth) + "," + y + ""); + if (group.options.shaded.enabled == true) { + fillPath = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + if (group.options.shaded.orientation == 'top') { + fillPath.setAttributeNS(null, "d", "M" + x + ", " + (y - fillHeight) + + "L" + x + "," + y + " L" + (x + iconWidth) + "," + y + " L" + (x + iconWidth) + "," + (y - fillHeight)); + } + else { + fillPath.setAttributeNS(null, "d", "M" + x + "," + y + " " + + "L" + x + "," + (y + fillHeight) + " " + + "L" + (x + iconWidth) + "," + (y + fillHeight) + + "L" + (x + iconWidth) + "," + y); + } + fillPath.setAttributeNS(null, "class", group.className + " vis-icon-fill"); + if (group.options.shaded.style !== undefined && group.options.shaded.style !== "") { + fillPath.setAttributeNS(null, "style", group.options.shaded.style); + } } - } - for (var xpos in intersections) { - if (intersections.hasOwnProperty(xpos)) { - yMin = yMin > intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMin; - yMin = yMin > intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMin; - yMax = yMax < intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMax; - yMax = yMax < intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMax; + + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: group.options.drawPoints.size, + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, framework.svgElements, framework.svg); } - } +} - return {min: yMin, max: yMax}; -}; +Line.drawShading = function (pathArray, group, subPathArray, framework) { + // append shading to the path + if (group.options.shaded.enabled == true) { + var svgHeight = Number(framework.svg.style.height.replace('px','')); + var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + var type = "L"; + if (group.options.interpolation.enabled == true){ + type = "C"; + } + var dFill; + var zero = 0; + if (group.options.shaded.orientation == 'top') { + zero = 0; + } + else if (group.options.shaded.orientation == 'bottom') { + zero = svgHeight; + } + else { + zero = Math.min(Math.max(0, group.zeroPosition), svgHeight); + } + if (group.options.shaded.orientation == 'group' && (subPathArray != null && subPathArray != undefined)) { + dFill = 'M' + pathArray[0][0]+ ","+pathArray[0][1] + " " + + this.serializePath(pathArray,type,false) + + ' L'+ subPathArray[subPathArray.length-1][0]+ "," + subPathArray[subPathArray.length-1][1] + " " + + this.serializePath(subPathArray,type,true) + + subPathArray[0][0]+ ","+subPathArray[0][1] + " Z"; + } + else { + dFill = 'M' + pathArray[0][0]+ ","+pathArray[0][1] + " " + + this.serializePath(pathArray,type,false) + + ' V' + zero + ' H'+ pathArray[0][0] + " Z"; + } -/** - * Fill the intersections object with counters of how many datapoints share the same x coordinates - * @param intersections - * @param combinedData - * @private - */ -Line._getDataIntersections = function (intersections, combinedData) { - // get intersections - var coreDistance; - for (var i = 0; i < combinedData.length; i++) { - if (i + 1 < combinedData.length) { - coreDistance = Math.abs(combinedData[i + 1].x - combinedData[i].x); - } - if (i > 0) { - coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].x - combinedData[i].x)); - } - if (coreDistance === 0) { - if (intersections[combinedData[i].x] === undefined) { - intersections[combinedData[i].x] = {amount: 0, resolved: 0, accumulatedPositive: 0, accumulatedNegative: 0}; - } - intersections[combinedData[i].x].amount += 1; + fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill'); + if (group.options.shaded.style !== undefined) { + fillPath.setAttributeNS(null, 'style', group.options.shaded.style); + } + fillPath.setAttributeNS(null, 'd', dFill); } - } -}; - +} /** * draw a line graph @@ -111,53 +114,41 @@ Line._getDataIntersections = function (intersections, combinedData) { * @param dataset * @param group */ -Line.prototype.draw = function (dataset, group, framework) { - if (dataset != null) { - if (dataset.length > 0) { - var path, d; - var svgHeight = Number(framework.svg.style.height.replace('px','')); - path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); - path.setAttributeNS(null, "class", group.className); - if(group.style !== undefined) { - path.setAttributeNS(null, "style", group.style); - } - - // construct path from dataset - if (group.options.interpolation.enabled == true) { - d = Line._catmullRom(dataset, group); - } - else { - d = Line._linear(dataset); - } - - // append with points for fill and finalize the path - if (group.options.shaded.enabled == true) { - var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); - var dFill; - if (group.options.shaded.orientation == 'top') { - dFill = 'M' + dataset[0].x + ',' + 0 + ' ' + d + 'L' + dataset[dataset.length - 1].x + ',' + 0; +Line.draw = function (pathArray, group, framework) { + if (pathArray != null && pathArray != undefined) { + var path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); } - else { - dFill = 'M' + dataset[0].x + ',' + svgHeight + ' ' + d + 'L' + dataset[dataset.length - 1].x + ',' + svgHeight; - } - fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill'); - if(group.options.shaded.style !== undefined) { - fillPath.setAttributeNS(null, 'style', group.options.shaded.style); + + var type = "L"; + if (group.options.interpolation.enabled == true){ + type = "C"; } - fillPath.setAttributeNS(null, 'd', dFill); - } - // copy properties to path for drawing. - path.setAttributeNS(null, 'd', 'M' + d); - - // draw points - if (group.options.drawPoints.enabled == true) { - Points.draw(dataset, group, framework); - } + // copy properties to path for drawing. + path.setAttributeNS(null, 'd', 'M' + pathArray[0][0]+ ","+pathArray[0][1] + " " + this.serializePath(pathArray,type,false)); } - } }; - +Line.serializePath = function(pathArray,type,inverse){ + if (pathArray.length < 2){ + //Too little data to create a path. + return ""; + } + var d = type; + if (inverse){ + for (var i = pathArray.length-2; i > 0; i--){ + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } + else { + for (var i = 1; i < pathArray.length; i++){ + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } + return d; +} /** * This uses an uniform parametrization of the interpolation algorithm: @@ -166,41 +157,44 @@ Line.prototype.draw = function (dataset, group, framework) { * @returns {string} * @private */ -Line._catmullRomUniform = function(data) { - // catmull rom - var p0, p1, p2, p3, bp1, bp2; - var d = Math.round(data[0].x) + ',' + Math.round(data[0].y) + ' '; - var normalization = 1/6; - var length = data.length; - for (var i = 0; i < length - 1; i++) { - - p0 = (i == 0) ? data[0] : data[i-1]; - p1 = data[i]; - p2 = data[i+1]; - p3 = (i + 2 < length) ? data[i+2] : p2; - - - // Catmull-Rom to Cubic Bezier conversion matrix - // 0 1 0 0 - // -1/6 1 1/6 0 - // 0 1/6 1 -1/6 - // 0 0 1 0 - - // bp0 = { x: p1.x, y: p1.y }; - bp1 = { x: ((-p0.x + 6*p1.x + p2.x) *normalization), y: ((-p0.y + 6*p1.y + p2.y) *normalization)}; - bp2 = { x: (( p1.x + 6*p2.x - p3.x) *normalization), y: (( p1.y + 6*p2.y - p3.y) *normalization)}; - // bp0 = { x: p2.x, y: p2.y }; - - d += 'C' + - bp1.x + ',' + - bp1.y + ' ' + - bp2.x + ',' + - bp2.y + ' ' + - p2.x + ',' + - p2.y + ' '; - } - - return d; +Line._catmullRomUniform = function (data) { + // catmull rom + var p0, p1, p2, p3, bp1, bp2; + var d = []; + d.push( [ Math.round(data[0].screen_x) , Math.round(data[0].screen_y) ]); + var normalization = 1 / 6; + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = (i == 0) ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = (i + 2 < length) ? data[i + 2] : p2; + + + // Catmull-Rom to Cubic Bezier conversion matrix + // 0 1 0 0 + // -1/6 1 1/6 0 + // 0 1/6 1 -1/6 + // 0 0 1 0 + + // bp0 = { x: p1.x, y: p1.y }; + bp1 = { + screen_x: ((-p0.screen_x + 6 * p1.screen_x + p2.screen_x) * normalization), + screen_y: ((-p0.screen_y + 6 * p1.screen_y + p2.screen_y) * normalization) + }; + bp2 = { + screen_x: (( p1.screen_x + 6 * p2.screen_x - p3.screen_x) * normalization), + screen_y: (( p1.screen_y + 6 * p2.screen_y - p3.screen_y) * normalization) + }; + // bp0 = { x: p2.x, y: p2.y }; + + d.push( [ bp1.screen_x , bp1.screen_y ]); + d.push( [ bp2.screen_x , bp2.screen_y ]); + d.push( [ p2.screen_x , p2.screen_y ]); + } + + return d; }; /** @@ -214,70 +208,79 @@ Line._catmullRomUniform = function(data) { * @returns {string} * @private */ -Line._catmullRom = function(data, group) { - var alpha = group.options.interpolation.alpha; - if (alpha == 0 || alpha === undefined) { - return this._catmullRomUniform(data); - } - else { - var p0, p1, p2, p3, bp1, bp2, d1,d2,d3, A, B, N, M; - var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA; - var d = Math.round(data[0].x) + ',' + Math.round(data[0].y) + ' '; - var length = data.length; - for (var i = 0; i < length - 1; i++) { - - p0 = (i == 0) ? data[0] : data[i-1]; - p1 = data[i]; - p2 = data[i+1]; - p3 = (i + 2 < length) ? data[i+2] : p2; - - d1 = Math.sqrt(Math.pow(p0.x - p1.x,2) + Math.pow(p0.y - p1.y,2)); - d2 = Math.sqrt(Math.pow(p1.x - p2.x,2) + Math.pow(p1.y - p2.y,2)); - d3 = Math.sqrt(Math.pow(p2.x - p3.x,2) + Math.pow(p2.y - p3.y,2)); - - // Catmull-Rom to Cubic Bezier conversion matrix - - // A = 2d1^2a + 3d1^a * d2^a + d3^2a - // B = 2d3^2a + 3d3^a * d2^a + d2^2a - - // [ 0 1 0 0 ] - // [ -d2^2a /N A/N d1^2a /N 0 ] - // [ 0 d3^2a /M B/M -d2^2a /M ] - // [ 0 0 1 0 ] - - d3powA = Math.pow(d3, alpha); - d3pow2A = Math.pow(d3,2*alpha); - d2powA = Math.pow(d2, alpha); - d2pow2A = Math.pow(d2,2*alpha); - d1powA = Math.pow(d1, alpha); - d1pow2A = Math.pow(d1,2*alpha); - - A = 2*d1pow2A + 3*d1powA * d2powA + d2pow2A; - B = 2*d3pow2A + 3*d3powA * d2powA + d2pow2A; - N = 3*d1powA * (d1powA + d2powA); - if (N > 0) {N = 1 / N;} - M = 3*d3powA * (d3powA + d2powA); - if (M > 0) {M = 1 / M;} - - bp1 = { x: ((-d2pow2A * p0.x + A*p1.x + d1pow2A * p2.x) * N), - y: ((-d2pow2A * p0.y + A*p1.y + d1pow2A * p2.y) * N)}; - - bp2 = { x: (( d3pow2A * p1.x + B*p2.x - d2pow2A * p3.x) * M), - y: (( d3pow2A * p1.y + B*p2.y - d2pow2A * p3.y) * M)}; - - if (bp1.x == 0 && bp1.y == 0) {bp1 = p1;} - if (bp2.x == 0 && bp2.y == 0) {bp2 = p2;} - d += 'C' + - bp1.x + ',' + - bp1.y + ' ' + - bp2.x + ',' + - bp2.y + ' ' + - p2.x + ',' + - p2.y + ' '; +Line._catmullRom = function (data, group) { + var alpha = group.options.interpolation.alpha; + if (alpha == 0 || alpha === undefined) { + return this._catmullRomUniform(data); } + else { + var p0, p1, p2, p3, bp1, bp2, d1, d2, d3, A, B, N, M; + var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA; + var d = []; + d.push( [ Math.round(data[0].screen_x) , Math.round(data[0].screen_y) ]); + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = (i == 0) ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = (i + 2 < length) ? data[i + 2] : p2; + + d1 = Math.sqrt(Math.pow(p0.screen_x - p1.screen_x, 2) + Math.pow(p0.screen_y - p1.screen_y, 2)); + d2 = Math.sqrt(Math.pow(p1.screen_x - p2.screen_x, 2) + Math.pow(p1.screen_y - p2.screen_y, 2)); + d3 = Math.sqrt(Math.pow(p2.screen_x - p3.screen_x, 2) + Math.pow(p2.screen_y - p3.screen_y, 2)); + + // Catmull-Rom to Cubic Bezier conversion matrix + + // A = 2d1^2a + 3d1^a * d2^a + d3^2a + // B = 2d3^2a + 3d3^a * d2^a + d2^2a + + // [ 0 1 0 0 ] + // [ -d2^2a /N A/N d1^2a /N 0 ] + // [ 0 d3^2a /M B/M -d2^2a /M ] + // [ 0 0 1 0 ] + + d3powA = Math.pow(d3, alpha); + d3pow2A = Math.pow(d3, 2 * alpha); + d2powA = Math.pow(d2, alpha); + d2pow2A = Math.pow(d2, 2 * alpha); + d1powA = Math.pow(d1, alpha); + d1pow2A = Math.pow(d1, 2 * alpha); + + A = 2 * d1pow2A + 3 * d1powA * d2powA + d2pow2A; + B = 2 * d3pow2A + 3 * d3powA * d2powA + d2pow2A; + N = 3 * d1powA * (d1powA + d2powA); + if (N > 0) { + N = 1 / N; + } + M = 3 * d3powA * (d3powA + d2powA); + if (M > 0) { + M = 1 / M; + } + + bp1 = { + screen_x: ((-d2pow2A * p0.screen_x + A * p1.screen_x + d1pow2A * p2.screen_x) * N), + screen_y: ((-d2pow2A * p0.screen_y + A * p1.screen_y + d1pow2A * p2.screen_y) * N) + }; + + bp2 = { + screen_x: (( d3pow2A * p1.screen_x + B * p2.screen_x - d2pow2A * p3.screen_x) * M), + screen_y: (( d3pow2A * p1.screen_y + B * p2.screen_y - d2pow2A * p3.screen_y) * M) + }; + + if (bp1.screen_x == 0 && bp1.screen_y == 0) { + bp1 = p1; + } + if (bp2.screen_x == 0 && bp2.screen_y == 0) { + bp2 = p2; + } + d.push( [ bp1.screen_x , bp1.screen_y ]); + d.push( [ bp2.screen_x , bp2.screen_y ]); + d.push( [ p2.screen_x , p2.screen_y ]); + } - return d; - } + return d; + } }; /** @@ -286,18 +289,13 @@ Line._catmullRom = function(data, group) { * @returns {string} * @private */ -Line._linear = function(data) { - // linear - var d = ''; - for (var i = 0; i < data.length; i++) { - if (i == 0) { - d += data[i].x + ',' + data[i].y; - } - else { - d += ' ' + data[i].x + ',' + data[i].y; +Line._linear = function (data) { + // linear + var d = []; + for (var i = 0; i < data.length; i++) { + d.push([ data[i].screen_x , data[i].screen_y ]); } - } - return d; + return d; }; module.exports = Line; diff --git a/lib/timeline/component/graph2d_types/points.js b/lib/timeline/component/graph2d_types/points.js index f54df328..c6a05a92 100644 --- a/lib/timeline/component/graph2d_types/points.js +++ b/lib/timeline/component/graph2d_types/points.js @@ -1,25 +1,8 @@ var DOMutil = require('../../../DOMutil'); function Points(groupId, options) { - this.groupId = groupId; - this.options = options; } - -Points.prototype.getYRange = function(groupData) { - var yMin = groupData[0].y; - var yMax = groupData[0].y; - for (var j = 0; j < groupData.length; j++) { - yMin = yMin > groupData[j].y ? groupData[j].y : yMin; - yMax = yMax < groupData[j].y ? groupData[j].y : yMax; - } - return {min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation}; -}; - -Points.prototype.draw = function(dataset, group, framework, offset) { - Points.draw(dataset, group, framework, offset); -}; - /** * draw the data points * @@ -31,46 +14,60 @@ Points.prototype.draw = function(dataset, group, framework, offset) { */ Points.draw = function (dataset, group, framework, offset) { offset = offset || 0; - var callback = getCallback(); + var callback = getCallback(framework, group); for (var i = 0; i < dataset.length; i++) { if (!callback) { - // draw the point the simple way. - DOMutil.drawPoint(dataset[i].x + offset, dataset[i].y, getGroupTemplate(), framework.svgElements, framework.svg, dataset[i].label); + // draw the point the simple way. + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group), framework.svgElements, framework.svg, dataset[i].label); } else { - var callbackResult = callback(dataset[i], group, framework); // result might be true, false or an object + var callbackResult = callback(dataset[i], group); // result might be true, false or an object if (callbackResult === true || typeof callbackResult === 'object') { - DOMutil.drawPoint(dataset[i].x + offset, dataset[i].y, getGroupTemplate(callbackResult), framework.svgElements, framework.svg, dataset[i].label); + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label); } } } +}; - function getGroupTemplate(callbackResult) { - callbackResult = (typeof callbackResult === 'undefined') ? {} : callbackResult; - return { - style: callbackResult.style || group.options.drawPoints.style, - size: callbackResult.size || group.options.drawPoints.size, - className: callbackResult.className || group.className - }; - } - - function getCallback() { - var callback = undefined; - // check for the graph2d onRender - if (framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') { - callback = framework.options.drawPoints.onRender; - } - - // override it with the group onRender if defined - if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') { - callback = group.group.options.drawPoints.onRender; - } - - return callback; - } +Points.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; + + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + //Don't call callback on icon + DOMutil.drawPoint(x + 0.5 * iconWidth, y, getGroupTemplate(group), framework.svgElements, framework.svg); }; +function getGroupTemplate(group, callbackResult) { + callbackResult = (typeof callbackResult === 'undefined') ? {} : callbackResult; + return { + style: callbackResult.style || group.options.drawPoints.style, + styles: callbackResult.styles || group.options.drawPoints.styles, + size: callbackResult.size || group.options.drawPoints.size, + className: callbackResult.className || group.className + }; +} + +function getCallback(framework, group) { + var callback = undefined; + // check for the graph2d onRender + if (framework.options && framework.options.drawPoints && framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') { + callback = framework.options.drawPoints.onRender; + } + + // override it with the group onRender if defined + if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') { + callback = group.group.options.drawPoints.onRender; + } + return callback; +} module.exports = Points; \ No newline at end of file diff --git a/lib/timeline/component/item/BoxItem.js b/lib/timeline/component/item/BoxItem.js index a129e0be..8c58ca42 100644 --- a/lib/timeline/component/item/BoxItem.js +++ b/lib/timeline/component/item/BoxItem.js @@ -168,28 +168,33 @@ BoxItem.prototype.hide = function() { BoxItem.prototype.repositionX = function() { var start = this.conversion.toScreen(this.data.start); var align = this.options.align; - var left; // calculate left position of the box if (align == 'right') { this.left = start - this.width; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = (start - this.props.line.width) + 'px'; + this.dom.dot.style.left = (start - this.props.line.width / 2 - this.props.dot.width / 2) + 'px'; } else if (align == 'left') { this.left = start; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start + 'px'; + this.dom.dot.style.left = (start + this.props.line.width / 2 - this.props.dot.width / 2) + 'px'; } else { // default or 'center' this.left = start - this.width / 2; - } - // reposition box - this.dom.box.style.left = this.left + 'px'; - - // reposition line - this.dom.line.style.left = (start - this.props.line.width / 2) + 'px'; - - // reposition dot - this.dom.dot.style.left = (start - this.props.dot.width / 2) + 'px'; + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = (start - this.props.line.width / 2) + 'px'; + this.dom.dot.style.left = (start - this.props.dot.width / 2) + 'px'; + } }; /** diff --git a/lib/timeline/component/item/PointItem.js b/lib/timeline/component/item/PointItem.js index 8f22ad99..6238e09e 100644 --- a/lib/timeline/component/item/PointItem.js +++ b/lib/timeline/component/item/PointItem.js @@ -120,13 +120,14 @@ PointItem.prototype.redraw = function() { dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; //dom.content.style.marginRight = ... + 'px'; // TODO: margin right - dom.dot.style.top = ((this.height - this.props.dot.height) / 2) + 'px'; - dom.dot.style.left = (this.props.dot.width / 2) + 'px'; - // recalculate size this.width = dom.point.offsetWidth; this.height = dom.point.offsetHeight; + // reposition the dot + dom.dot.style.top = ((this.height - this.props.dot.height) / 2) + 'px'; + dom.dot.style.left = (this.props.dot.width / 2) + 'px'; + this.dirty = false; } diff --git a/lib/timeline/optionsGraph2d.js b/lib/timeline/optionsGraph2d.js index 163f5eb2..fb8e0455 100644 --- a/lib/timeline/optionsGraph2d.js +++ b/lib/timeline/optionsGraph2d.js @@ -33,12 +33,14 @@ let allOptions = { graphHeight: {string, number}, shaded: { enabled: {boolean}, - orientation: {string:['bottom','top']}, // top, bottom + orientation: {string:['bottom','top','zero','group']}, // top, bottom, zero, group + groupId: {object}, __type__: {boolean,object} }, style: {string:['line','bar','points']}, // line, bar barChart: { width: {number}, + minWidth: {number}, sideBySide: {boolean}, align: {string:['left','center','right']}, __type__: {object} @@ -128,7 +130,12 @@ let allOptions = { }, moment: {'function': 'function'}, height: {string, number}, - hiddenDates: {object, array}, + hiddenDates: { + start: {date, number, string, moment}, + end: {date, number, string, moment}, + repeat: {string}, + __type__: {object, array} + }, locale:{string}, locales:{ __any__: {any}, @@ -136,6 +143,7 @@ let allOptions = { }, max: {date, number, string, moment}, maxHeight: {number, string}, + maxMinorChars: {number}, min: {date, number, string, moment}, minHeight: {number, string}, moveable: {boolean}, @@ -155,6 +163,7 @@ let allOptions = { zoomKey: {string: ['ctrlKey', 'altKey', 'metaKey', '']}, zoomMax: {number}, zoomMin: {number}, + zIndex: {number}, __type__: {object} }; @@ -166,11 +175,12 @@ let configureOptions = { stack:false, shaded: { enabled: false, - orientation: ['top','bottom'] // top, bottom + orientation: ['zero','top','bottom','group'] // zero, top, bottom }, style: ['line','bar','points'], // line, bar barChart: { width: [50,5,100,5], + minWidth: [50,5,100,5], sideBySide: false, align: ['left','center','right'] // left, center, right }, @@ -215,7 +225,7 @@ let configureOptions = { }, autoResize: true, - throttleRedraw: 0, + throttleRedraw: [10, 0, 1000, 10], clickToUse: false, end: '', format: { @@ -245,6 +255,7 @@ let configureOptions = { locale: '', max: '', maxHeight: '', + maxMinorChars: [7, 0, 20, 1], min: '', minHeight: '', moveable:true, @@ -257,8 +268,9 @@ let configureOptions = { zoomable: true, zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''], zoomMax: [315360000000000, 10, 315360000000000, 1], - zoomMin: [10, 10, 315360000000000, 1] + zoomMin: [10, 10, 315360000000000, 1], + zIndex: 0 } }; -export {allOptions, configureOptions}; \ No newline at end of file +export {allOptions, configureOptions}; diff --git a/lib/timeline/optionsTimeline.js b/lib/timeline/optionsTimeline.js index 06a58552..acf93a17 100644 --- a/lib/timeline/optionsTimeline.js +++ b/lib/timeline/optionsTimeline.js @@ -73,7 +73,13 @@ let allOptions = { }, groupOrderSwap: {'function': 'function'}, height: {string, number}, - hiddenDates: {object, array}, + hiddenDates: { + start: {date, number, string, moment}, + end: {date, number, string, moment}, + repeat: {string}, + __type__: {object, array} + }, + itemsAlwaysDraggable: { boolean: boolean }, locale:{string}, locales:{ __any__: {any}, @@ -90,10 +96,12 @@ let allOptions = { }, max: {date, number, string, moment}, maxHeight: {number, string}, + maxMinorChars: {number}, min: {date, number, string, moment}, minHeight: {number, string}, moveable: {boolean}, multiselect: {boolean}, + multiselectPerGroup: {boolean}, onAdd: {'function': 'function'}, onUpdate: {'function': 'function'}, onMove: {'function': 'function'}, @@ -136,7 +144,7 @@ let configureOptions = { global: { align: ['center', 'left', 'right'], autoResize: true, - throttleRedraw: 0, + throttleRedraw: [10, 0, 1000, 10], clickToUse: false, // dataAttributes: ['all'], // FIXME: can be 'all' or string[] editable: { @@ -183,10 +191,12 @@ let configureOptions = { }, max: '', maxHeight: '', + maxMinorChars: [7, 0, 20, 1], min: '', minHeight: '', moveable: false, multiselect: false, + multiselectPerGroup: false, //onAdd: {'function': 'function'}, //onUpdate: {'function': 'function'}, //onMove: {'function': 'function'}, diff --git a/lib/util.js b/lib/util.js index 46b2760f..a433075a 100644 --- a/lib/util.js +++ b/lib/util.js @@ -232,7 +232,12 @@ exports.selectiveDeepExtend = function (props, a, b, allowDeletion = false) { } else if (Array.isArray(b[prop])) { throw new TypeError('Arrays are not supported by deepExtend'); } else { - a[prop] = b[prop]; + if ((b[prop] === null) && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } + else { + a[prop] = b[prop]; + } } } @@ -278,7 +283,12 @@ exports.selectiveNotDeepExtend = function (props, a, b, allowDeletion = false) { a[prop].push(b[prop][i]); } } else { - a[prop] = b[prop]; + if ((b[prop] === null) && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } + else { + a[prop] = b[prop]; + } } } } @@ -319,7 +329,12 @@ exports.deepExtend = function (a, b, protoExtend, allowDeletion) { a[prop].push(b[prop][i]); } } else { - a[prop] = b[prop]; + if ((b[prop] === null) && a[prop] !== undefined && allowDeletion === true) { + delete a[prop]; + } + else { + a[prop] = b[prop]; + } } } } @@ -1238,6 +1253,23 @@ exports.bridgeObject = function (referenceObject) { } }; +/** + * This method provides a stable sort implementation, very fast for presorted data + * + * @param a the array + * @param a order comparator + * @returns {the array} + */ +exports.insertSort = function (a,compare) { + for (var i = 0; i < a.length; i++) { + var k = a[i]; + for (var j = i; j > 0 && compare(k,a[j - 1])<0; j--) { + a[j] = a[j - 1]; + } + a[j] = k; + } + return a; +} /** * this is used to set the options of subobjects in the options object. A requirement of these subobjects @@ -1246,12 +1278,10 @@ exports.bridgeObject = function (referenceObject) { * @param [object] mergeTarget | this is either this.options or the options used for the groups. * @param [object] options | options * @param [String] option | this is the option key in the options argument - * @private */ -exports.mergeOptions = function (mergeTarget, options, option, allowDeletion = false) { +exports.mergeOptions = function (mergeTarget, options, option, allowDeletion = false, globalOptions = {}) { if (options[option] === null) { - mergeTarget[option] = undefined; - delete mergeTarget[option]; + mergeTarget[option] = Object.create(globalOptions[option]); } else { if (options[option] !== undefined) { @@ -1278,13 +1308,13 @@ exports.mergeOptions = function (mergeTarget, options, option, allowDeletion = f * this function will then iterate in both directions over this sorted list to find all visible items. * * @param {Item[]} orderedItems | Items ordered by start - * @param {function} searchFunction | -1 is lower, 0 is found, 1 is higher + * @param {function} comparator | -1 is lower, 0 is equal, 1 is higher * @param {String} field * @param {String} field2 * @returns {number} * @private */ -exports.binarySearchCustom = function (orderedItems, searchFunction, field, field2) { +exports.binarySearchCustom = function (orderedItems, comparator, field, field2) { var maxIterations = 10000; var iteration = 0; var low = 0; @@ -1296,7 +1326,7 @@ exports.binarySearchCustom = function (orderedItems, searchFunction, field, fiel var item = orderedItems[middle]; var value = (field2 === undefined) ? item[field] : item[field][field2]; - var searchResult = searchFunction(value); + var searchResult = comparator(value); if (searchResult == 0) { // jihaa, found a visible item! return middle; } @@ -1322,16 +1352,21 @@ exports.binarySearchCustom = function (orderedItems, searchFunction, field, fiel * @param {{start: number, end: number}} target * @param {String} field * @param {String} sidePreference 'before' or 'after' + * @param {function} comparator an optional comparator, returning -1,0,1 for <,==,>. * @returns {number} * @private */ -exports.binarySearchValue = function (orderedItems, target, field, sidePreference) { +exports.binarySearchValue = function (orderedItems, target, field, sidePreference, comparator) { var maxIterations = 10000; var iteration = 0; var low = 0; var high = orderedItems.length - 1; var prevValue, value, nextValue, middle; + var comparator = comparator != undefined ? comparator : function (a, b) { + return a == b ? 0 : a < b ? -1 : 1 + }; + while (low <= high && iteration < maxIterations) { // get a new guess middle = Math.floor(0.5 * (high + low)); @@ -1339,17 +1374,17 @@ exports.binarySearchValue = function (orderedItems, target, field, sidePreferenc value = orderedItems[middle][field]; nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field]; - if (value == target) { // we found the target + if (comparator(value, target) == 0) { // we found the target return middle; } - else if (prevValue < target && value > target) { // target is in between of the previous and the current + else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) { // target is in between of the previous and the current return sidePreference == 'before' ? Math.max(0, middle - 1) : middle; } - else if (value < target && nextValue > target) { // target is in between of the current and the next + else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) { // target is in between of the current and the next return sidePreference == 'before' ? middle : Math.min(orderedItems.length - 1, middle + 1); } else { // didnt find the target, we need to change our boundaries. - if (value < target) { // it is too small --> increase low + if (comparator(value, target) < 0) { // it is too small --> increase low low = middle + 1; } else { // it is too big --> decrease high diff --git a/misc/how_to_publish.md b/misc/how_to_publish.md index 2a53de25..38492d76 100644 --- a/misc/how_to_publish.md +++ b/misc/how_to_publish.md @@ -5,7 +5,7 @@ This document describes how to publish vis.js. ## Build -- Change the version number of the library in both `package.json` and `bower.json`. +- Change the version number of the library in `package.json`. - Open `HISTORY.md`, write down the changes, version number, and release date. - Build the library by running: @@ -76,7 +76,7 @@ This generates the vis.js library in the folder `./dist`. - Update the library version number in the index.html page. -- Update the CDN links at the download section of index.html AND the CDN link at the top. +- Update the CDN links at the download section of index.html AND the CDN link at the top. (replace all) - Commit the changes in the `gh-pages` branch. diff --git a/package.json b/package.json index a4b25283..05737222 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vis", - "version": "4.8.1-SNAPSHOT", + "version": "4.15.1-SNAPSHOT", "description": "A dynamic, browser-based visualization library.", "homepage": "http://visjs.org/", "license": "(Apache-2.0 OR MIT)", @@ -21,22 +21,21 @@ "network", "browser" ], - "main": "./dist/vis.min.js", + "main": "./dist/vis.js", "scripts": { "test": "mocha", "build": "gulp", "watch": "gulp watch", "watch-dev": "gulp watch --bundle" }, - "dependencies": { + "dependencies": {}, + "devDependencies": { "emitter-component": "^1.1.1", - "hammerjs": "^2.0.4", + "hammerjs": "^2.0.6", "keycharm": "^0.2.0", "moment": "^2.10.2", - "propagating-hammerjs": "^1.4.3", - "uuid": "^2.0.1" - }, - "devDependencies": { + "propagating-hammerjs": "^1.4.5", + "uuid": "^2.0.1", "babel": "^5.1.11", "babel-loader": "^5.0.0", "babelify": "^6.0.2", @@ -52,10 +51,5 @@ "uglify-js": "^2.4.20", "webpack": "^1.8.5", "yargs": "^3.7.2" - }, - "browserify": { - "transform": [ - "babelify" - ] } } diff --git a/test/DataView.test.js b/test/DataView.test.js index 8a267528..4d3c5f97 100644 --- a/test/DataView.test.js +++ b/test/DataView.test.js @@ -177,15 +177,27 @@ describe('DataView', function () { // make a change not affecting the DataView data.update({id: 1, title: 'Item 1 (changed)'}); assert.deepEqual(dataUpdates, [ - ['update', {items: [1], data: [{id: 1, title: 'Item 1 (changed)'}]}] + ['update', { + items: [1], + data: [{id: 1, title: 'Item 1 (changed)'}], + oldData: [{"group": 1, "id": 1, "title": "Item 1"}] + }] ]); assert.deepEqual(viewUpdates, []); // make a change affecting the DataView data.update({id: 2, title: 'Item 2 (changed)'}); assert.deepEqual(dataUpdates, [ - ['update', {items: [1], data: [{id: 1, title: 'Item 1 (changed)'}]}], - ['update', {items: [2], data: [{id: 2, title: 'Item 2 (changed)'}]}] + ['update', { + items: [1], + data: [{id: 1, title: 'Item 1 (changed)'}], + oldData: [{"group": 1, "id": 1, "title": "Item 1"}] + }], + ['update', { + items: [2], + data: [{id: 2, title: 'Item 2 (changed)'}], + oldData: [{"group": 2, "id": 2, "title": "Item 2"}] + }] ]); assert.deepEqual(viewUpdates, [ ['update', {items: [2], data: [{id: 2, title: 'Item 2 (changed)'}]}] diff --git a/test/networkTest.html b/test/networkTest.html index 441a5a08..b10873b4 100644 --- a/test/networkTest.html +++ b/test/networkTest.html @@ -1,74 +1,63 @@ - + - Network | Basic usage - - - - + + JS Bin + + - -

- Create a simple network with some nodes and edges. -

- -
+

Network Test

+
+ + + - + \ No newline at end of file diff --git a/test/network_unittests.html b/test/network_unittests.html index 1d89eb05..2d3e2eaa 100644 --- a/test/network_unittests.html +++ b/test/network_unittests.html @@ -188,6 +188,10 @@ var allOptions = vis.network.allOptions.allOptions; var testOptions = {}; constructOptions(allOptions, testOptions); + if (testOptions.physics === undefined) {testOptions.physics = {};} + if (testOptions.layout === undefined) {testOptions.layout = {};} + testOptions.physics.enabled = true; + testOptions.layout.improvedLayout = false; var failed = setTimeout(function () { console.error("FAILED", JSON.stringify(testOptions, null, 4)) }, 500); @@ -211,6 +215,7 @@ setTimeout(checkOptions, 100); }) console.log("now testing:",testOptions) + network.setOptions(testOptions); } } diff --git a/test/timeline.html b/test/timeline.html index 27e5ed25..7887b340 100644 --- a/test/timeline.html +++ b/test/timeline.html @@ -216,6 +216,12 @@ items.on('update', console.log.bind(console)); items.on('remove', console.log.bind(console)); + timeline.on('currentTimeTick', function () { + console.log('currentTimeTick') + }); + + +// timeline.setOptions({timeAxis:{scale: 'minute', step: 5}}) \ No newline at end of file diff --git a/test/timeline_groups.html b/test/timeline_groups.html index aac1c2ca..4df1b433 100644 --- a/test/timeline_groups.html +++ b/test/timeline_groups.html @@ -71,7 +71,9 @@ } // create a dataset with items - var items = new vis.DataSet(); + var items = new vis.DataSet({ + type: {start: 'Moment', end: 'Moment'} + }); for (var i = 0; i < itemCount; i++) { var start = now.clone().add(Math.random() * 200, 'hours'); var end = Math.random() > 0.5 ? start.clone().add(24, 'hours') : undefined; @@ -117,6 +119,7 @@ }, onMove: function (item, callback) { + console.log('onMove', item) if (confirm('Do you really want to move the item to\n' + 'start: ' + item.start + '\n' + 'end: ' + item.end + '?')) {