Skip to content

Commit 6637b91

Browse files
authored
Merge pull request #1704 from kum-deepak/mixins
Mixins - Typescript way - Take 1
2 parents f1eb5e0 + 4093aa1 commit 6637b91

20 files changed

+840
-613
lines changed

src/base/base-mixin.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class BaseMixin {
9999
private _transitionDelay: number;
100100
private _filterPrinter: (filters) => string;
101101
private _mandatoryAttributesList: string[];
102-
private _chartGroup: string;
102+
protected _chartGroup: string;
103103
// TODO: the typing seems to be inconsistent with https://github.com/d3/d3-dispatch example as well as our use
104104
private _listeners: any; // TODO: external PR - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45869
105105
private _legend; // TODO: figure out actual type
@@ -112,7 +112,7 @@ export class BaseMixin {
112112
private _removeFilterHandler: (filters, filter) => any;
113113
private _addFilterHandler: (filters, filter) => any;
114114
private _resetFilterHandler: (filters) => any[];
115-
private _groupName: string;
115+
protected _groupName: string; // StackMixin needs it
116116

117117
constructor () {
118118
this.__dcFlag__ = utils.uniqueId();
@@ -393,8 +393,8 @@ export class BaseMixin {
393393
* @returns {crossfilter.group|BaseMixin}
394394
*/
395395
public group ();
396-
public group (group, name?): this;
397-
public group (group?, name?) {
396+
public group (group, name?, accessor?): this;
397+
public group (group?, name?, accessor?) {
398398
if (!arguments.length) {
399399
return this._group;
400400
}
@@ -1227,19 +1227,19 @@ export class BaseMixin {
12271227
return [];
12281228
}
12291229

1230-
protected legendHighlight () {
1230+
protected legendHighlight (d?) {
12311231
// do nothing in base, should be overridden by sub-function
12321232
}
12331233

1234-
protected legendReset () {
1234+
protected legendReset (d?) {
12351235
// do nothing in base, should be overridden by sub-function
12361236
}
12371237

1238-
protected legendToggle () {
1238+
protected legendToggle (d?) {
12391239
// do nothing in base, should be overriden by sub-function
12401240
}
12411241

1242-
protected isLegendableHidden () {
1242+
protected isLegendableHidden (d?) {
12431243
// do nothing in base, should be overridden by sub-function
12441244
return false;
12451245
}

0 commit comments

Comments
 (0)