playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
77 lines (76 loc) • 1.57 kB
JavaScript
import { Component } from "../component.js";
class LayoutChildComponent extends Component {
_minWidth = 0;
_minHeight = 0;
_maxWidth = null;
_maxHeight = null;
_fitWidthProportion = 0;
_fitHeightProportion = 0;
_excludeFromLayout = false;
set minWidth(value) {
if (value !== this._minWidth) {
this._minWidth = value;
this.fire("resize");
}
}
get minWidth() {
return this._minWidth;
}
set minHeight(value) {
if (value !== this._minHeight) {
this._minHeight = value;
this.fire("resize");
}
}
get minHeight() {
return this._minHeight;
}
set maxWidth(value) {
if (value !== this._maxWidth) {
this._maxWidth = value;
this.fire("resize");
}
}
get maxWidth() {
return this._maxWidth;
}
set maxHeight(value) {
if (value !== this._maxHeight) {
this._maxHeight = value;
this.fire("resize");
}
}
get maxHeight() {
return this._maxHeight;
}
set fitWidthProportion(value) {
if (value !== this._fitWidthProportion) {
this._fitWidthProportion = value;
this.fire("resize");
}
}
get fitWidthProportion() {
return this._fitWidthProportion;
}
set fitHeightProportion(value) {
if (value !== this._fitHeightProportion) {
this._fitHeightProportion = value;
this.fire("resize");
}
}
get fitHeightProportion() {
return this._fitHeightProportion;
}
set excludeFromLayout(value) {
if (value !== this._excludeFromLayout) {
this._excludeFromLayout = value;
this.fire("resize");
}
}
get excludeFromLayout() {
return this._excludeFromLayout;
}
}
export {
LayoutChildComponent
};