From ac1d6a6a96e6da5f29f0c7ffabb32a22a2186d5a Mon Sep 17 00:00:00 2001 From: yotamberk Date: Mon, 24 Oct 2016 11:08:40 +0300 Subject: [PATCH] Fix small timeline bug when defining timeline with no options and fix docs explanations (#2216) * 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 --- docs/timeline/index.html | 4 ++-- lib/timeline/Timeline.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/timeline/index.html b/docs/timeline/index.html index 7cc75507..ecc0d74e 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -680,7 +680,7 @@ function (option, path) { Boolean false This option allows you to scroll horizontally to move backwards and forwards in the time range. - Only applicable when option zoomCtrl is defined or zoomable is false. + Only applicable when option zoomCtrl is defined or zoomable is false. Notice that defining this option as true will override verticalScroll scroll event but not eliminate the vertical scrollbar. @@ -1028,7 +1028,7 @@ function (option, path) { verticalScroll Boolean false - Show a vertical scroll on the side of the group list. + Show a vertical scroll on the side of the group list and link it to the scroll event when zoom is not triggered. Notice that defining this option as true will NOT override horizontalScroll. The scroll event will be vertically ignored, but a vertical scrollbar will be visible diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index a397498e..439537e0 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -60,7 +60,7 @@ function Timeline (container, items, groups, options) { minHeight: null }; this.options = util.deepExtend({}, this.defaultOptions); - this.options.rtl = options.rtl; + if (options) { this.options.rtl = options.rtl; } // Create the DOM, props, and emitter this._create(container);