From ecf1c6a7d3603fb6753c37429e0246d785e72d99 Mon Sep 17 00:00:00 2001 From: yotamberk Date: Mon, 24 Oct 2016 11:19:40 +0300 Subject: [PATCH] small improvements (#2217) * 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 --- lib/timeline/Timeline.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 439537e0..43b7b583 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -60,7 +60,11 @@ function Timeline (container, items, groups, options) { minHeight: null }; this.options = util.deepExtend({}, this.defaultOptions); - if (options) { this.options.rtl = options.rtl; } + + // apply options + if (options) { + this.setOptions(options); + } // Create the DOM, props, and emitter this._create(container); @@ -145,11 +149,6 @@ function Timeline (container, items, groups, options) { } }); - // apply options - if (options) { - this.setOptions(options); - } - // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS! if (groups) { this.setGroups(groups);