diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 46246144b..740fd5f0a 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -1538,12 +1538,12 @@ ItemSet.prototype._onDrag = function (event) { var me = this; var snap = this.options.snap || null; - var xOffset; + var xOffset = this.body.dom.root.getBoundingClientRect().left; if (this.options.rtl) { - xOffset = this.body.dom.root.offsetLeft + this.body.domProps.right.width; + xOffset += this.body.domProps.right.width; } else { - xOffset = this.body.dom.root.offsetLeft + this.body.domProps.left.width; + xOffset += this.body.domProps.left.width; } var scale = this.body.util.getScale();