From 1e55ee86403d961247302aa13fe2326bb4469062 Mon Sep 17 00:00:00 2001 From: yotamberk Date: Mon, 24 Oct 2016 13:26:12 +0300 Subject: [PATCH] Bugfix in timeline (#2219) * Add initial scroller without options * Add initial scroll without an option * Add verticalScroll option * Fix scrollbar positions * Add docs * fix example * remove jquery dependency * Fix example * Fix review comments * Fix verticalScroll and horizontalScroll docs * Fix bug in timeline option.rtl if otion is undefined * Remove hack * Fix breaking of timeline --- lib/timeline/Timeline.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 43b7b583..ef47d28f 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -61,11 +61,6 @@ function Timeline (container, items, groups, options) { }; this.options = util.deepExtend({}, this.defaultOptions); - // apply options - if (options) { - this.setOptions(options); - } - // Create the DOM, props, and emitter this._create(container); @@ -109,6 +104,11 @@ function Timeline (container, items, groups, options) { // current time bar this.currentTime = new CurrentTime(this.body); this.components.push(this.currentTime); + + // apply options + if (options) { + this.setOptions(options); + } // item set this.itemSet = new ItemSet(this.body, this.options);