Browse Source

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
codeClimate
yotamberk 8 years ago
committed by Alexander Wunschik
parent
commit
ecf1c6a7d3
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      lib/timeline/Timeline.js

+ 5
- 6
lib/timeline/Timeline.js View File

@ -60,7 +60,11 @@ 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; }
// apply options
if (options) {
this.setOptions(options);
}
// Create the DOM, props, and emitter // Create the DOM, props, and emitter
this._create(container); 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! // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS!
if (groups) { if (groups) {
this.setGroups(groups); this.setGroups(groups);

Loading…
Cancel
Save