|
|
@ -63,7 +63,12 @@ function Timeline (container, items, groups, options) { |
|
|
|
this._create(container); |
|
|
|
|
|
|
|
if (!options || (options && typeof options.rtl == "undefined")) { |
|
|
|
this.options.rtl = window.getComputedStyle(this.dom.root, null).direction == "rtl"; |
|
|
|
var directionFromDom, domNode = this.dom.root; |
|
|
|
while (!directionFromDom && domNode) { |
|
|
|
directionFromDom = window.getComputedStyle(domNode, null).direction; |
|
|
|
domNode = domNode.parentElement; |
|
|
|
} |
|
|
|
this.options.rtl = (directionFromDom && (directionFromDom.toLowerCase() == "rtl")); |
|
|
|
} else { |
|
|
|
this.options.rtl = options.rtl; |
|
|
|
} |
|
|
|