Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	dist/vis.js
codeClimate
Alex de Mulder 8 years ago
parent
commit
d79553ba82
6 changed files with 60 additions and 40 deletions
  1. +18
    -5
      HISTORY.md
  2. +1
    -1
      dist/vis.map
  3. +22
    -22
      dist/vis.min.js
  4. +3
    -1
      lib/timeline/component/DataScale.js
  5. +15
    -10
      lib/timeline/component/item/BoxItem.js
  6. +1
    -1
      package.json

+ 18
- 5
HISTORY.md View File

@ -2,7 +2,19 @@
http://visjs.org
## not yet released, version 4.14.1
## 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
@ -17,18 +29,19 @@ http://visjs.org
### Graph3d
- The built-in tooltip now shows the provided `xLabel`, `yLabel`, and `zLabel`
instead of `'x'`, `'y'`, and `'z'`. Thanks @jacklightbody.
- 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.
- Added parentCentralization option for hierarchical layout.
- 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.
- Added interpolation option for interpolation of images, default true.
## 2016-02-04, version 4.14.0

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


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


+ 3
- 1
lib/timeline/component/DataScale.js View File

@ -59,7 +59,9 @@ DataScale.prototype.determineScale = function () {
var range = this._end - this._start;
this.scale = this.containerHeight / range;
var minimumStepValue = this.majorCharHeight / this.scale;
var orderOfMagnitude = Math.round(Math.log(range) / Math.LN10);
var orderOfMagnitude = (range > 0)
? Math.round(Math.log(range) / Math.LN10)
: 0;
this.minorStepIdx = -1;
this.magnitudefactor = Math.pow(10, orderOfMagnitude);

+ 15
- 10
lib/timeline/component/item/BoxItem.js View File

@ -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';
}
};
/**

+ 1
- 1
package.json View File

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

Loading…
Cancel
Save