mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Computed default value
Default values for settings can now be functions to be computed.
This commit is contained in:
parent
c5882a30aa
commit
4f18dc3ab6
@ -229,6 +229,9 @@
|
||||
|
||||
var name = settingDefinition.name;
|
||||
definitionsByName[name] = settingDefinition;
|
||||
if (typeof settingDefinition.defaultValue === "function"){
|
||||
settingDefinition.defaultValue = settingDefinition.defaultValue();
|
||||
}
|
||||
settings[name] = settingDefinition.defaultValue;
|
||||
eventHandler[name] = {};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user