Skip to content

Commit acf1dbd

Browse files
committed
fix: move boilerplate compat layer methods
1 parent 924aec0 commit acf1dbd

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/core/config.js

+10-12
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ export class Config {
1818

1919
this._renderlet = null;
2020

21-
this._d3compat = {
22-
eventHandler: handler => function eventHandler (a, b) {
23-
console.warn('No d3.js compatbility event handler registered, defaulting to v6 behavior.');
24-
handler.call(this, b, a);
25-
},
26-
nester: ({key, sortKeys, sortValues, entries}) => {
27-
throw new Error('No d3.js compatbility nester registered, load v5 or v6 compability layer.');
28-
},
29-
pointer: () => { throw new Error('No d3.js compatbility pointer registered, load v5 or v6 compability layer.'); }
30-
};
31-
3221
/**
3322
* If this boolean is set truthy, all transitions will be disabled, and changes to the charts will happen
3423
* immediately.
@@ -84,4 +73,13 @@ export const config = new Config();
8473
/**
8574
* d3.js compatiblity layer
8675
*/
87-
export const d3compat = {};
76+
export const d3compat = {
77+
eventHandler: handler => function eventHandler (a, b) {
78+
console.warn('No d3.js compatbility event handler registered, defaulting to v6 behavior.');
79+
handler.call(this, b, a);
80+
},
81+
nester: ({key, sortKeys, sortValues, entries}) => {
82+
throw new Error('No d3.js compatbility nester registered, load v5 or v6 compability layer.');
83+
},
84+
pointer: () => { throw new Error('No d3.js compatbility pointer registered, load v5 or v6 compability layer.'); }
85+
};

0 commit comments

Comments
 (0)