mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 16:37:52 +00:00
add .get() and .set() to twisterOptions
This commit is contained in:
parent
173d7e749f
commit
c14103ae3c
@ -316,6 +316,20 @@ twisterOptions.prototype.add = function (option) {
|
||||
this[option.name] = new twisterOption(option);
|
||||
};
|
||||
|
||||
twisterOptions.prototype.get = function (optionName) {
|
||||
if (optionName && typeof this[optionName] !== 'undefined')
|
||||
return this[optionName].val;
|
||||
else
|
||||
console.warn('option \'' + optionName + '\' does not exist');
|
||||
};
|
||||
|
||||
twisterOptions.prototype.set = function (optionName, val) {
|
||||
if (optionName && typeof this[optionName] !== 'undefined')
|
||||
this[optionName].set(val);
|
||||
else
|
||||
console.warn('option \'' + optionName + '\' does not exist');
|
||||
};
|
||||
|
||||
twisterOptions.prototype.initControls = function () {
|
||||
var elem;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user