Browse Source

Fixed #206: removed check for number of arguments in callbacks `onAdd`, `onUpdate`, `onRemove`, and `onMove`.

v3_develop
jos 10 years ago
parent
commit
f7e964edd0
5 changed files with 26 additions and 23 deletions
  1. +2
    -0
      HISTORY.md
  2. +17
    -16
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +5
    -5
      dist/vis.min.js
  5. +1
    -1
      lib/timeline/component/ItemSet.js

+ 2
- 0
HISTORY.md View File

@ -6,6 +6,8 @@ http://visjs.org
### Timeline ### Timeline
- Removed check for number of arguments in callbacks `onAdd`, `onUpdate`,
`onRemove`, and `onMove`.
- Fixed items in groups sometimes being displayed but not positioned correctly. - Fixed items in groups sometimes being displayed but not positioned correctly.
- Fixed range where the `end` of the first is equal to the `start` of the second - Fixed range where the `end` of the first is equal to the `start` of the second
sometimes being stacked instead of put besides each other when `item.margin=0`. sometimes being stacked instead of put besides each other when `item.margin=0`.

+ 17
- 16
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 3.0.1-SNAPSHOT * @version 3.0.1-SNAPSHOT
* @date 2014-07-09
* @date 2014-07-10
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -145,8 +145,8 @@ return /******/ (function(modules) { // webpackBootstrap
// first check if moment.js is already loaded in the browser window, if so, // first check if moment.js is already loaded in the browser window, if so,
// use this instance. Else, load via commonjs. // use this instance. Else, load via commonjs.
var Hammer = __webpack_require__(38);
var moment = __webpack_require__(39);
var Hammer = __webpack_require__(39);
var moment = __webpack_require__(38);
/** /**
* Test whether given object is a number * Test whether given object is a number
@ -7715,7 +7715,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var util = __webpack_require__(1); var util = __webpack_require__(1);
var moment = __webpack_require__(39);
var moment = __webpack_require__(38);
var Component = __webpack_require__(12); var Component = __webpack_require__(12);
/** /**
@ -8369,7 +8369,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 11 */ /* 11 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var moment = __webpack_require__(39);
var moment = __webpack_require__(38);
/** /**
* @constructor TimeStep * @constructor TimeStep
@ -10554,7 +10554,7 @@ return /******/ (function(modules) { // webpackBootstrap
var addCallback = (function (name) { var addCallback = (function (name) {
if (name in options) { if (name in options) {
var fn = options[name]; var fn = options[name];
if (!(fn instanceof Function) || fn.length != 2) {
if (!(fn instanceof Function)) {
throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)'); throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)');
} }
this.options[name] = fn; this.options[name] = fn;
@ -20263,12 +20263,22 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ }, /***/ },
/* 38 */ /* 38 */
/***/ function(module, exports, __webpack_require__) {
// first check if moment.js is already loaded in the browser window, if so,
// use this instance. Else, load via commonjs.
module.exports = (typeof window !== 'undefined') && window['moment'] || __webpack_require__(51);
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
// Only load hammer.js when in a browser environment // Only load hammer.js when in a browser environment
// (loading hammer.js in a node.js environment gives errors) // (loading hammer.js in a node.js environment gives errors)
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
module.exports = __webpack_require__(49);
module.exports = window['Hammer'] || __webpack_require__(49);
// TODO: throw an error when hammerjs is not available?
} }
else { else {
module.exports = function () { module.exports = function () {
@ -20277,15 +20287,6 @@ return /******/ (function(modules) { // webpackBootstrap
} }
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
// first check if moment.js is already loaded in the browser window, if so,
// use this instance. Else, load via commonjs.
module.exports = (typeof window !== 'undefined') && window['moment'] || __webpack_require__(51);
/***/ }, /***/ },
/* 40 */ /* 40 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {

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


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


+ 1
- 1
lib/timeline/component/ItemSet.js View File

@ -277,7 +277,7 @@ ItemSet.prototype.setOptions = function(options) {
var addCallback = (function (name) { var addCallback = (function (name) {
if (name in options) { if (name in options) {
var fn = options[name]; var fn = options[name];
if (!(fn instanceof Function) || fn.length != 2) {
if (!(fn instanceof Function)) {
throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)'); throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)');
} }
this.options[name] = fn; this.options[name] = fn;

Loading…
Cancel
Save