dat.gui/elements/controller-option/controller-option.js

35 lines
485 B
JavaScript
Raw Normal View History

2014-09-07 20:18:36 +00:00
Polymer( 'controller-option', {
ready: function() {
this.options = {};
},
init: function( options ) {
if ( Array.isArray( options ) ){
options.forEach( function( opt ) {
this.options[ opt ] = opt;
}, this );
} else {
this.options = options;
}
},
getKeys: function( object ) {
if ( object ) return Object.keys( object );
}
});