shape.js 688 B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var tslib_1 = require("tslib");
  4. var base_1 = require("./base");
  5. var Shape = /** @class */ (function (_super) {
  6. tslib_1.__extends(Shape, _super);
  7. function Shape(cfg) {
  8. var _this = _super.call(this, cfg) || this;
  9. _this.type = 'shape';
  10. _this.names = ['shape'];
  11. return _this;
  12. }
  13. /**
  14. * @override
  15. */
  16. Shape.prototype.getLinearValue = function (percent) {
  17. var idx = Math.round((this.values.length - 1) * percent);
  18. return this.values[idx];
  19. };
  20. return Shape;
  21. }(base_1.default));
  22. exports.default = Shape;
  23. //# sourceMappingURL=shape.js.map