UNPKG

@antv/f2

Version:

Charts for mobile visualization.

32 lines (31 loc) 899 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _tslib = require("tslib"); var _base = _interopRequireDefault(require("./base")); var Rect = /** @class */function (_super) { (0, _tslib.__extends)(Rect, _super); function Rect() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'rect'; return _this; } Rect.prototype.update = function (option) { _super.prototype.update.call(this, option); var _a = this, left = _a.left, top = _a.top, width = _a.width, height = _a.height; var x = [left, left + width]; var y = [top + height, top]; this.x = x; this.y = y; return this; }; return Rect; }(_base.default); var _default = exports.default = Rect;