webamp/modern/src/runtime/Container.js
jberg a762dea981 fix container after inheritance change (#859)
* fix container after inheritance change

* fix missing method test
2019-11-30 13:42:53 -08:00

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;