Browse Source

Fixed #102: offset in newly created items when using groups.

css_transitions
jos 10 years ago
parent
commit
a98ef0686c
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      HISTORY.md
  2. +1
    -1
      src/timeline/Timeline.js

+ 1
- 0
HISTORY.md View File

@ -16,6 +16,7 @@ http://visjs.org
Timeline, deselecting selected items).
- Fixed initial visible window in case items exceed `zoomMax`. Thanks @Remper.
- Option `order` is now deprecated. This was needed for performance improvements.
- Fixed an offset in newly created items when using groups.
- Minor bug fixes.
- More examples added.

+ 1
- 1
src/timeline/Timeline.js View File

@ -639,7 +639,7 @@ Timeline.prototype._onAddItem = function (event) {
}
else {
// add item
var xAbs = vis.util.getAbsoluteLeft(this.rootPanel.frame);
var xAbs = vis.util.getAbsoluteLeft(this.contentPanel.frame);
var x = event.gesture.center.pageX - xAbs;
var newItem = {
start: this.timeAxis.snap(this._toTime(x)),

Loading…
Cancel
Save