Files
cocos4/platforms/nodejs/builtin/node-adapter/DOMRect.js
T
2025-10-10 20:17:12 +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;