Browse Source

Merge branch 'develop' of github.com:almende/vis into develop

codeClimate
Ludo Stellingwerff 8 years ago
parent
commit
fc03c75f7b
5 changed files with 12 additions and 8 deletions
  1. +3
    -0
      HISTORY.md
  2. +2
    -2
      lib/network/modules/components/edges/util/EdgeBase.js
  3. +2
    -0
      lib/timeline/Graph2d.js
  4. +3
    -6
      lib/timeline/Timeline.js
  5. +2
    -0
      lib/timeline/component/ItemSet.js

+ 3
- 0
HISTORY.md View File

@ -17,6 +17,7 @@ http://visjs.org
- Fixed #1596: correct clean up of manipulation dom elements. - Fixed #1596: correct clean up of manipulation dom elements.
- Fixed #1594: bug in hierarchical layout. - Fixed #1594: bug in hierarchical layout.
- Fixed #1597: Allow zero borders and addressed scaling artifacts. - Fixed #1597: Allow zero borders and addressed scaling artifacts.
- Fixed #1608: Fixed wrong variable reference
### Timeline ### Timeline
@ -24,6 +25,7 @@ http://visjs.org
- Fixed #1580: Invisible timeline/graph should not be drawn, as most inputs are invalid - 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 #1521: Prevent items from staying stuck to the left side of the viewport.
- Fixed #1592: Emit a "changed" event after each redraw. - Fixed #1592: Emit a "changed" event after each redraw.
- Fixed #1541: Timeline and Graph2d did not load synchronously anymore.
### Graph2d ### Graph2d
@ -34,6 +36,7 @@ http://visjs.org
- Cleanup of linegraph's event handling. - Cleanup of linegraph's event handling.
- Fixed #1017: Fixed minWidth behavior for bars. - Fixed #1017: Fixed minWidth behavior for bars.
- Fixes #1557: Fix default axis formatting function. - Fixes #1557: Fix default axis formatting function.
- Fixed #1541: Timeline and Graph2d did not load synchronously anymore.
## 2016-01-08, version 4.12.0 ## 2016-01-08, version 4.12.0

+ 2
- 2
lib/network/modules/components/edges/util/EdgeBase.js View File

@ -457,11 +457,11 @@ class EdgeBase {
if (position === 'from') { if (position === 'from') {
arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1}); arrowPoint = 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;
angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;
} }
else if (position === 'to') { else if (position === 'to') {
arrowPoint = this.findBorderPosition(this.from, ctx, {x, y, low:0.6, high:1.0, direction:1}); arrowPoint = 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;
angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;
} }
else { else {
arrowPoint = this._pointOnCircle(x, y, radius, 0.175); arrowPoint = this._pointOnCircle(x, y, radius, 0.175);

+ 2
- 0
lib/timeline/Graph2d.js View File

@ -124,6 +124,8 @@ function Graph2d (container, items, groups, options) {
if (items) { if (items) {
this.setItems(items); this.setItems(items);
} }
// draw for the first time
this._redraw(); this._redraw();
} }

+ 3
- 6
lib/timeline/Timeline.js View File

@ -157,9 +157,9 @@ function Timeline (container, items, groups, options) {
if (items) { if (items) {
this.setItems(items); this.setItems(items);
} }
else {
this._redraw();
}
// draw for the first time
this._redraw();
} }
// Extend the functionality from Core // Extend the functionality from Core
@ -237,9 +237,6 @@ Timeline.prototype.setItems = function(items) {
// set items // set items
this.itemsData = newDataSet; this.itemsData = newDataSet;
this.itemSet && this.itemSet.setItems(newDataSet); this.itemSet && this.itemSet.setItems(newDataSet);
this.body.emitter.emit('_change', {queue: true});
}; };
/** /**

+ 2
- 0
lib/timeline/component/ItemSet.js View File

@ -726,6 +726,8 @@ ItemSet.prototype.setItems = function(items) {
// update the group holding all ungrouped items // update the group holding all ungrouped items
this._updateUngrouped(); this._updateUngrouped();
} }
this.body.emitter.emit('_change', {queue: true});
}; };
/** /**

Loading…
Cancel
Save