mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-27 03:54:24 +00:00
36 lines
646 B
JavaScript
36 lines
646 B
JavaScript
import MakiObject from "./MakiObject";
|
|
import { findDescendantByTypeAndId } from "../utils";
|
|
|
|
class Container extends MakiObject {
|
|
constructor(node, parent) {
|
|
super(node, parent);
|
|
|
|
this.visible = true;
|
|
}
|
|
|
|
/**
|
|
* getclassname()
|
|
*
|
|
* Returns the class name for the object.
|
|
* @ret The class name.
|
|
*/
|
|
getclassname() {
|
|
return "Container";
|
|
}
|
|
|
|
show() {
|
|
this.visible = true;
|
|
this.parent.js_trigger("js_update");
|
|
}
|
|
|
|
hide() {
|
|
this.visible = false;
|
|
this.parent.js_trigger("js_update");
|
|
}
|
|
|
|
getlayout(id) {
|
|
return findDescendantByTypeAndId(this, "layout", id);
|
|
}
|
|
}
|
|
|
|
export default Container;
|