UNPKG

621 BJavaScriptView Raw
1import { __extends } from "tslib";
2import { Identity as IdentityScale } from '../deps/f2-scale/src';
3import Base from './base';
4var Identity = /** @class */function (_super) {
5 __extends(Identity, _super);
6 function Identity() {
7 return _super !== null && _super.apply(this, arguments) || this;
8 }
9 Identity.prototype.createScale = function (scaleConfig) {
10 return new IdentityScale(scaleConfig);
11 };
12 Identity.prototype._mapping = function () {
13 var _a = this,
14 field = _a.field,
15 range = _a.range;
16 return field || range && range[0];
17 };
18 return Identity;
19}(Base);
20export default Identity;
\No newline at end of file