2015-12-27 02:02:17 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
export var options = {
|
|
|
|
scrollYOffset: 0
|
|
|
|
};
|
2015-12-30 02:29:29 +03:00
|
|
|
|
|
|
|
// singleton
|
|
|
|
export default class OptionsManager {
|
|
|
|
constructor() {
|
|
|
|
if (OptionsManager.prototype._instance) {
|
|
|
|
return OptionsManager.prototype._instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
OptionsManager.prototype._instance = this;
|
|
|
|
|
|
|
|
this._defaults = {
|
2016-01-24 22:27:15 +03:00
|
|
|
scrollYOffset: 0,
|
|
|
|
disableLazySchemas: false
|
2015-12-30 02:29:29 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
this._options = {};
|
|
|
|
}
|
|
|
|
|
2016-01-24 22:27:15 +03:00
|
|
|
static instance() {
|
|
|
|
return new OptionsManager();
|
|
|
|
}
|
|
|
|
|
2015-12-30 02:29:29 +03:00
|
|
|
get options() {
|
|
|
|
return this._options;
|
|
|
|
}
|
|
|
|
|
|
|
|
set options(opts) {
|
|
|
|
this._options = Object.assign({}, this._defaults, opts);
|
|
|
|
}
|
|
|
|
}
|