|
|
@ -57,9 +57,17 @@ function Timeline (container, items, groups, options) { |
|
|
|
minHeight: null |
|
|
|
}; |
|
|
|
this.options = util.deepExtend({}, this.defaultOptions); |
|
|
|
if (options) { |
|
|
|
this.options.rtl = options.rtl |
|
|
|
} |
|
|
|
|
|
|
|
if (!options || (options && typeof options.rtl == "undefined")) { |
|
|
|
if (container.dir) { |
|
|
|
this.options.rtl = container.dir == "rtl"; |
|
|
|
} else if (document.dir) { |
|
|
|
this.options.rtl = document.dir == "rtl"; |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.options.rtl = options.rtl; |
|
|
|
} |
|
|
|
|
|
|
|
// Create the DOM, props, and emitter
|
|
|
|
this._create(container); |
|
|
|
|
|
|
@ -91,17 +99,17 @@ function Timeline (container, items, groups, options) { |
|
|
|
}; |
|
|
|
|
|
|
|
// range
|
|
|
|
this.range = new Range(this.body); |
|
|
|
this.range = new Range(this.body, this.options); |
|
|
|
this.components.push(this.range); |
|
|
|
this.body.range = this.range; |
|
|
|
|
|
|
|
// time axis
|
|
|
|
this.timeAxis = new TimeAxis(this.body); |
|
|
|
this.timeAxis = new TimeAxis(this.body, this.options); |
|
|
|
this.timeAxis2 = null; // used in case of orientation option 'both'
|
|
|
|
this.components.push(this.timeAxis); |
|
|
|
|
|
|
|
// current time bar
|
|
|
|
this.currentTime = new CurrentTime(this.body); |
|
|
|
this.currentTime = new CurrentTime(this.body, this.options); |
|
|
|
this.components.push(this.currentTime); |
|
|
|
|
|
|
|
// item set
|
|
|
|