Browse Source

Fixed #298: IE freezing when margin.item and margin.axis where both 0

v3_develop
jos 10 years ago
parent
commit
f96a90230f
7 changed files with 25139 additions and 24874 deletions
  1. +5
    -0
      HISTORY.md
  2. +25101
    -24851
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +1
    -1
      dist/vis.min.css
  5. +14
    -14
      dist/vis.min.js
  6. +7
    -7
      examples/graph2d/15_streaming_data.html
  7. +10
    -0
      lib/timeline/Core.js

+ 5
- 0
HISTORY.md View File

@ -10,6 +10,11 @@ http://visjs.org
- Added animation to zoomExtent navigation button. - Added animation to zoomExtent navigation button.
- Improved cleaning of Hammer.js bindings. - Improved cleaning of Hammer.js bindings.
### Timeline
- Fixed a bug in IE freezing when margin.item and margin.axis where both 0.
## 2014-09-10, version 3.4.0 ## 2014-09-10, version 3.4.0
### Graph2d ### Graph2d

+ 25101
- 24851
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


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


+ 7
- 7
examples/graph2d/15_streaming_data.html View File

@ -42,12 +42,6 @@
var dataset = new vis.DataSet(); var dataset = new vis.DataSet();
var now = vis.moment(); var now = vis.moment();
// added initial set so you don't think the graph is empty
dataset.add({x: now-2000,y: y((now-2000) / 1000)});
dataset.add({x: now-1000,y: y((now-1000) / 1000)});
dataset.add({x: now,y: y((now) / 1000)});
dataset.add({x: now+1000,y: y((now+1000) / 1000)});
var options = { var options = {
start: vis.moment().add(-30, 'seconds'), // changed so its faster start: vis.moment().add(-30, 'seconds'), // changed so its faster
end: vis.moment(), end: vis.moment(),
@ -57,6 +51,12 @@
min:-10, max: 10 min:-10, max: 10
} }
} }
},
drawPoints: {
style: 'circle' // square, circle
},
shaded: {
orientation: 'bottom' // top, bottom
} }
}; };
var graph2d = new vis.Graph2d(container, dataset, options); var graph2d = new vis.Graph2d(container, dataset, options);
@ -101,7 +101,7 @@
// add a new data point to the dataset // add a new data point to the dataset
var now = vis.moment(); var now = vis.moment();
dataset.add({ dataset.add({
x: now+2000, // changed so you dont see them appearing
x: now,
y: y(now / 1000) y: y(now / 1000)
}); });

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

@ -456,6 +456,16 @@ Core.prototype.redraw = function() {
var borderRootHeight= dom.root.offsetHeight - dom.root.clientHeight; var borderRootHeight= dom.root.offsetHeight - dom.root.clientHeight;
var borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth; var borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth;
// workaround for a bug in IE: the clientWidth of an element with
// a height:0px and overflow:hidden is not calculated and always has value 0
if (dom.centerContainer.clientHeight === 0) {
props.border.left = props.border.top;
props.border.right = props.border.left;
}
if (dom.root.clientHeight === 0) {
borderRootWidth = borderRootHeight;
}
// calculate the heights. If any of the side panels is empty, we set the height to // calculate the heights. If any of the side panels is empty, we set the height to
// minus the border width, such that the border will be invisible // minus the border width, such that the border will be invisible
props.center.height = dom.center.offsetHeight; props.center.height = dom.center.offsetHeight;

Loading…
Cancel
Save