UNPKG

1.14 kBJavaScriptView Raw
1import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2import _createClass from "@babel/runtime/helpers/esm/createClass";
3import _get from "@babel/runtime/helpers/esm/get";
4import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
5import _inherits from "@babel/runtime/helpers/esm/inherits";
6import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7import Base from './base';
8
9var Rect = /*#__PURE__*/function (_Base) {
10 _inherits(Rect, _Base);
11
12 var _super = _createSuper(Rect);
13
14 function Rect() {
15 var _this;
16
17 _classCallCheck(this, Rect);
18
19 _this = _super.apply(this, arguments);
20 _this.type = 'rect';
21 return _this;
22 }
23
24 _createClass(Rect, [{
25 key: "update",
26 value: function update(option) {
27 _get(_getPrototypeOf(Rect.prototype), "update", this).call(this, option);
28
29 var left = this.left,
30 top = this.top,
31 right = this.right,
32 bottom = this.bottom;
33 var x = [left, right];
34 var y = [bottom, top];
35 this.x = x;
36 this.y = y;
37 return this;
38 }
39 }]);
40
41 return Rect;
42}(Base);
43
44export default Rect;
\No newline at end of file