Merge pull request #339 from okfn/expose-timelinejs-options
Expose Timeline JS initialization options - thx to @djw.
This commit is contained in:
commit
970e4d41ea
@ -38,7 +38,8 @@ my.Timeline = Backbone.View.extend({
|
||||
});
|
||||
var stateData = _.extend({
|
||||
startField: null,
|
||||
endField: null
|
||||
endField: null,
|
||||
timelineJSOptions: {}
|
||||
},
|
||||
options.state
|
||||
);
|
||||
@ -71,9 +72,8 @@ my.Timeline = Backbone.View.extend({
|
||||
if (width) {
|
||||
$timeline.width(width);
|
||||
}
|
||||
var config = {};
|
||||
var data = this._timelineJSON();
|
||||
this.timeline.init(data, this.elementId, config);
|
||||
this.timeline.init(data, this.elementId, this.state.get("timelineJSOptions"));
|
||||
this._timelineIsInitialized = true
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user