@antv/f2
Version:
Charts for mobile visualization.
35 lines • 1.12 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _get from "@babel/runtime/helpers/esm/get";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import Base from './base';
var Rect = /*#__PURE__*/function (_Base) {
_inherits(Rect, _Base);
var _super = _createSuper(Rect);
function Rect() {
var _this;
_classCallCheck(this, Rect);
_this = _super.apply(this, arguments);
_this.type = 'rect';
return _this;
}
_createClass(Rect, [{
key: "update",
value: function update(option) {
_get(_getPrototypeOf(Rect.prototype), "update", this).call(this, option);
var left = this.left,
top = this.top,
right = this.right,
bottom = this.bottom;
var x = [left, right];
var y = [bottom, top];
this.x = x;
this.y = y;
return this;
}
}]);
return Rect;
}(Base);
export default Rect;