Browse Source

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

v3_develop
Alex de Mulder 10 years ago
parent
commit
589e9e240b
2 changed files with 14 additions and 14 deletions
  1. +1
    -0
      HISTORY.md
  2. +13
    -14
      lib/timeline/component/ItemSet.js

+ 1
- 0
HISTORY.md View File

@ -7,6 +7,7 @@ http://visjs.org
### Timeline
- Fixed background items not always be cleared when removing them.
- Fixed visible items not always be displayed.
### Network

+ 13
- 14
lib/timeline/component/ItemSet.js View File

@ -503,22 +503,23 @@ ItemSet.prototype.redraw = function() {
this.lastVisibleInterval = visibleInterval;
this.props.lastWidth = this.props.width;
var restack = this.stackDirty;
var firstGroup = this._firstGroup();
var firstMargin = {
item: margin.item,
axis: margin.axis
};
var nonFirstMargin = {
item: margin.item,
axis: margin.item.vertical / 2
};
var height = 0;
var minHeight = margin.axis + margin.item.vertical;
// redraw the background group
this.groups[BACKGROUND].redraw(range, nonFirstMargin, restack);
// redraw all regular groups
var restack = this.stackDirty,
firstGroup = this._firstGroup(),
firstMargin = {
item: margin.item,
axis: margin.axis
},
nonFirstMargin = {
item: margin.item,
axis: margin.item.vertical / 2
},
height = 0,
minHeight = margin.axis + margin.item.vertical;
util.forEach(this.groups, function (group) {
var groupMargin = (group == firstGroup) ? firstMargin : nonFirstMargin;
var groupResized = group.redraw(range, groupMargin, restack);
@ -535,8 +536,6 @@ ItemSet.prototype.redraw = function() {
this.props.width = frame.offsetWidth;
this.props.height = height;
// reposition axis
// reposition axis
this.dom.axis.style.top = asSize((orientation == 'top') ?
(this.body.domProps.top.height + this.body.domProps.border.top) :

Loading…
Cancel
Save