Files
cocos4/platforms/native/builtin/jsb-adapter/DOMRect.js
T
PP e3e1db619f move port/native into platforms/native (#7963)
* Revert "move in port/native to platforms/native (#7962)"

This reverts commit 96871ba26b.

* move port/native into platforms/native
2020-12-15 12:43:16 +08:00

15 lines
316 B
JavaScript

class DOMRect {
constructor(x, y, width, height) {
this.x = x ? x : 0;
this.y = y ? y : 0;
this.width = width ? width : 0;
this.height = height ? height : 0;
this.left = this.x;
this.top = this.y;
this.right = this.x + this.width;
this.bottom = this.y + this.height;
}
}
module.exports = DOMRect;