Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Commit

Permalink
Fixed position of box item (#2106)
Browse files Browse the repository at this point in the history
* fixes #2064
  • Loading branch information
Iskander508 authored and mojoaxel committed Sep 20, 2016
1 parent d37bcea commit 6539ca7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/timeline/component/item/BoxItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ BoxItem.prototype.redraw = function() {
// set initial position in the visible range of the grid so that the
// rendered box size can be determinated correctly, even the content
// has a dynamic width (fixes #2032).
// The correct position is reset by this.repositionX
var previousRight = dom.box.style.right;
var previousLeft = dom.box.style.left;
if (this.options.rtl) {
dom.box.style.right = "0px";
} else {
Expand All @@ -140,6 +141,13 @@ BoxItem.prototype.redraw = function() {
this.width = dom.box.offsetWidth;
this.height = dom.box.offsetHeight;

// restore previous position
if (this.options.rtl) {
dom.box.style.right = previousRight;
} else {
dom.box.style.left = previousLeft;
}

this.dirty = false;
}

Expand Down

0 comments on commit 6539ca7

Please sign in to comment.