* sets the value of a property * @param name * @param value
(name: string, value: TWidgetValue)
| 910 | * @param value |
| 911 | */ |
| 912 | setProperty(name: string, value: TWidgetValue): void { |
| 913 | this.properties ||= {} |
| 914 | if (value === this.properties[name]) return |
| 915 | |
| 916 | const prev_value = this.properties[name] |
| 917 | this.properties[name] = value |
| 918 | // abort change |
| 919 | if (this.onPropertyChanged?.(name, value, prev_value) === false) |
| 920 | this.properties[name] = prev_value |
| 921 | |
| 922 | if (this.widgets) { |
| 923 | for (const w of this.widgets) { |
| 924 | if (!w) continue |
| 925 | |
| 926 | if (w.options.property == name) { |
| 927 | w.value = value |
| 928 | break |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | |
| 934 | /** |
| 935 | * sets the output data |
no outgoing calls
no test coverage detected