shape.js 598 B

123456789101112131415161718192021
  1. import { __extends } from "tslib";
  2. import Attribute from './base';
  3. var Shape = /** @class */ (function (_super) {
  4. __extends(Shape, _super);
  5. function Shape(cfg) {
  6. var _this = _super.call(this, cfg) || this;
  7. _this.type = 'shape';
  8. _this.names = ['shape'];
  9. return _this;
  10. }
  11. /**
  12. * @override
  13. */
  14. Shape.prototype.getLinearValue = function (percent) {
  15. var idx = Math.round((this.values.length - 1) * percent);
  16. return this.values[idx];
  17. };
  18. return Shape;
  19. }(Attribute));
  20. export default Shape;
  21. //# sourceMappingURL=shape.js.map