Browse Source

updated builds, history

v3_develop
Alex de Mulder 9 years ago
parent
commit
104079f305
4 changed files with 203 additions and 159 deletions
  1. +3
    -0
      HISTORY.md
  2. +184
    -143
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +15
    -15
      dist/vis.min.js

+ 3
- 0
HISTORY.md View File

@ -13,11 +13,14 @@ http://visjs.org
### Graph2D
- Added alignZeros option to dataAxis with default value true.
- Fixed bug with points drawn on bargraphs
- Fixed docs
### Network
- dragEnd event now does not give the selected nodes if only the viewport has been dragged #453
- merged high DPI fix by @crubier, thanks!
## 2014-11-14, version 3.7.0

+ 184
- 143
dist/vis.js View File

@ -4,8 +4,8 @@
*
* A dynamic, browser-based visualization library.
*
* @version 3.7.0
* @date 2014-11-21
* @version 3.7.1-SNAPSHOT
* @date 2014-11-25
*
* @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -7475,7 +7475,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {Date} [end] The end date
* @param {Number} [minimumStep] Optional. Minimum step size in milliseconds
*/
function DataStep(start, end, minimumStep, containerHeight, customRange) {
function DataStep(start, end, minimumStep, containerHeight, customRange, alignZeros) {
// variables
this.current = 0;
@ -7491,6 +7491,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.majorSteps = [1, 2, 5, 10];
this.minorSteps = [0.25, 0.5, 1, 2];
this.alignZeros = alignZeros;
this.setRange(start, end, minimumStep, containerHeight, customRange);
}
@ -7515,9 +7517,10 @@ return /******/ (function(modules) { // webpackBootstrap
this._end += 1;
}
if (this.autoScale) {
if (this.autoScale == true) {
this.setMinimumStep(minimumStep, containerHeight);
}
this.setFirst(customRange);
};
@ -7570,16 +7573,23 @@ return /******/ (function(modules) { // webpackBootstrap
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;
this.current = this.marginEnd;
};
DataStep.prototype.roundToMinor = function(value) {
@ -8004,8 +8014,8 @@ return /******/ (function(modules) { // webpackBootstrap
var changed = (this.start != newStart || this.end != newEnd);
// if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not neccesarily of type Range)
if (!((newStart >= this.start && newStart <= this.start) || (newEnd >= this.start && newEnd <= this.end)) &&
!((this.start >= newStart && this.start <= newEnd) || (this.end >= newStart && this.end <= newEnd) )) {
if (!((newStart >= this.start && newStart <= this.end) || (newEnd >= this.start && newEnd <= this.end)) &&
!((this.start >= newStart && this.start <= newEnd) || (this.end >= newStart && this.end <= newEnd) )) {
this.body.emitter.emit('checkRangedItems');
}
@ -9519,6 +9529,7 @@ return /******/ (function(modules) { // webpackBootstrap
iconWidth: 20,
width: '40px',
visible: true,
alignZeros: true,
customRange: {
left: {min:undefined, max:undefined},
right: {min:undefined, max:undefined}
@ -9556,6 +9567,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.stepPixels = 25;
this.stepPixelsForced = 25;
this.zeroCrossing = -1;
this.lineOffset = 0;
this.master = true;
this.svgElements = {};
@ -9617,7 +9630,8 @@ return /******/ (function(modules) { // webpackBootstrap
'visible',
'customRange',
'title',
'format'
'format',
'alignZeros'
];
util.selectiveExtend(fields, this.options, options);
@ -9729,6 +9743,11 @@ 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;
};
@ -9826,16 +9845,26 @@ return /******/ (function(modules) { // webpackBootstrap
// calculate range and step (step such that we have space for 7 characters per label)
var minimumStep = this.master ? this.props.majorCharHeight || 10 : this.stepPixelsForced;
var step = new DataStep(this.range.start, this.range.end, minimumStep, this.dom.frame.offsetHeight, this.options.customRange[this.options.orientation]);
var step = new DataStep(
this.range.start,
this.range.end,
minimumStep,
this.dom.frame.offsetHeight,
this.options.customRange[this.options.orientation],
this.master == false && this.options.alignZeros // doess the step have to align zeros? only if not master and the options is on
);
this.step = step;
// get the distance in pixels for a step
// dead space is space that is "left over" after a step
var stepPixels = (this.dom.frame.offsetHeight - (step.deadSpace * (this.dom.frame.offsetHeight / step.marginRange))) / (((step.marginRange - step.deadSpace) / step.step));
this.stepPixels = stepPixels;
var amountOfSteps = this.height / stepPixels;
var stepDifference = 0;
// the slave axis needs to use the same horizontal lines as the master axis.
if (this.master == false) {
stepPixels = this.stepPixelsForced;
stepDifference = Math.round((this.dom.frame.offsetHeight / stepPixels) - amountOfSteps);
@ -9843,6 +9872,16 @@ return /******/ (function(modules) { // webpackBootstrap
step.previous();
}
amountOfSteps = this.height / stepPixels;
if (this.zeroCrossing != -1 && this.options.alignZeros == true) {
var zeroStepDifference = (step.marginEnd / step.step) - this.zeroCrossing;
if (zeroStepDifference > 0) {
for (var i = 0; i < zeroStepDifference; i++) {step.next();}
}
else if (zeroStepDifference < 0) {
for (var i = 0; i < -zeroStepDifference; i++) {step.previous();}
}
}
}
else {
amountOfSteps += 0.25;
@ -9884,6 +9923,10 @@ return /******/ (function(modules) { // webpackBootstrap
this._redrawLine(y, orientation, 'grid horizontal minor', this.options.minorLinesOffset, this.props.minorLineWidth);
}
if (this.master == true && step.current == 0) {
this.zeroCrossing = max;
}
max++;
}
@ -10036,7 +10079,7 @@ return /******/ (function(modules) { // webpackBootstrap
// determine the char width and height on the minor axis
if (!('minorCharHeight' in this.props)) {
var textMinor = document.createTextNode('0');
var measureCharMinor = document.createElement('DIV');
var measureCharMinor = document.createElement('div');
measureCharMinor.className = 'yAxis minor measure';
measureCharMinor.appendChild(textMinor);
this.dom.frame.appendChild(measureCharMinor);
@ -10049,7 +10092,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (!('majorCharHeight' in this.props)) {
var textMajor = document.createTextNode('0');
var measureCharMajor = document.createElement('DIV');
var measureCharMajor = document.createElement('div');
measureCharMajor.className = 'yAxis major measure';
measureCharMajor.appendChild(textMajor);
this.dom.frame.appendChild(measureCharMajor);
@ -10062,7 +10105,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (!('titleCharHeight' in this.props)) {
var textTitle = document.createTextNode('0');
var measureCharTitle = document.createElement('DIV');
var measureCharTitle = document.createElement('div');
measureCharTitle.className = 'yAxis title measure';
measureCharTitle.appendChild(textTitle);
this.dom.frame.appendChild(measureCharTitle);
@ -12254,7 +12297,7 @@ return /******/ (function(modules) { // webpackBootstrap
// except when old selection is empty and new selection is still empty
if (newSelection.length > 0 || oldSelection.length > 0) {
this.body.emitter.emit('select', {
items: this.getSelection()
items: newSelection
});
}
};
@ -12279,7 +12322,7 @@ return /******/ (function(modules) { // webpackBootstrap
var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset
this.options.onUpdate(itemData, function (itemData) {
if (itemData) {
me.itemsData.update(itemData);
me.itemsData.getDataSet().update(itemData);
}
});
}
@ -12309,7 +12352,7 @@ return /******/ (function(modules) { // webpackBootstrap
// execute async handler to customize (or cancel) adding an item
this.options.onAdd(newItem, function (item) {
if (item) {
me.itemsData.add(item);
me.itemsData.getDataSet().add(item);
// TODO: need to trigger a redraw?
}
});
@ -12330,15 +12373,42 @@ return /******/ (function(modules) { // webpackBootstrap
if (item) {
// multi select items
selection = this.getSelection(); // current selection
var index = selection.indexOf(item.id);
if (index == -1) {
// item is not yet selected -> select it
var shiftKey = event.gesture.touches[0] && event.gesture.touches[0].shiftKey || false;
if (shiftKey) {
// select all items between the old selection and the tapped item
// determine the selection range
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) {
selection.push(_item.id); // do not use id but item.id, id itself is stringified
}
}
}
}
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);
this.body.emitter.emit('select', {
@ -12347,6 +12417,39 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
/**
* Calculate the time range of a list of items
* @param {Array.<Object>} itemsData
* @return {{min: Date, max: Date}} Returns the range of the provided items
* @private
*/
ItemSet._getItemRange = function(itemsData) {
var max = null;
var min = null;
itemsData.forEach(function (data) {
if (min == null || data.start < min) {
min = data.start;
}
if (data.end != undefined) {
if (max == null || data.end > max) {
max = data.end;
}
}
else {
if (max == null || data.start > max) {
max = data.start;
}
}
});
return {
min: min,
max: max
}
};
/**
* Find an item from an event target:
* searches for the attribute 'timeline-item' in the event target's element tree
@ -12673,6 +12776,7 @@ return /******/ (function(modules) { // webpackBootstrap
icons: false,
width: '40px',
visible: true,
alignZeros: true,
customRange: {
left: {min:undefined, max:undefined},
right: {min:undefined, max:undefined}
@ -13474,6 +13578,7 @@ return /******/ (function(modules) { // webpackBootstrap
changeCalled = this.yAxisLeft.redraw() || changeCalled;
this.yAxisRight.stepPixelsForced = this.yAxisLeft.stepPixels;
this.yAxisRight.zeroCrossing = this.yAxisLeft.zeroCrossing;
changeCalled = this.yAxisRight.redraw() || changeCalled;
}
else {
@ -15385,7 +15490,6 @@ return /******/ (function(modules) { // webpackBootstrap
type: "continuous",
roundness: 0.5
},
dynamicSmoothCurves: true,
maxVelocity: 30,
minVelocity: 0.1, // px/s
stabilize: true, // stabilize before displaying the network
@ -15469,6 +15573,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.startedStabilization = false;
this.stabilized = false;
this.stabilizationIterations = null;
this.draggingNodes = false;
// containers for nodes and edges
this.calculationNodes = {};
@ -15767,9 +15872,10 @@ return /******/ (function(modules) { // webpackBootstrap
if (options) {
var prop;
var fields = ['nodes','edges','smoothCurves','hierarchicalLayout','clustering','navigation','keyboard','dataManipulation',
'onAdd','onEdit','onEditEdge','onConnect','onDelete','clickToUse'
var fields = ['nodes','edges','smoothCurves','hierarchicalLayout','clustering','navigation',
'keyboard','dataManipulation','onAdd','onEdit','onEditEdge','onConnect','onDelete','clickToUse'
];
// extend all but the values in fields
util.selectiveNotDeepExtend(fields,this.constants, options);
util.selectiveNotDeepExtend(['color'],this.constants.nodes, options.nodes);
util.selectiveNotDeepExtend(['color','length'],this.constants.edges, options.edges);
@ -16081,8 +16187,10 @@ return /******/ (function(modules) { // webpackBootstrap
drag.selection = [];
drag.translation = this._getTranslation();
drag.nodeId = null;
this.draggingNodes = false;
if (node != null && this.constants.dragNodes == true) {
this.draggingNodes = true;
drag.nodeId = node.id;
// select the clicked node if not yet selected
if (!node.isSelected()) {
@ -16209,7 +16317,13 @@ return /******/ (function(modules) { // webpackBootstrap
else {
this._redraw();
}
this.emit("dragEnd",{nodeIds:this.getSelection().nodes});
if (this.draggingNodes == false) {
this.emit("dragEnd",{nodeIds:[]});
}
else {
this.emit("dragEnd",{nodeIds:this.getSelection().nodes});
}
}
/**
* handle tap/click event: select/unselect a node
@ -21215,9 +21329,6 @@ return /******/ (function(modules) { // webpackBootstrap
var DataSet = __webpack_require__(3);
var DataView = __webpack_require__(4);
var Range = __webpack_require__(17);
var TimeAxis = __webpack_require__(30);
var CurrentTime = __webpack_require__(21);
var CustomTime = __webpack_require__(22);
var ItemSet = __webpack_require__(27);
var Activator = __webpack_require__(55);
var DateUtil = __webpack_require__(15);
@ -21367,6 +21478,8 @@ return /******/ (function(modules) { // webpackBootstrap
};
this.touch = {}; // store state information needed for touch events
this.redrawCount = 0;
// attach the root panel to the provided container
if (!container) throw new Error('No container provided');
container.appendChild(this.dom.root);
@ -21804,7 +21917,15 @@ return /******/ (function(modules) { // webpackBootstrap
});
if (resized) {
// keep repainting until all sizes are settled
this.redraw();
var MAX_REDRAWS = 2; // maximum number of consecutive redraws
if (this.redrawCount < MAX_REDRAWS) {
this.redrawCount++;
this.redraw();
}
else {
console.log('WARNING: infinite loop in redraw?')
}
this.redrawCount = 0;
}
this.emit("finishedRedraw");
@ -22731,7 +22852,7 @@ return /******/ (function(modules) { // webpackBootstrap
DOMutil.drawBar(combinedData[i].x + drawData.offset, combinedData[i].y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].y, group.className + ' bar', framework.svgElements, framework.svg);
// draw points
if (group.options.drawPoints.enabled == true) {
Points.draw(dataset, group, framework, drawData.offset);
Points.draw(combinedData, group, framework, drawData.offset);
}
}
};
@ -23619,7 +23740,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global, module) {//! moment.js
//! version : 2.8.4
//! version : 2.8.3
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
@ -23630,7 +23751,7 @@ return /******/ (function(modules) { // webpackBootstrap
************************************/
var moment,
VERSION = '2.8.4',
VERSION = '2.8.3',
// the global-scope this is NOT the global object in Node.js
globalScope = typeof global !== 'undefined' ? global : this,
oldGlobalMoment,
@ -23653,7 +23774,7 @@ return /******/ (function(modules) { // webpackBootstrap
momentProperties = [],
// check for nodeJS
hasModule = (typeof module !== 'undefined' && module && module.exports),
hasModule = (typeof module !== 'undefined' && module.exports),
// ASP.NET json date format regex
aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
@ -23664,8 +23785,8 @@ return /******/ (function(modules) { // webpackBootstrap
isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
// format tokens
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,4}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
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,4}|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
// parsing token regexes
parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
@ -23676,8 +23797,8 @@ return /******/ (function(modules) { // webpackBootstrap
parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
parseTokenT = /T/i, // T (ISO separator)
parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123
parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
parseTokenOrdinal = /\d{1,2}/,
//strict parsing regexes
parseTokenOneDigit = /\d/, // 0 - 9
@ -23892,9 +24013,6 @@ return /******/ (function(modules) { // webpackBootstrap
zz : function () {
return this.zoneName();
},
x : function () {
return this.valueOf();
},
X : function () {
return this.unix();
},
@ -24321,10 +24439,7 @@ return /******/ (function(modules) { // webpackBootstrap
overflow =
m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
m._a[HOUR] < 0 || m._a[HOUR] > 24 ||
(m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 ||
m._a[SECOND] !== 0 ||
m._a[MILLISECOND] !== 0)) ? HOUR :
m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :
m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
@ -24351,8 +24466,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (m._strict) {
m._isValid = m._isValid &&
m._pf.charsLeftOver === 0 &&
m._pf.unusedTokens.length === 0 &&
m._pf.bigHour === undefined;
m._pf.unusedTokens.length === 0;
}
}
return m._isValid;
@ -24404,18 +24518,8 @@ return /******/ (function(modules) { // webpackBootstrap
// Return a moment from input, that is local/utc/zone equivalent to model.
function makeAs(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff = (moment.isMoment(input) || isDate(input) ?
+input : +moment(input)) - (+res);
// Use low-level api, because this fn is low-level api.
res._d.setTime(+res._d + diff);
moment.updateOffset(res, false);
return res;
} else {
return moment(input).local();
}
return model._isUTC ? moment(input).zone(model._offset || 0) :
moment(input).local();
}
/************************************
@ -24435,9 +24539,6 @@ return /******/ (function(modules) { // webpackBootstrap
this['_' + i] = prop;
}
}
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _ordinalParseLenient.
this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source);
},
_months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
@ -24450,32 +24551,22 @@ return /******/ (function(modules) { // webpackBootstrap
return this._monthsShort[m.month()];
},
monthsParse : function (monthName, format, strict) {
monthsParse : function (monthName) {
var i, mom, regex;
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = moment.utc([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
}
if (!strict && !this._monthsParse[i]) {
if (!this._monthsParse[i]) {
mom = moment.utc([2000, i]);
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
return i;
} else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
if (this._monthsParse[i].test(monthName)) {
return i;
}
}
@ -24518,7 +24609,6 @@ return /******/ (function(modules) { // webpackBootstrap
},
_longDateFormat : {
LTS : 'h:mm:ss A',
LT : 'h:mm A',
L : 'MM/DD/YYYY',
LL : 'MMMM D, YYYY',
@ -24559,9 +24649,9 @@ return /******/ (function(modules) { // webpackBootstrap
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
calendar : function (key, mom, now) {
calendar : function (key, mom) {
var output = this._calendar[key];
return typeof output === 'function' ? output.apply(mom, [now]) : output;
return typeof output === 'function' ? output.apply(mom) : output;
},
_relativeTime : {
@ -24596,7 +24686,6 @@ return /******/ (function(modules) { // webpackBootstrap
return this._ordinal.replace('%d', number);
},
_ordinal : '%d',
_ordinalParse : /\d{1,2}/,
preparse : function (string) {
return string;
@ -24738,8 +24827,6 @@ return /******/ (function(modules) { // webpackBootstrap
case 'a':
case 'A':
return config._locale._meridiemParse;
case 'x':
return parseTokenOffsetMs;
case 'X':
return parseTokenTimestampMs;
case 'Z':
@ -24774,7 +24861,7 @@ return /******/ (function(modules) { // webpackBootstrap
case 'E':
return parseTokenOneOrTwoDigits;
case 'Do':
return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient;
return parseTokenOrdinal;
default :
a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));
return a;
@ -24811,7 +24898,7 @@ return /******/ (function(modules) { // webpackBootstrap
break;
case 'MMM' : // fall through to MMMM
case 'MMMM' :
a = config._locale.monthsParse(input, token, config._strict);
a = config._locale.monthsParse(input);
// if we didn't find a month name, mark the date as invalid.
if (a != null) {
datePartArray[MONTH] = a;
@ -24828,8 +24915,7 @@ return /******/ (function(modules) { // webpackBootstrap
break;
case 'Do' :
if (input != null) {
datePartArray[DATE] = toInt(parseInt(
input.match(/\d{1,2}/)[0], 10));
datePartArray[DATE] = toInt(parseInt(input, 10));
}
break;
// DAY OF YEAR
@ -24854,13 +24940,11 @@ return /******/ (function(modules) { // webpackBootstrap
case 'A' :
config._isPm = config._locale.isPM(input);
break;
// HOUR
// 24 HOUR
case 'H' : // fall through to hh
case 'HH' : // fall through to hh
case 'h' : // fall through to hh
case 'hh' :
config._pf.bigHour = true;
/* falls through */
case 'H' : // fall through to HH
case 'HH' :
datePartArray[HOUR] = toInt(input);
break;
// MINUTE
@ -24880,10 +24964,6 @@ return /******/ (function(modules) { // webpackBootstrap
case 'SSSS' :
datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
break;
// UNIX OFFSET (MILLISECONDS)
case 'x':
config._d = new Date(toInt(input));
break;
// UNIX TIMESTAMP WITH MS
case 'X':
config._d = new Date(parseFloat(input) * 1000);
@ -25020,25 +25100,12 @@ return /******/ (function(modules) { // webpackBootstrap
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
}
// Check for 24:00:00.000
if (config._a[HOUR] === 24 &&
config._a[MINUTE] === 0 &&
config._a[SECOND] === 0 &&
config._a[MILLISECOND] === 0) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
// Apply timezone offset from input. The actual zone can be changed
// with parseZone.
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
}
function dateFromObject(config) {
@ -25052,7 +25119,7 @@ return /******/ (function(modules) { // webpackBootstrap
config._a = [
normalizedInput.year,
normalizedInput.month,
normalizedInput.day || normalizedInput.date,
normalizedInput.day,
normalizedInput.hour,
normalizedInput.minute,
normalizedInput.second,
@ -25125,10 +25192,6 @@ return /******/ (function(modules) { // webpackBootstrap
config._pf.unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
if (config._pf.bigHour === true && config._a[HOUR] <= 12) {
config._pf.bigHour = undefined;
}
// handle am pm
if (config._isPm && config._a[HOUR] < 12) {
config._a[HOUR] += 12;
@ -25137,6 +25200,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (config._isPm === false && config._a[HOUR] === 12) {
config._a[HOUR] = 0;
}
dateFromConfig(config);
checkOverflow(config);
}
@ -25396,8 +25460,7 @@ return /******/ (function(modules) { // webpackBootstrap
function makeMoment(config) {
var input = config._i,
format = config._f,
res;
format = config._f;
config._locale = config._locale || moment.localeData(config._l);
@ -25421,14 +25484,7 @@ return /******/ (function(modules) { // webpackBootstrap
makeDateFromInput(config);
}
res = new Moment(config);
if (res._nextDay) {
// Adding is smart enough around DST
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
return new Moment(config);
}
moment = function (input, format, locale, strict) {
@ -25460,7 +25516,7 @@ return /******/ (function(modules) { // webpackBootstrap
'release. Please refer to ' +
'https://github.com/moment/moment/issues/1407 for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
config._d = new Date(config._i);
}
);
@ -25772,12 +25828,7 @@ return /******/ (function(modules) { // webpackBootstrap
toISOString : function () {
var m = moment(this).utc();
if (0 < m.year() && m.year() <= 9999) {
if ('function' === typeof Date.prototype.toISOString) {
// native implementation is ~50x faster, use it when we can
return this.toDate().toISOString();
} else {
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
}
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
} else {
return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
}
@ -25896,7 +25947,7 @@ return /******/ (function(modules) { // webpackBootstrap
diff < 1 ? 'sameDay' :
diff < 2 ? 'nextDay' :
diff < 7 ? 'nextWeek' : 'sameElse';
return this.format(this.localeData().calendar(format, this, moment(now)));
return this.format(this.localeData().calendar(format, this));
},
isLeapYear : function () {
@ -25965,45 +26016,36 @@ return /******/ (function(modules) { // webpackBootstrap
endOf: function (units) {
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond') {
return this;
}
return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
},
isAfter: function (input, units) {
var inputMs;
units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
if (units === 'millisecond') {
input = moment.isMoment(input) ? input : moment(input);
return +this > +input;
} else {
inputMs = moment.isMoment(input) ? +input : +moment(input);
return inputMs < +this.clone().startOf(units);
return +this.clone().startOf(units) > +moment(input).startOf(units);
}
},
isBefore: function (input, units) {
var inputMs;
units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');
if (units === 'millisecond') {
input = moment.isMoment(input) ? input : moment(input);
return +this < +input;
} else {
inputMs = moment.isMoment(input) ? +input : +moment(input);
return +this.clone().endOf(units) < inputMs;
return +this.clone().startOf(units) < +moment(input).startOf(units);
}
},
isSame: function (input, units) {
var inputMs;
units = normalizeUnits(units || 'millisecond');
if (units === 'millisecond') {
input = moment.isMoment(input) ? input : moment(input);
return +this === +input;
} else {
inputMs = +moment(input);
return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);
}
},
@ -26180,7 +26222,7 @@ return /******/ (function(modules) { // webpackBootstrap
},
lang : deprecate(
'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
'moment().lang() is deprecated. Use moment().localeData() instead.',
function (key) {
if (key === undefined) {
return this.localeData();
@ -26401,7 +26443,7 @@ return /******/ (function(modules) { // webpackBootstrap
return units === 'month' ? months : months / 12;
} else {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(yearsToDays(this._months / 12));
days = this._days + yearsToDays(this._months / 12);
switch (units) {
case 'week': return days / 7 + this._milliseconds / 6048e5;
case 'day': return days + this._milliseconds / 864e5;
@ -26503,7 +26545,6 @@ return /******/ (function(modules) { // webpackBootstrap
// Set default locale, other locale will inherit from English.
moment.locale('en', {
ordinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal : function (number) {
var b = number % 10,
output = (toInt(number % 100 / 10) === 1) ? 'th' :

+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 15
- 15
dist/vis.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save