Browse Source

fixed bug when hiding Y axis, redraw is not always successfully performed

v3_develop
Alex de Mulder 10 years ago
parent
commit
5eab978deb
5 changed files with 424 additions and 610 deletions
  1. +406
    -595
      dist/vis.js
  2. +1
    -1
      dist/vis.map
  3. +1
    -1
      dist/vis.min.css
  4. +12
    -12
      dist/vis.min.js
  5. +4
    -1
      lib/timeline/component/LineGraph.js

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


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


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


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


+ 4
- 1
lib/timeline/component/LineGraph.js View File

@ -77,6 +77,7 @@ function LineGraph(body, options) {
this.props = {}; this.props = {};
this.hammer = null; this.hammer = null;
this.groups = {}; this.groups = {};
this.abortedGraphUpdate = false;
var me = this; var me = this;
this.itemsData = null; // DataSet this.itemsData = null; // DataSet
@ -521,7 +522,7 @@ LineGraph.prototype.redraw = function() {
this.svg.style.width = util.option.asSize(3*this.width); this.svg.style.width = util.option.asSize(3*this.width);
this.svg.style.left = util.option.asSize(-this.width); this.svg.style.left = util.option.asSize(-this.width);
} }
if (zoomed == true) {
if (zoomed == true || this.abortedGraphUpdate == true) {
this._updateGraph(); this._updateGraph();
} }
@ -574,9 +575,11 @@ LineGraph.prototype._updateGraph = function () {
changeCalled = this._updateYAxis(groupIds, groupRanges); changeCalled = this._updateYAxis(groupIds, groupRanges);
if (changeCalled == true) { if (changeCalled == true) {
DOMutil.cleanupElements(this.svgElements); DOMutil.cleanupElements(this.svgElements);
this.abortedGraphUpdate = true;
this.body.emitter.emit("change"); this.body.emitter.emit("change");
return; return;
} }
this.abortedGraphUpdate = false;
// With the yAxis scaled correctly, use this to get the Y values of the points. // With the yAxis scaled correctly, use this to get the Y values of the points.
for (i = 0; i < groupIds.length; i++) { for (i = 0; i < groupIds.length; i++) {

Loading…
Cancel
Save