Browse Source

Merge branch 'develop'

codeClimate v4.14.0
jos 8 years ago
parent
commit
46fd2accd4
8 changed files with 64 additions and 34 deletions
  1. +17
    -0
      HISTORY.md
  2. +11
    -8
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +21
    -21
      dist/vis.min.js
  5. +7
    -0
      docs/graph3d/index.html
  6. +6
    -2
      lib/graph3d/Graph3d.js
  7. +0
    -1
      lib/timeline/Core.js
  8. +1
    -1
      package.json

+ 17
- 0
HISTORY.md View File

@ -2,6 +2,23 @@
http://visjs.org http://visjs.org
## 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 ## 2016-02-01, version 4.13.0
### Network ### Network

+ 11
- 8
dist/vis.js View File

@ -4,8 +4,8 @@
* *
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 4.13.0
* @date 2016-02-01
* @version 4.14.0
* @date 2016-02-04
* *
* @license * @license
* Copyright (C) 2011-2016 Almende B.V, http://almende.com * Copyright (C) 2011-2016 Almende B.V, http://almende.com
@ -1582,7 +1582,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {//! moment.js /* WEBPACK VAR INJECTION */(function(module) {//! moment.js
//! version : 2.11.1
//! version : 2.11.2
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT //! license : MIT
//! momentjs.com //! momentjs.com
@ -3399,7 +3399,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
// ASP.NET json date format regex // ASP.NET json date format regex
var aspNetRegex = /(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/;
var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // 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 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
@ -5154,7 +5154,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Side effect imports // Side effect imports
utils_hooks__hooks.version = '2.11.1';
utils_hooks__hooks.version = '2.11.2';
setHookCallback(local__createLocal); setHookCallback(local__createLocal);
@ -7267,6 +7267,8 @@ return /******/ (function(modules) { // webpackBootstrap
strokeWidth: 1 // px strokeWidth: 1 // px
}; };
this.dotSizeRatio = 0.02; // size of the dots as a fraction of the graph width
// create a frame and canvas // create a frame and canvas
this.create(); this.create();
@ -7985,6 +7987,8 @@ return /******/ (function(modules) { // webpackBootstrap
if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel; if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel;
if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel; if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel;
if (options.dotSizeRatio !== undefined) this.dotSizeRatio = options.dotSizeRatio;
if (options.style !== undefined) { if (options.style !== undefined) {
var styleNumber = this._getStyleNumber(options.style); var styleNumber = this._getStyleNumber(options.style);
if (styleNumber !== -1) { if (styleNumber !== -1) {
@ -8107,7 +8111,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { 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; var widthMin, widthMax;
if (this.style === Graph3d.STYLE.DOTSIZE) { if (this.style === Graph3d.STYLE.DOTSIZE) {
@ -8747,7 +8751,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.dataPoints.sort(sortDepth); this.dataPoints.sort(sortDepth);
// draw the datapoints as colored circles // 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++) { for (i = 0; i < this.dataPoints.length; i++) {
var point = this.dataPoints[i]; var point = this.dataPoints[i];
@ -15233,7 +15237,6 @@ return /******/ (function(modules) { // webpackBootstrap
*/ */
Core.prototype._create = function (container) { Core.prototype._create = function (container) {
this.dom = {}; this.dom = {};
this.options = {};
this.dom.container = container; this.dom.container = container;

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


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


+ 7
- 0
docs/graph3d/index.html View File

@ -379,6 +379,13 @@ var options = {
<td>The line width of dots, bars and lines. Applicable for all styles.</td> <td>The line width of dots, bars and lines. Applicable for all styles.</td>
</tr> </tr>
<tr>
<td>dotSizeRatio</td>
<td>number</td>
<td>0.02</td>
<td>Ratio of the size of the dots with respect to the width of the graph.</td>
</tr>
<tr> <tr>
<td>gridColor</td> <td>gridColor</td>
<td>string</td> <td>string</td>

+ 6
- 2
lib/graph3d/Graph3d.js View File

@ -96,6 +96,8 @@ function Graph3d(container, data, options) {
strokeWidth: 1 // px strokeWidth: 1 // px
}; };
this.dotSizeRatio = 0.02; // size of the dots as a fraction of the graph width
// create a frame and canvas // create a frame and canvas
this.create(); this.create();
@ -844,6 +846,8 @@ Graph3d.prototype.setOptions = function (options) {
if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel; if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel;
if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel; if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel;
if (options.dotSizeRatio !== undefined) this.dotSizeRatio = options.dotSizeRatio;
if (options.style !== undefined) { if (options.style !== undefined) {
var styleNumber = this._getStyleNumber(options.style); var styleNumber = this._getStyleNumber(options.style);
if (styleNumber !== -1) { if (styleNumber !== -1) {
@ -976,7 +980,7 @@ Graph3d.prototype._redrawLegend = function() {
if (this.style === Graph3d.STYLE.DOTCOLOR || if (this.style === Graph3d.STYLE.DOTCOLOR ||
this.style === Graph3d.STYLE.DOTSIZE) { this.style === Graph3d.STYLE.DOTSIZE) {
var dotSize = this.frame.clientWidth * 0.02;
var dotSize = this.frame.clientWidth * this.dotSizeRatio;
var widthMin, widthMax; var widthMin, widthMax;
if (this.style === Graph3d.STYLE.DOTSIZE) { if (this.style === Graph3d.STYLE.DOTSIZE) {
@ -1613,7 +1617,7 @@ Graph3d.prototype._redrawDataDot = function() {
this.dataPoints.sort(sortDepth); this.dataPoints.sort(sortDepth);
// draw the datapoints as colored circles // 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++) { for (i = 0; i < this.dataPoints.length; i++) {
var point = this.dataPoints[i]; var point = this.dataPoints[i];

+ 0
- 1
lib/timeline/Core.js View File

@ -29,7 +29,6 @@ Emitter(Core.prototype);
*/ */
Core.prototype._create = function (container) { Core.prototype._create = function (container) {
this.dom = {}; this.dom = {};
this.options = {};
this.dom.container = container; this.dom.container = container;

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "vis", "name": "vis",
"version": "4.13.0",
"version": "4.14.0",
"description": "A dynamic, browser-based visualization library.", "description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/", "homepage": "http://visjs.org/",
"license": "(Apache-2.0 OR MIT)", "license": "(Apache-2.0 OR MIT)",

Loading…
Cancel
Save