27 lines
722 B
TypeScript
27 lines
722 B
TypeScript
import { BaseElement } from "../../../shared/_base";
|
|
import { WindowControlConnector } from "./window-control connector";
|
|
|
|
export class WindowControl extends BaseElement {
|
|
|
|
setActive(element: WindowControlConnector) {
|
|
for (let i = 0; i < this.children.length; i++) {
|
|
const child = <WindowControlConnector>this.children[i];
|
|
|
|
if (element == child) {
|
|
child.activate();
|
|
}
|
|
else {
|
|
child.deactivate();
|
|
}
|
|
}
|
|
}
|
|
|
|
getDistibuteTarget() {
|
|
var attr = this.getAttribute("distribute");
|
|
if (attr) {
|
|
return <HTMLElement>document.querySelector(attr);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
} |