Browse Source

Fixed #1326: wrongly positioned dot of PointItems

webworkersNetwork
jos 9 years ago
parent
commit
304129882e
3 changed files with 1329 additions and 1324 deletions
  1. +1
    -0
      HISTORY.md
  2. +1324
    -1321
      dist/vis.js
  3. +4
    -3
      lib/timeline/component/item/PointItem.js

+ 1
- 0
HISTORY.md View File

@ -14,6 +14,7 @@ http://visjs.org
### Timeline ### Timeline
- Fixed #1326: wrongly positioned dot of PointItems.
- Fixed a bug when pinching and using hidden dates. Thanks @lauzierj. - Fixed a bug when pinching and using hidden dates. Thanks @lauzierj.

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


+ 4
- 3
lib/timeline/component/item/PointItem.js View File

@ -120,13 +120,14 @@ PointItem.prototype.redraw = function() {
dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; dom.content.style.marginLeft = 2 * this.props.dot.width + 'px';
//dom.content.style.marginRight = ... + 'px'; // TODO: margin right //dom.content.style.marginRight = ... + 'px'; // TODO: margin right
dom.dot.style.top = ((this.height - this.props.dot.height) / 2) + 'px';
dom.dot.style.left = (this.props.dot.width / 2) + 'px';
// recalculate size // recalculate size
this.width = dom.point.offsetWidth; this.width = dom.point.offsetWidth;
this.height = dom.point.offsetHeight; this.height = dom.point.offsetHeight;
// reposition the dot
dom.dot.style.top = ((this.height - this.props.dot.height) / 2) + 'px';
dom.dot.style.left = (this.props.dot.width / 2) + 'px';
this.dirty = false; this.dirty = false;
} }

Loading…
Cancel
Save