|
@ -57,9 +57,17 @@ function Timeline (container, items, groups, options) { |
|
|
minHeight: null |
|
|
minHeight: null |
|
|
}; |
|
|
}; |
|
|
this.options = util.deepExtend({}, this.defaultOptions); |
|
|
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
|
|
|
// Create the DOM, props, and emitter
|
|
|
this._create(container); |
|
|
this._create(container); |
|
|
|
|
|
|
|
@ -91,17 +99,17 @@ function Timeline (container, items, groups, options) { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// range
|
|
|
// range
|
|
|
this.range = new Range(this.body); |
|
|
|
|
|
|
|
|
this.range = new Range(this.body, this.options); |
|
|
this.components.push(this.range); |
|
|
this.components.push(this.range); |
|
|
this.body.range = this.range; |
|
|
this.body.range = this.range; |
|
|
|
|
|
|
|
|
// time axis
|
|
|
// 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.timeAxis2 = null; // used in case of orientation option 'both'
|
|
|
this.components.push(this.timeAxis); |
|
|
this.components.push(this.timeAxis); |
|
|
|
|
|
|
|
|
// current time bar
|
|
|
// current time bar
|
|
|
this.currentTime = new CurrentTime(this.body); |
|
|
|
|
|
|
|
|
this.currentTime = new CurrentTime(this.body, this.options); |
|
|
this.components.push(this.currentTime); |
|
|
this.components.push(this.currentTime); |
|
|
|
|
|
|
|
|
// item set
|
|
|
// item set
|
|
|