mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 01:57:29 +00:00
29 lines
645 B
JavaScript
29 lines
645 B
JavaScript
import GuiObject from "./GuiObject";
|
|
import { findParentNodeOfType } from "../utils";
|
|
|
|
class Layout extends GuiObject {
|
|
/**
|
|
* getclassname()
|
|
*
|
|
* Returns the class name for the object.
|
|
* @ret The class name.
|
|
*/
|
|
getclassname() {
|
|
return "Layout";
|
|
}
|
|
|
|
getcontainer() {
|
|
return findParentNodeOfType(this, ["container"]);
|
|
}
|
|
|
|
resize(x, y, w, h) {
|
|
this.xmlNode.attributes.x = x;
|
|
this.xmlNode.attributes.y = y;
|
|
this.xmlNode.attributes.minimum_w = w;
|
|
this.xmlNode.attributes.maximum_w = w;
|
|
this.xmlNode.attributes.minimum_h = h;
|
|
this.xmlNode.attributes.maximum_h = h;
|
|
}
|
|
}
|
|
|
|
export default Layout;
|