mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
42 lines
769 B
JavaScript
42 lines
769 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");
|
|
}
|
|
|
|
setxmlparam(param, value) {
|
|
this.attributes[param] = value;
|
|
this.js_trigger("js_update");
|
|
return value;
|
|
}
|
|
|
|
getlayout(id) {
|
|
return findDescendantByTypeAndId(this, "layout", id);
|
|
}
|
|
}
|
|
|
|
export default Container;
|