Browse Source

fix parent class

pull/2/head
vargburz 3 years ago
parent
commit
1681cdaeab
  1. 5
      src/models/options.ts
  2. 5
      src/models/series.ts

5
src/models/options.ts

@ -99,9 +99,8 @@ export const CORE_DEFAULT_OPTIONS: Options = {
export class CoreOptions<O extends Options> {
_options: O;
protected podDefaults?: Partial<O>;
constructor(options: O) {
constructor(options: O, private _podDefaults?: Partial<O>) {
this.setOptions(options);
}
@ -115,7 +114,7 @@ export class CoreOptions<O extends Options> {
// this getter can be overrited in Pod
protected getDefaults(): Partial<O> {
return lodashDefaultsDeep(this.podDefaults, CORE_DEFAULT_OPTIONS);
return lodashDefaultsDeep(this._podDefaults, CORE_DEFAULT_OPTIONS);
}
get allOptions(): O {

5
src/models/series.ts

@ -27,9 +27,8 @@ export const CORE_SERIE_DEFAULTS = {
export class CoreSeries<T extends Serie> {
_series: Array<T> = [];
protected podDefaults?: Partial<T>;
constructor(series: T[]) {
constructor(series: T[], private _podDefaults?: Partial<T>) {
this.setSeries(series);
}
@ -60,7 +59,7 @@ export class CoreSeries<T extends Serie> {
// this getter can be overrited in Pod
protected getDefaults(): Partial<T> {
return lodashDefaultsDeep(this.podDefaults, CORE_SERIE_DEFAULTS);
return lodashDefaultsDeep(this._podDefaults, CORE_SERIE_DEFAULTS);
}
private _isSerieEmpty(serie: T): boolean {

Loading…
Cancel
Save