All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.factoryEditing.base.WidgetModel.js Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
import { Value } from "./Value";
export class WidgetModel {
    constructor() {
    }
    getValues() {
        let result = [];
        for (const prop in this) {
            if (this.hasOwnProperty(prop)) {
                if (this[prop] instanceof Value) {
                    let tsWorkaround = this[prop];
                    result.push(tsWorkaround);
                }
            }
        }
        return result;
    }
    getWidget() {
        if (!this.widget) {
            for (let value of this.getValues()) {
                value.finalize(this);
            }
            this.widget = this.createWidget();
        }
        return this.widget;
    }
    update() {
        this.widget.bindModel();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy