mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 17:07:53 +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);
|
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 () {
|
twisterOptions.prototype.initControls = function () {
|
||||||
var elem;
|
var elem;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user